You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2004/10/13 04:14:33 UTC

DO NOT REPLY [Bug 31090] - The session "disappears" when the context name contains the space character

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31090>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31090

The session "disappears" when the context name contains the space character





------- Additional Comments From bsouther@fwdco.com  2004-10-13 02:14 -------
This is due to browsers not recognizing spaces in the session cookie's path. See
the headers from two hits to the example (from the war file by Yoav Shapira).

I'm attaching a patch to fix this.
Tested with MSIE 6 and Mozilla 1.7.2


Headers ========================================================
http://localhost:8080/Sample%20App/test



GET /Sample%20App/test HTTP/1.1

Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803

Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Cache-Control: max-age=0



HTTP/1.x 200 OK

Server: Apache-Coyote/1.1

Set-Cookie: JSESSIONID=33047CF84AA4E7159F1262C21D4FEA83; Path=/Sample App

Content-Type: text/html;charset=ISO-8859-1

Content-Length: 165

Date: Wed, 13 Oct 2004 01:31:50 GMT

----------------------------------------------------------

http://localhost:8080/Sample%20App/test



GET /Sample%20App/test HTTP/1.1

Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803

Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Referer: http://localhost:8080/Sample%20App/test

Cache-Control: max-age=0



HTTP/1.x 200 OK

Server: Apache-Coyote/1.1

Set-Cookie: JSESSIONID=82313411257D1DA54FDFD741D4E1FE78; Path=/Sample App

Content-Type: text/html;charset=ISO-8859-1

Content-Length: 165

Date: Wed, 13 Oct 2004 01:32:03 GMT

----------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org