HttpCookie.domainMatches("hostname.local", "hostname") return false
Sean Chou
zhouyx at linux.vnet.ibm.com
Tue Feb 22 03:47:57 PST 2011
Hi,
I find that HttpCookie.domainMatches("hostname.local", "hostname")
returns false, which may be a bug.
According to spec, the effective host name of "hostname" is
"hostname.local", which is string
exactly the same with the first parameter. Thus the method should return
true for this invocation.
I attached the simple testcase here:
// Testcase
import java.net.HttpCookie;
public class DomainMatchTest{
public static void main(String args[]){
// "true" should be printed, but get "false".
System.out.println(HttpCookie.domainMatches("hostname.local",
"hostname"));
}
}
// End of testcase
Any comments?
--
Best Regards,
Sean Chou
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/net-dev/attachments/20110222/35d9da20/attachment.html
More information about the net-dev
mailing list