From 99f14078ecd0816cb2f36d06030ef6718de5286a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Fri, 9 Jan 2009 21:45:19 +0100 Subject: [PATCH] Add reminder for chunked handling/content-length header. --- src/response.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/response.c b/src/response.c index dfac69c..92e347c 100644 --- a/src/response.c +++ b/src/response.c @@ -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"));