diff -r 554adcfb615e src/share/classes/java/net/HttpCookie.java
--- a/src/share/classes/java/net/HttpCookie.java	Wed Mar 16 15:01:07 2011 -0700
+++ b/src/share/classes/java/net/HttpCookie.java	Thu Mar 17 13:35:24 2011 +0800
@@ -751,6 +751,9 @@
         int firstDotInHost = host.indexOf('.');
         if (firstDotInHost == -1 && isLocalDomain)
             return true;
+        // if the host name contains no dot and the domain name is "host.local"
+        if (firstDotInHost == -1 && domain.equalsIgnoreCase(host + ".local"))
+            return true;
 
         int domainLength = domain.length();
         int lengthDiff = host.length() - domainLength;
diff -r 554adcfb615e test/java/net/CookieHandler/TestHttpCookie.java
--- a/test/java/net/CookieHandler/TestHttpCookie.java	Wed Mar 16 15:01:07 2011 -0700
+++ b/test/java/net/CookieHandler/TestHttpCookie.java	Thu Mar 17 13:35:24 2011 +0800
@@ -368,6 +368,7 @@
         dm(".com.",     "whatever.com",     false);
         dm(".ajax.com", "ajax.com",         true);
         dm(".local",    "example.local",    true);
+        dm("cocope.local", "cocope",        true);
 
         // bug 6277808
         testCount++;
