HttpCookie.domainMatches("hostname.local", "hostname") return false
Chris Hegarty
chris.hegarty at oracle.com
Wed Mar 2 01:19:29 PST 2011
On 03/ 2/11 01:50 AM, Sean Chou wrote:
> Hi,
> If there's no different opinions or objection, can someone raise a
> bug on the Oracle bug system for me please?
Sorry, I though I replied to this.
It would appear to be a bug. I filed CR 7023713,
"HttpCookie.domainMatches("hostname.local", "hostname") should return
true", for this issue.
-Chris.
> Thanks.
>
>
> 2011/2/22 Sean Chou <zhouyx at linux.vnet.ibm.com
> <mailto:zhouyx at linux.vnet.ibm.com>>
>
> 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
>
>
>
>
> --
> Best Regards,
> Sean Chou
>
More information about the net-dev
mailing list