www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Paulsen <br...@thePaulsens.com>
Subject mod_proxy/9768: new proxy module not handling multiple cookies correctly
Date Fri, 08 Feb 2002 16:08:00 GMT

>Number:         9768
>Category:       mod_proxy
>Synopsis:       new proxy module not handling multiple cookies correctly
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Feb 08 08:10:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     brian@thePaulsens.com
>Release:        1.3.23
>Organization:
apache
>Environment:
SunOS njfidev5 5.6 Generic_105181-28 sun4u sparc SUNW,Ultra-Enterprise
>Description:
I'm using the mod_proxy module to proxy to another server that sets multiple cookies and it
appears that the proxy server is dumping all but the last cookie.  My suspicion is that this
is due to the fact that multiple cookies each get their own line in the set of HTTP Response
headers.
>How-To-Repeat:
Have a server proxy to another server that can serve up CGI scripts.

Then execute this script via CGI

----- begin script here ------
#!/usr/local/bin/perl5 -w

sub printPage {
  print <<EOF;
Set-Cookie: cookie1=cookie1; domain=.lehman.com; path=/; expires=Mon, 06-Feb-2012 15:32:33
GMT\r
Set-Cookie: cookie2=cookie2; domain=.lehman.com; path=/; expires=Mon, 06-Feb-2012 15:32:33
GMT\r
Foobar: test1\r
Foobar: test2\r
Date: Fri, 08 Feb 2002 15:32:33 GMT\r
Content-Type: text/html; charset=ISO-8859-1\r
\r
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
	"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"><head><title>Untitled
Document</title>
</head><body></body></html>
EOF
}

printPage;
---- end of script -----

When I access the page via a browser, I see the following returned to me:
Connection: close
Date: Fri, 08 Feb 2002 15:59:28 GMT
Transfer-Encoding: chunked
Server: Apache/1.3.23 (Unix) mod_perl/1.26
Content-Type: text/html; charset=ISO-8859-1
Client-Date: Fri, 08 Feb 2002 15:59:30 GMT
Client-Request-Num: 1
Client-Warning: LWP HTTP/1.1 support is experimental
Foobar: test1, test2
Set-Cookie: cookie2=cookie2; domain=.lehman.com; path=/; expires=Mon, 06-Feb-2012 15:32:33
GMT
Title: Untitled Document
X-Cache: MISS from gemqa.lehman.com

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
	"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"><head><title>Untitled
Document</title>
</head><body></body></html>

As you can see, the Foobar headers got combined into one line, but the Set-Cookie headers
had some trouble. Only the last Set-Cookie header got returned to me.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]
 
 


Mime
View raw message