"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient/src/test/java/org/apache/http/client/utils/TestURIUtils.java" between
httpcomponents-client-4.5.6-src.tar.gz and httpcomponents-client-4.5.7-src.tar.gz

About: HttpComponents is an Apache project responsible for creating and maintaining a toolset of low level Java components focused on HTTP and associated protocols. Java sources.

TestURIUtils.java  (httpcomponents-client-4.5.6-src):TestURIUtils.java  (httpcomponents-client-4.5.7-src)
skipping to change at line 54 skipping to change at line 54
@Test @Test
public void testRewrite() throws Exception { public void testRewrite() throws Exception {
final HttpHost target = new HttpHost("thathost", -1); final HttpHost target = new HttpHost("thathost", -1);
Assert.assertEquals("http://thathost/stuff", URIUtils.rewriteURI( Assert.assertEquals("http://thathost/stuff", URIUtils.rewriteURI(
URI.create("http://thishost/stuff"), target).toString()); URI.create("http://thishost/stuff"), target).toString());
Assert.assertEquals("/stuff", URIUtils.rewriteURI( Assert.assertEquals("/stuff", URIUtils.rewriteURI(
URI.create("http://thishost/stuff"), null).toString()); URI.create("http://thishost/stuff"), null).toString());
Assert.assertEquals("/", URIUtils.rewriteURI( Assert.assertEquals("/", URIUtils.rewriteURI(
URI.create("http://thishost//"), null).toString()); URI.create("http://thishost//"), null).toString());
Assert.assertEquals("/stuff///morestuff", URIUtils.rewriteURI( Assert.assertEquals("/stuff/morestuff", URIUtils.rewriteURI(
URI.create("http://thishost//stuff///morestuff"), null).toString URI.create("http://thishost//stuff/morestuff"), null).toString()
()); );
Assert.assertEquals("http://thathost/stuff", URIUtils.rewriteURI( Assert.assertEquals("http://thathost/stuff", URIUtils.rewriteURI(
URI.create("http://thishost/stuff#crap"), target, true).toString ()); URI.create("http://thishost/stuff#crap"), target, true).toString ());
Assert.assertEquals("http://thathost/stuff#crap", URIUtils.rewriteURI( Assert.assertEquals("http://thathost/stuff#crap", URIUtils.rewriteURI(
URI.create("http://thishost/stuff#crap"), target, false).toStrin g()); URI.create("http://thishost/stuff#crap"), target, false).toStrin g());
Assert.assertEquals("http://thathost/", URIUtils.rewriteURI( Assert.assertEquals("http://thathost/", URIUtils.rewriteURI(
URI.create("http://thishost#crap"), target, true).toString()); URI.create("http://thishost#crap"), target, true).toString());
Assert.assertEquals("http://thathost/#crap", URIUtils.rewriteURI( Assert.assertEquals("http://thathost/#crap", URIUtils.rewriteURI(
URI.create("http://thishost#crap"), target, false).toString()); URI.create("http://thishost#crap"), target, false).toString());
Assert.assertEquals("/stuff/", URIUtils.rewriteURI( Assert.assertEquals("/stuff/", URIUtils.rewriteURI(
URI.create("http://thishost//////////////stuff/"), null).toStrin g()); URI.create("http://thishost//////////////stuff/"), null).toStrin g());
 End of changes. 1 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)