Content-Length invalid for unicode text
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 38/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- typescript
- 領域
- api
調査の方向性
まず、HTTPリクエスト文字列を生成し、Content-Lengthを計算するコードを追跡してから、Unicodeテキストがどのようにエンコードされるかを確認します。äöüを使用した回帰テストを追加し、生成された長さがUTF-8のバイト数と一致することを検証します。
索引モデルが issue の本文から書いたものです。
説明
When generating a http request string, the content-length seems to be calculated using the number of codepoints instead of bytes.
This was generated using insomnia, which uses httpsnippet:
POST /api/v1/test HTTP/1.1
Content-Type: text/plain
User-Agent: insomnia/2023.5.8
Host: localhost:5003
Content-Length: 3
äöü
This is what insomnia actually sends when executing the request (visualized using nc -l localhost 5003)
$ nc -l localhost 5003
POST /api/v1/test HTTP/1.1
Host: localhost:5003
Content-Type: text/plain
User-Agent: insomnia/2023.5.8
Accept: */*
Content-Length: 6
äöü
- 主要言語
- TypeScript
- スター
- 1.2k
- フォーク
- 242
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Kong/httpsnippet のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
Kong/httpsnippet#356 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
Kong/httpsnippet#389 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
Kong/httpsnippet#383 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
Kong/httpsnippet#379 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
Kong/httpsnippet#370 ·
Kong/httpsnippet の issue をすべて見る
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
vicharanashala/fln#563 ·