Hi all,

   I checked with java8, this problem still exists; and I checked the patch,
it is still working.
The bug was filed with id 7023713 for java7, and the patch is here. So,
would anyone like to
take a look at it again? Thanks.

2011/2/22 Sean Chou <zho...@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

Attachment: localdomainmatch.patch
Description: Binary data

Reply via email to