Okay, you're definitely going to want to look this over since I have no
experience writing Apache modules. It's a quickie. This patch for
src/modules/proxy/proxy_http.c seems to have fixed the problem. It
takes the version number from the original request and uses it in the
proxy request.
If you're using mod_ssl, apply the patch *after* configuring mod_ssl.
Otherwise everything gets messed up.
--- proxy_http.c Thu Mar 21 06:38:03 2002
+++ /tmp/proxy_http.c Tue Apr 9 23:57:30 2002
@@ -305,2 +305,5 @@
- ap_bvputs(f, r->method, " ", proxyhost ? url : urlptr, " HTTP/1.1"
CRLF,
- NULL);
+ ap_bvputs(f, r->method, " ", proxyhost ? url : urlptr,
+ ap_psprintf(p, " HTTP/%d.%d",
+ HTTP_VERSION_MAJOR(r->proto_num),
+ HTTP_VERSION_MINOR(r->proto_num)),
+ CRLF, NULL);
On Wed, 2002-04-10 at 00:18, Ben Gunter wrote:
I think mod_proxy in Apache 1.3.24 (and I guess 1.3.23) has a problem
with HTTP 1.0 clients. I have looked at the source and it is hard coded
to use HTTP 1.1, regardless of what version the client is using. The
problem I'm running into is when I use mod_rewrite with the [P] flag to
pass a request into mod_proxy. If a client requests the URL using HTTP
1.0, mod_proxy returns a HTTP 1.1 response for the HTTP 1.0 request.
The real problem is that the data is chunked, and the client doesn't
expect that so it doesn't "unchunk" it. You can see what I'm talking
about if you use Netscape 4.x to go here: http://wwwtest.golfcpons.com/
. In addition, I've manually sent a request and pasted the results at
the bottom of this e-mail for you to look at.
HTTP/1.1 clients work fine with this setup and everything was great
until the HTTP 1.1 support was added to mod_proxy.
Any suggestions, corrections, or hope of a fix on the horizon?
======================================================================
GET / HTTP/1.0
Host: wwwtest.golfcpons.com
Connection: close
HTTP/1.1 200 OK
Date: Tue, 09 Apr 2002 23:46:54 GMT
Server: Apache/1.3.24 (Unix) mod_jk/1.1.0 mod_ssl/2.8.8 OpenSSL/0.9.6b
Cache-Control: no-cache
Content-Type: text/html
Pragma: no-cache
Set-Cookie: JSESSIONID=7u5cuovp71;Path=/
Transfer-Encoding: chunked
X-Cache: MISS from wwwtest.golfcpons.com
Connection: close
1ff8
<HTML>
<head>
.......