haskell / haskell/HTTP

String instance is broken with non-ASCII data

オープン
#28 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Haskell
スター
186
フォーク
59
PR マージ指標
30日以内にマージされた PR はありません

説明

Although the package works with String, and indeed encourages its use by having that be the default type in some of the API helper functions, the handling of non-ASCII data is completely broken. We should be doing encoding properly to be consistent with the Content-Type header, both when sending and receiving.

This has been reported by a couple of users so far and is clearly pretty nasty, but I don't think it's trivial to fix because presumably the receiving and sending sides can use different encodings and when sending requests we ought to be optionally giving the user control of the encoding.

The alternative of removing the String instances completely is likely to be very disruptive so I don't think it's a reasonable option.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず、データの送信と受信を行う String API ヘルパーの経路を追跡し、次に各経路が Content-Type ヘッダーと文字エンコーディングをどのように扱うかを調べます。両側で使用されているエンコーディングを比較し、呼び出し元がそれを制御できる箇所を特定します。String インスタンスを削除せずに、送受信時の非 ASCII String データが一貫して処理されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
haskell
領域
networking
issue の種類
バグ
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。