Re: Apache proxy serving M$-junk
Peter Van Biesen <[email protected]> Mon, 24 Mar 2003 09:56:17 +0100
| Newsgroups | gmane.comp.apache.mod-proxy |
|---|---|
| Message-ID | <[email protected]> |
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