Hi,

I've run into a problem using mod_proxy to do passthroughs on a number of 
virtual
servers, whereby it seems to be losing all but the last cookie header.

The main apache server has several virtual hosts each of which passes through 
to a
more secure server (on the same machine), using a config for each domain :

  ProxyPass         / http://newdomain.hosted.domain.com/
  ProxyPassReverse  / http://newdomain.hosted.domain.com/

The code running on the secure server produces a number of cookies, and passes 
data
back to the client. The data received from a request direct to the secure 
server is :

  HTTP/1.1 200 OK
  Date: Mon, 25 Mar 2002 03:39:26 GMT
  Server: Apache/1.3.24
  X-Powered-By: PHP/4.1.2
  Set-Cookie: atest1=1017027566; expires=Mon, 25-Mar-02 04:39:26 GMT
  Set-Cookie: atest2=1017027566; expires=Mon, 25-Mar-02 04:39:26 GMT
  Transfer-Encoding: chunked
  Content-Type: text/html

  2c
  set<p>set atest1 ----<br>set atest2 ----<br>
  0

However, what the client actually receives from the front-end server after the
ProxyPass finishes is :

  HTTP/1.1 200 OK
  Date: Mon, 25 Mar 2002 03:38:15 GMT
  Server: Apache/1.3.24
  Content-Type: text/html
  Set-Cookie: atest2=1017027495; expires=Mon, 25-Mar-02 04:38:15 GMT
  Transfer-Encoding: chunked
  X-Powered-By: PHP/4.1.2
  X-Cache: MISS from tribes2.theladder.org

  2c
  set<p>set atest1 ----<br>set atest2 ----<br>
  0

Obviously, the previous Set-Cookie header has been removed. I've tested it with
many cookies, of different names, including 'name[1]' style ones, and in every
case all but the last cookie header are removed.

The only relevant data I've been able to track down online is :

  http://archive.covalent.net/apache-bugdb/2000/05/0082.xml

which was suggested by a reader on one of the PHP lists. However, that patch was
superceded by another one, which on investigation turns out to be incorporated 
in
the currently shipping Apache code.

So, if anyone has any solutions or suggestions, I'd be very grateful.

The configuration on both apache instances is :

  Apache 1.3.24
  PHP 4.2

Compilation commands, http.conf, logs, etc. available upon request.

Regards,

Vincent



Reply via email to