facebook / facebook/proxygen

HEAD request and Content-Lenght

Abierto
#556 2 comentarios 1 reacción 1 asignado Reclamado por @hanidamlaj Ver en GitHub
Lenguaje dominante
C++
Estrellas
8.4k
Forks
1.5k
Merge medio
10 min
PR fusionados (30 d)
2

Descripción

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?

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.