You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "David Blevins (JIRA)" <ji...@apache.org> on 2013/06/18 08:53:19 UTC

[jira] [Commented] (CXF-5084) URIBuilder optimization prevents relative paths that startWith "h" "t" "t" "p"

    [ https://issues.apache.org/jira/browse/CXF-5084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13686451#comment-13686451 ] 

David Blevins commented on CXF-5084:
------------------------------------

Patch attached.  Would be great to get this into the next 2.x release, though the patch was made against trunk.

Not sure why someone would want relative paths like this, but is an issue a TomEE user ran into.
                
> URIBuilder optimization prevents relative paths that startWith "h" "t" "t" "p"
> ------------------------------------------------------------------------------
>
>                 Key: CXF-5084
>                 URL: https://issues.apache.org/jira/browse/CXF-5084
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.5.10, 2.6.8, 2.7.5
>            Reporter: David Blevins
>         Attachments: CXF-5084.patch
>
>
>         URI uri = new URI("http://foo/bar/baz;m1=m1value");
>         URI newUri = new UriBuilderImpl(uri).replacePath("httppnewpath").build();
>         assertEquals("URI is not built correctly", "http://foo/httppnewpath", newUri.toString());
> Should pass, but results in:
> FAILURE!
> org.junit.ComparisonFailure: URI is not built correctly expected:<http:[//foo/]httppnewpath> but was:<http:[]httppnewpath>
> 	at org.junit.Assert.assertEquals(Assert.java:115)
> 	at org.apache.cxf.jaxrs.impl.UriBuilderImplTest.testReplacePathHttpString(UriBuilderImplTest.java:537)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira