You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Steven Herod <sh...@tedis.com.au> on 2002/12/04 03:25:26 UTC

[users@httpd] Apache with mod_ssl & mod_proxy (appears to) change HTTP status codes

Hi.
 
I'm hoping someone immediately recognizes this problem - if you don't,
please disregard this email.
 
We're chaining our HTTP requests through two servers.  One is a reverse
proxy server, the other is (of course) the web server serving the
documents.
 
The Web Server is consistently sending '304 Not Modified' responses to
conditional gets (which is what we want it to do).
 
The proxy server, on receiving '304 Not Modified' responses seems to:
Re-writethe status to '200 OK
Adds and deletes a few headers
Forwards the response on  
- But if fails to attach the content you would expect it to send for a
200 OK message
 
If the web server responds with '200 OK' then the proxy server behaves
correctly, it forwards ALL the headers sent by the web server on, simply
appending the required 'Via: 1.1 proxyservername.com' line.
 
I've read the mod_proxy docs, there doesn't appear to be anything there
about rewriting status codes 
 
Unfortunately, due to the peculiarities of the situation, we don't have
access to the server doing the reverse proxying - and apart from knowing
that it runs Apache with mod_proxy know very little about it.   
 
Below are sample HTTP headers of the 'odd' behavior we are getting.   
 
The client's request
 
GET /client/images/login.gif HTTP/1.1
Accept: */*
Referer: http://anchor/client/index.php
Accept-Language: en-us
Accept-Encoding: gzip, deflate
If-Modified-Since: Thu, 19 Sep 2002 07:26:39 GMT
If-None-Match: "1e3c18e-401-3d897c2f"
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Host: anchor
Connection: Keep-Alive
Cookie: cTELSTRA_UID=sup1adm;
cTELSTRA_SEARCH=%7C%7C%7C%7CSENT%7C%7C%7C%7Cdocstatus%7CASC%7C1%7C0%7C;
 
 
Original (Web Server) response.
 
HTTP/1.1 304 Not Modified
Date: Thu, 19 Sep 2002 07:26:39 GMT
Server: Apache/1.3.22 (Unix) PHP/4.1.1 mod_ssl/2.8.5 OpenSSL/0.9.6c
Connection: Keep-Alive
Keep-Alive: timeout=15, max=79
ETag: "1e3c18e-401-3d897c2f"
 
The Proxy servers 'translation' of the above request.
 
HTTP/1.0 200 OK
Date: Thu, 19 Sep 2002 07:26:39 GMT
ETag: "1e3c18e-401-3d897c2f"
Content-Type: image/gif
Content-Length: 42
 
 
Thanks in advance!