HttpParser and multiple concatenated HTTP responses
オープン
improvement
- 主要言語
- C
- スター
- 345
- フォーク
- 94
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hi!
If my understanding is correct HttpParser.execute returns the number of bytes consumed, hence it is possible to parse multiple concatenated HTTP responses by checking is_message_complete() and starting a new parser from the same very position the last one stopped.
However the observed behavior is very different: execute() happily consumes the whole string, the subsequent responses text ends up in the message body and _clen_rest is negative.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、HttpParser.execute() と is_message_complete() に関する連結レスポンスのケースを再現し、次にレスポンスの終了時に _clen_rest がどのように更新されるかを調べます。完了条件は、parser が最初のレスポンス境界を報告し、後続のレスポンステキストを body に入れず、別の parser が返された位置から開始できることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- c, python
- 領域
- networking
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100