"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient/src/test/java/org/apache/http/impl/cookie/TestPublicSuffixListParser.java" between
httpcomponents-client-4.5.8-src.tar.gz and httpcomponents-client-4.5.9-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.

TestPublicSuffixListParser.java  (httpcomponents-client-4.5.8-src):TestPublicSuffixListParser.java  (httpcomponents-client-4.5.9-src)
skipping to change at line 104 skipping to change at line 104
cookie.setDomain(".local."); cookie.setDomain(".local.");
Assert.assertTrue(filter.match(cookie, new CookieOrigin("somehost.local. ", 80, "/stuff", false))); Assert.assertTrue(filter.match(cookie, new CookieOrigin("somehost.local. ", 80, "/stuff", false)));
cookie.setDomain(".localhost."); cookie.setDomain(".localhost.");
Assert.assertTrue(filter.match(cookie, new CookieOrigin("somehost.localh ost.", 80, "/stuff", false))); Assert.assertTrue(filter.match(cookie, new CookieOrigin("somehost.localh ost.", 80, "/stuff", false)));
cookie.setDomain(".local"); cookie.setDomain(".local");
Assert.assertTrue(filter.match(cookie, new CookieOrigin("somehost.local" , 80, "/stuff", false))); Assert.assertTrue(filter.match(cookie, new CookieOrigin("somehost.local" , 80, "/stuff", false)));
cookie.setDomain(".blah"); cookie.setDomain(".blah");
Assert.assertFalse(filter.match(cookie, new CookieOrigin("somehost.blah" , 80, "/stuff", false))); Assert.assertTrue(filter.match(cookie, new CookieOrigin("somehost.blah", 80, "/stuff", false)));
} }
@Test @Test
public void testUnicode() throws Exception { public void testUnicode() throws Exception {
final BasicClientCookie cookie = new BasicClientCookie("name", "value"); final BasicClientCookie cookie = new BasicClientCookie("name", "value");
cookie.setDomain(".h\u00E5.no"); // \u00E5 is <aring> cookie.setDomain(".h\u00E5.no"); // \u00E5 is <aring>
Assert.assertFalse(filter.match(cookie, new CookieOrigin("apache.h\u00E5 .no", 80, "/stuff", false))); Assert.assertFalse(filter.match(cookie, new CookieOrigin("apache.h\u00E5 .no", 80, "/stuff", false)));
cookie.setDomain(".xn--h-2fa.no"); cookie.setDomain(".xn--h-2fa.no");
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

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