DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18757>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18757 Content-Length is removed from replies to HEAD requests Summary: Content-Length is removed from replies to HEAD requests Product: Apache httpd-2.0 Version: 2.0.45 Platform: All OS/Version: All Status: NEW Severity: Critical Priority: Other Component: Core AssignedTo: bugs@httpd.apache.org ReportedBy: [EMAIL PROTECTED] When a HEAD request is issued to Apache 2.0.45 (or earlier) configured as a proxy, the reply is missing the Content-Length header. The problem is not really in the proxy but in the CONTENT_LENGTH filter, which sets the Content-Length to zero (because the HEAD reply has no body). Then later in the HEADER filter a Content-Length header is removed if the length is zero. I believe the CONTENT_LENGTH filter should not touch the existing Content-Length header if the request is a HEAD request. This is a critical problem because it makes Windows boxes unable to install updates and fixes from the Internet via Apache proxy. Index: protocol.c =================================================================== RCS file: /home/cvspublic/httpd-2.0/server/protocol.c,v retrieving revision 1.121.2.2 diff -u -r1.121.2.2 protocol.c --- protocol.c 3 Feb 2003 17:32:00 -0000 1.121.2.2 +++ protocol.c 24 Mar 2003 10:10:49 -0000 @@ -1290,7 +1290,7 @@ * We can only set a C-L in the response header if we haven't already * sent any buckets on to the next output filter for this request. */ - if (ctx->data_sent == 0 && eos) { + if (ctx->data_sent == 0 && eos && !r->header_only) { ap_set_content_length(r, r->bytes_sent); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]