Code Review Request: 7169142: CookieHandler does not work with localhost

Chris Hegarty chris.hegarty at oracle.com
Thu Jun 13 02:10:05 PDT 2013


I think your changes are correct here, and thanks for adding a test.

-Chris.

On 06/13/2013 12:09 AM, Kurchi Hazra wrote:
>
> Hi,
>
>      The problem that this bug points out is that when a cookie is from
> a localhost and
> no domain is set, our implementation sets the default domain of the
> cookie to its uri.getHost() [1], (which is
> localhost here), and since the domain now does not contain .local, the
> cookie gets rejected.
>
> Section 3.3.1 of RFC 2965[2] mentions that a domain should default to
> "effective request-host", where the
> effective host name is derived from a host name containing no dots by
> adding the string ".local" to it.
> This patch proposes adding a .local to hosts not containing any dots.
>
> Bug: http://bugs.sun.com/view_bug.do?bug_id=7169142
> Webrev: http://cr.openjdk.java.net/~khazra/7169142/webrev.00/
>
> Thanks,
> Kurchi
>
> [1] http://mail.openjdk.java.net/pipermail/net-dev/2009-May/000873.html
> [2] http://www.ietf.org/rfc/rfc2965.txt



More information about the net-dev mailing list