HTTPClient 4.1 auto slash removal
---------------------------------
Key: HTTPCLIENT-1066
URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1066
Project: HttpComponents HttpClient
Issue Type: Bug
Reporter: Angus Ng
I've put the same comment as in the following issue.
https://issues.apache.org/jira/browse/HTTPCLIENT-929?focusedCommentId=13001748#comment-13001748
I am using httpclient 4.1. I had a problem with this fix. In
DefaultRequestDirector.rewriteRequestURI method, for non-proxied URI and when
it is a absolute URI, it will call the URIUtils.rewriteURI, which then take the
"RawPath" from an uri and normalize it. So when I pass an uri, for example,
http://www.whatever.com/1//3, it will automatically remove the extra slash and
become http://www.whatever.com/1/3. I've got a REStful service to accept the
uri (/{param1}/{param2}/{param3}) and it takes when there is an empty value
past in. Now because of the auto slash removal, the "3" value shift left for a
position and match to the {param2}. I wouldn't say the above solution is wrong,
but I guess it should not change what value that user pass in.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]