facebook / facebook/proxygen

HEAD request and Content-Lenght

オープン
#556 コメント 2 件 リアクション 1 件 担当者 1 名 @hanidamlaj が担当を希望しています GitHub で見る
主要言語
C++
スター
8.4k
フォーク
1.5k
平均マージ
10分
マージ済み PR(30日)
2

説明

Hi, I encountered this funny issue while using proxygen as server.
On HEAD request I'm suppose to set Content-Lenght to value it would be and send no body.
So I do,
...
builder->header(proxygen::HTTP_HEADER_CONTENT_LENGTH, std::to_string(len));
builder->sendWithEOM();
however the latter sendWithEOM() (calls send()) resets the Content-Lenght back to zero.
I workarounded that by sending empty chunk first before sendWithEOM().

But I wonder if this is proxygen ResponseBuilder issue or I'm doing it wrong?

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

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

評価

この issue はまだ評価されていません。

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

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