]> sjero.net Git - wget/commitdiff
[svn] Specify exact domain match on cookies that don't specify domain.
authorhniksic <devnull@localhost>
Sat, 8 Nov 2003 22:32:52 +0000 (14:32 -0800)
committerhniksic <devnull@localhost>
Sat, 8 Nov 2003 22:32:52 +0000 (14:32 -0800)
src/ChangeLog
src/cookies.c

index 5c1613b3d038fa49e4d4d7c5bb269b06e8fb32c0..b4ef0b10f760b14fcce73fba06fd6ee972e85b0b 100644 (file)
@@ -1,3 +1,8 @@
+2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * cookies.c (cookie_handle_set_cookie): Specify exact match for
+       unspecified domains.
+
 2003-11-08  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * main.c (main): Removed one-letter options `-C', `-g', `-G', and
index 599d2daa577ccab76d259baea10378203b9de3f4..a88aa2adb2a93441d5f6d47d88007f15e3fe5f85 100644 (file)
@@ -848,8 +848,13 @@ cookie_handle_set_cookie (struct cookie_jar *jar,
   if (!cookie->domain)
     {
     copy_domain:
+      /* If the domain was not provided, we use the one we're talking
+        to, and set exact match.  */
       cookie->domain = xstrdup (host);
-      cookie->port = port;
+      cookie->domain_exact = 1;
+      /* Set the port, but only if it's non-default. */
+      if (port != 80 && port != 443)
+       cookie->port = port;
     }
   else
     {