[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-modproxy-dev
Subject: [PATCH] Apache 2.0 Proxy & Windows Update
From: "Tikka, Sami" <Sami.Tikka () F-Secure ! com>
Date: 2003-03-24 10:29:23
[Download RAW message or body]
Apache2 proxy seems to drop Content-Length header from replies to HEAD
requests. This is very bad for Microsoft's Windows Update system (and against
HTTP spec). The problem is caused by CONTENT_LENGTH output filter setting
Content-Length header to zero because there is no body data. Later on Apache
removes Content-Length header if it has value 0.
The attached patch fixes the problem in CONTENT_LENGTH output filter by
preventing it from modifying the content length of a reply to HEAD request.
The attached patch is against HEAD of APACHE_2_0_BRANCH as of this morning.
--
Sami Tikka, senior software engineer, F-Secure Corporation
tel: +358 9 2520 5115, fax: +358 9 2520 5015
http://www.F-Secure.com
F-Secure: Securing the Mobile Enterprise
["windows-update.diff" (application/octet-stream)]
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);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic