You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Angus Ng (JIRA)" <ji...@apache.org> on 2011/03/03 00:11:37 UTC

[jira] Created: (HTTPCLIENT-1066) HTTPClient 4.1 auto slash removal

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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCLIENT-1066) HTTPClient 4.1 auto slash removal

Posted by "Angus Ng (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003797#comment-13003797 ] 

Angus Ng commented on HTTPCLIENT-1066:
--------------------------------------

Thanks Oleg. It seems all working fine with me now.

Cheers,
Angus

> HTTPClient 4.1 auto slash removal
> ---------------------------------
>
>                 Key: HTTPCLIENT-1066
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1066
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.0.3, 4.1 Final
>            Reporter: Angus Ng
>            Priority: Minor
>             Fix For: 4.2 Final
>
>
> 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Resolved: (HTTPCLIENT-1066) HTTPClient 4.1 auto slash removal

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1066?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCLIENT-1066.
-------------------------------------------

    Resolution: Fixed

I hanged the way URIUtils#rewriteURI handles multiple consecutive slashes in the URI path component: multiple leading slashes will be replaced by one slash in order to avoid confusion with the authority component. The remaining content of the path component will not be modified.

Please re-test your application against the latest SVN snapshot.

Oleg 

> HTTPClient 4.1 auto slash removal
> ---------------------------------
>
>                 Key: HTTPCLIENT-1066
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1066
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.0.3, 4.1 Final
>            Reporter: Angus Ng
>            Priority: Minor
>             Fix For: 4.2 Final
>
>
> 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Updated: (HTTPCLIENT-1066) HTTPClient 4.1 auto slash removal

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1066?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski updated HTTPCLIENT-1066:
------------------------------------------

          Component/s: HttpClient
             Priority: Minor  (was: Major)
    Affects Version/s: 4.0.3
                       4.1 Final
        Fix Version/s: 4.2 Final

I just can't make everyone happy, can I? 

I'll try to revert the changes to URIUtils#rewriteURI method without completely breaking the fix for HTTPCLIENT-929.

Oleg

> HTTPClient 4.1 auto slash removal
> ---------------------------------
>
>                 Key: HTTPCLIENT-1066
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1066
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.0.3, 4.1 Final
>            Reporter: Angus Ng
>            Priority: Minor
>             Fix For: 4.2 Final
>
>
> 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org