You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by bu...@apache.org on 2005/01/26 18:05:07 UTC
DO NOT REPLY [Bug 33251] New: -
path encoded jsessionid cannot be set
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=33251>.
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=33251
Summary: path encoded jsessionid cannot be set
Product: HttpClient
Version: 3.0 Beta 1
Platform: PC
OS/Version: Windows 2000
Status: NEW
Severity: major
Priority: P2
Component: Commons HttpClient
AssignedTo: httpclient-dev@jakarta.apache.org
ReportedBy: plynch@apache.org
The servlet spec specifies that when cookies are disabled, the string
";jsessionid=" should be encoded into the URI path with the session id value.
Assuming the servlet spec wouldn't require a URL that is of an invalid spec + I
know the the JDK allows such a URL, this seems to be a bug with HttpClient.
So for example a URI may look like
http://localhost/sample/foo;jsessionid=E15EF639D4E8C44E5EB3CDD606EC2601.jvmRoute?name=value
The problem I discovered is there is no way I could find such that GetMethod
could be configured to accept a URL of this form.
It always strips the value off the jsessionid path info
Example:
HttpMethod method = new
GetMethod("/sampleservlet;jsessionid=989F4B4930817098D4BD8A0B50E704F8.jvmRoute");
NameValuePair[] nvp = {new NameValuePair("name", "value")};
method.setQueryString(nvp);
Sytem.out.println(method.getURI().toString());
This will print
/sampleservlet;jsessionid=?name=value
...and in fact when the method is executed the server logs confirm that the path
requested did not contain a value for jsessionid
-Peter
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org