[
https://issues.apache.org/jira/browse/HTTPCLIENT-727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556506#action_12556506
]
Marc Guillemot commented on HTTPCLIENT-727:
-------------------------------------------
I'm not sure to understand you explanation: why does URI look for host
settings? The arg c'tor is only a path, the host information is hold in
HostConfiguration.
Rather that trying to provide a test, I'll try to explain: for
http://my.site//foo/bla.html a normal browser performs a GET to //foo/bla.html
to the the desired host.
When you do the same with HttpClient, the GetMethod c'tor delegates to URI's
c'tor with new URI(uri, true, charset)... which is exactly what I provided in
the test case.
Additional question: you seem to say that there is no chance to fix it in
HttpClient 3.1. How does it look with future 4.0?
> Misbehaviour of URI.getEscapedPath() with uri containing double slash like
> //js/includes/foo.js
> -----------------------------------------------------------------------------------------------
>
> Key: HTTPCLIENT-727
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-727
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Affects Versions: 3.1 Final
> Reporter: Marc Guillemot
>
> public void testURI_getEscapedPath() throws Exception {
> URI uri = new URI("//js/includes/foo.js", false);
> assertEquals("//js/includes/foo.js", uri.toString()); // passes
> assertEquals("//js/includes/foo.js", uri.getEscapedPath()); // fails
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]