From: Doug MacEachern Date: Sun, 26 Aug 2001 18:57:16 +0000 (+0000) Subject: ap_content_length_filter has already set Content-Length X-Git-Tag: 2.0.25~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1a461cd85ca42c363e4ed1671fef34951db23220;p=apache ap_content_length_filter has already set Content-Length before ap_set_keepalive is called. need to remove this check in order for keepalives to work. PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90700 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 2c94d0edcc..1706a9bed7 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -136,7 +136,14 @@ AP_DECLARE(int) ap_set_keepalive(request_rec *r) && ((r->status == HTTP_NOT_MODIFIED) || (r->status == HTTP_NO_CONTENT) || r->header_only +#if 0 + /* this was right in 1.x, but in 2.x + * ap_content_length_filter has already set Content-Length + * before this function is called + * XXX: should there be a different check in place of this? + */ || apr_table_get(r->headers_out, "Content-Length") +#endif || ap_find_last_token(r->pool, apr_table_get(r->headers_out, "Transfer-Encoding"), @@ -1234,7 +1241,6 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter( if (r->chunked) { apr_table_mergen(r->headers_out, "Transfer-Encoding", "chunked"); apr_table_unset(r->headers_out, "Content-Length"); - } apr_table_setn(r->headers_out, "Content-Type", ap_make_content_type(r,