2
0
Fork 0

Add reminder for chunked handling/content-length header.

personal/stbuehler/wip
Stefan Bühler 2009-01-09 21:45:19 +01:00
parent 4a5aa5361e
commit 99f14078ec
1 changed files with 1 additions and 0 deletions

View File

@ -53,6 +53,7 @@ void response_send_headers(connection *con) {
g_string_printf(con->wrk->tmp_str, "%"L_GOFFSET_FORMAT, con->out->length);
http_header_overwrite(vr->response.headers, CONST_STR_LEN("Content-Length"), GSTR_LEN(con->wrk->tmp_str));
} else if (con->keep_alive && vr->request.http_version == HTTP_VERSION_1_1) {
/* TODO: maybe someone set a content length header? */
if (!(vr->response.transfer_encoding & HTTP_TRANSFER_ENCODING_CHUNKED)) {
vr->response.transfer_encoding |= HTTP_TRANSFER_ENCODING_CHUNKED;
http_header_append(vr->response.headers, CONST_STR_LEN("Transfer-Encoding"), CONST_STR_LEN("chunked"));