You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modproxy-dev@apache.org by Peter Van Biesen <pe...@vlafo.be> on 2003/03/21 15:40:48 UTC

Apache proxy serving M$-junk

Hi,

the online update function on win2000 doesn't seem to work over an 
apache proxy. I've looked at the logs and the only thing that's 
different between what is served directly an what is served by te proxy 
is that the proxy strips off the Content-Length and Transfer-Encoding 
headers. From the sources I gather this is done to not break the 
keep-alive code, but for IE clients the keepalive is turned off anyway ( 
from the httpd.conf ). Is there any harm in sending these headers 
through when the keep-alive is off ?

Thanks !

Peter.


Re: Apache proxy serving M$-junk

Posted by Graham Leggett <mi...@sharp.fm>.
Peter Van Biesen wrote:

> I've tested it with 2.0.43 :

This is fixed in v2.0.45 in that proxy no longer touches Content-Length. 
There is a separate fix outstanding which affects the content length 
filter - which was changing content length to zero on HEAD requests. 
When that fix is committed this problem should go away.

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."


Re: Apache proxy serving M$-junk

Posted by Peter Van Biesen <pe...@vlafo.be>.
Graham Leggett wrote:

> Peter Van Biesen wrote:
>
>> the online update function on win2000 doesn't seem to work over an 
>> apache proxy. I've looked at the logs and the only thing that's 
>> different between what is served directly an what is served by te 
>> proxy is that the proxy strips off the Content-Length and 
>> Transfer-Encoding headers. From the sources I gather this is done to 
>> not break the keep-alive code, but for IE clients the keepalive is 
>> turned off anyway ( from the httpd.conf ). Is there any harm in 
>> sending these headers through when the keep-alive is off ?
>
>
> Which version of Apache is this? 

I've tested it with 2.0.43 :

via the proxy :

telnet vlafo3 80
Trying 193.190.145.66...
Connected to vlafo3.
Escape character is '^]'.
HEAD http://www.xs4all.be HTTP/1.0

HTTP/1.1 200 OK
Date: Mon, 24 Mar 2003 08:28:29 GMT
Server: Apache/1.3.27 (Unix) PHP/4.2.3 mod_ssl/2.8.12 OpenSSL/0.9.6g
X-Powered-By: PHP/4.2.3
Set-Cookie: PHPSESSID=fc1df1ba6217f3fbff91854fface4e95; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, 
pre-check=0
Pragma: no-cache
Content-Type: text/html
Connection: close

Connection closed by foreign host.

directly :

telnet www.xs4all.be 80
Trying...
Connected to www.xs4all.be.
Escape character is '^]'.
HEAD / HTTP/1.0

HTTP/1.1 200 OK
Date: Mon, 24 Mar 2003 08:28:43 GMT
Server: Apache/1.3.27 (Unix) PHP/4.2.3 mod_ssl/2.8.12 OpenSSL/0.9.6g
Last-Modified: Mon, 18 Mar 2002 15:58:16 GMT
ETag: "4cc08e-30-3c960e98"
Accept-Ranges: bytes
Content-Length: 48
Connection: close
Content-Type: text/html

Connection closed by foreign host.

 From the source ( both 2.0.43 and 2.0.44 ) ( proxy_http.c ) :

/* In order for ap_set_keepalive to work properly, we can NOT
* have any length information stored in the output headers.
*/
apr_table_unset(r->headers_out,"Transfer-Encoding");
apr_table_unset(r->headers_out,"Content-Length");

This is only done when the body is sent ( so normally, when HEAD is 
used, this should not occur ), but, experimentally it does occur .... ??

Of course, the above example is not the microsoft example as the url is 
only temporarely usable. The url with which I tested was :
HEAD http://windowsupdate.microsoft.com/v4/iuident.cab?0303211357 HTTP/1.0

In order to get a new one, you need to start the automatic update of 
win2000 and look at the log ...

> Apache v2.0 no longer strips Content-Length, and Transfer-Encoding is 
> supposed to be stripped (by my be readded again by Apache) as it is a 
> hop-by-hop header.
>
> Regards,
> Graham 

I don't know the source very well, so maybe I'm missing something ?

Peter


Re: Apache proxy serving M$-junk

Posted by Graham Leggett <mi...@sharp.fm>.
Peter Van Biesen wrote:

> the online update function on win2000 doesn't seem to work over an 
> apache proxy. I've looked at the logs and the only thing that's 
> different between what is served directly an what is served by te proxy 
> is that the proxy strips off the Content-Length and Transfer-Encoding 
> headers. From the sources I gather this is done to not break the 
> keep-alive code, but for IE clients the keepalive is turned off anyway ( 
> from the httpd.conf ). Is there any harm in sending these headers 
> through when the keep-alive is off ?

Which version of Apache is this?

Apache v2.0 no longer strips Content-Length, and Transfer-Encoding is 
supposed to be stripped (by my be readded again by Apache) as it is a 
hop-by-hop header.

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."