Header gets normalized when using req.Header.Set
- 主要言語
- Go
- スター
- 5.5k
- フォーク
- 372
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Setting headers via req.Header.Set causes header names to get normalized (e.g. Sec-WebSocket-Key -> Sec-Websocket-Key).
With gorilla/websocket, the same server accepts the connection without issues, but using this library the handshake fails.
After debugging, I found that the server was specifically expecting Sec-WebSocket-Key, while the client sent the normalized name.
Servers should ideally treat headers case-insensitively, but the normalization might be unintentional, so I wanted to report it.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず req.Header.Set からリクエストヘッダーの構築をたどり、Sec-WebSocket-Key を使ったハンドシェイクを再現します。このライブラリが送信するヘッダー名を期待される表記と比較し、関連するリクエストまたはハンドシェイクのテストを確認します。完了条件は、このヘッダーが設定されたときにハンドシェイクが成功し、その動作がテストでカバーされていることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- go
- 領域
- networking
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100