ASF Bugzilla – Attachment 17408 Details for
Bug 38256
Set-cookie headers with no "path" attribute incorrectly processed by CookieManager
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
4 JUnit test cases to cover the set-cookie behavior
38256-TestCookieManager.patch (text/plain), 1.64 KB, created by
William Herndon
on 2006-01-13 08:33:11 UTC
(
hide
)
Description:
4 JUnit test cases to cover the set-cookie behavior
Filename:
MIME Type:
Creator:
William Herndon
Created:
2006-01-13 08:33:11 UTC
Size:
1.64 KB
patch
obsolete
>152a153,192 >> >> /** Tests missing cookie path for a trivial URL fetch from the domain >> * Note that this fails prior to a fix for BUG 38256 >> */ >> public void testMissingPath0() throws Exception { >> URL url = new URL("http://d.e.f/goo.html"); >> man.addCookieFromHeader("test=moo", url); >> String s = man.getCookieHeaderForURL(new URL("http://d.e.f/")); >> assertNotNull(s); >> assertEquals("test=moo", s); >> } >> >> /** Tests missing cookie path for a non-trivial URL fetch from the >> * domain. Note that this fails prior to a fix for BUG 38256 >> */ >> public void testMissingPath1() throws Exception { >> URL url = new URL("http://d.e.f/moo.html"); >> man.addCookieFromHeader("test=moo", url); >> String s = man.getCookieHeaderForURL(new URL("http://d.e.f/goo.html")); >> assertNotNull(s); >> assertEquals("test=moo", s); >> } >> >> /** Tests explicit root path with a trivial URL fetch from the domain */ >> public void testRootPath0() throws Exception { >> URL url = new URL("http://d.e.f/goo.html"); >> man.addCookieFromHeader("test=moo;path=/", url); >> String s = man.getCookieHeaderForURL(new URL("http://d.e.f/")); >> assertNotNull(s); >> assertEquals("test=moo", s); >> } >> >> /** Tests explicit root path with a non-trivial URL fetch from the domain */ >> public void testRootPath1() throws Exception { >> URL url = new URL("http://d.e.f/moo.html"); >> man.addCookieFromHeader("test=moo;path=/", url); >> String s = man.getCookieHeaderForURL(new URL("http://d.e.f/goo.html")); >> assertNotNull(s); >> assertEquals("test=moo", s); >> }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 38256
:
17406
|
17407
| 17408