]> sjero.net Git - wget/commitdiff
[svn] Make sure cookie code works with the real URL data, not the proxy one.
authorhniksic <devnull@localhost>
Mon, 14 May 2001 09:32:11 +0000 (02:32 -0700)
committerhniksic <devnull@localhost>
Mon, 14 May 2001 09:32:11 +0000 (02:32 -0700)
Published in <sxsg0e8z3bp.fsf@florida.arsdigita.de>.

src/ChangeLog
src/http.c

index b873a47c39f05e6bb5c476bc531d18ec559c4407..e84f3d4e58aef4cf751330828cd0fa59cf7256af 100644 (file)
@@ -1,3 +1,8 @@
+2001-05-14  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+       * http.c (gethttp): Use real URL data for cookies, not the cookie
+       stuff.
+
 2001-05-12  Hrvoje Niksic  <hniksic@arsdigita.com>
 
        * main.c (print_help): Document `--no-http-keep-alive'.
index 23ed7ddc708580eec36cec3ed5fde5f404b3eb08..93b3a12f197c4fe28fc14c29de81f5ca444e90e3 100644 (file)
@@ -596,10 +596,6 @@ gethttp (struct urlinfo *u, struct http_stat *hs, int *dt)
   keep_alive = 0;
   http_keep_alive_1 = http_keep_alive_2 = 0;
 
-  if (opt.cookies)
-    cookies = build_cookies_request (u->host, u->port, u->path,
-                                    u->proto == URLHTTPS);
-
   /* Initialize certain elements of struct http_stat.  */
   hs->len = 0L;
   hs->contlen = -1;
@@ -807,6 +803,10 @@ gethttp (struct urlinfo *u, struct http_stat *hs, int *dt)
   else
     request_keep_alive = NULL;
 
+  if (opt.cookies)
+    cookies = build_cookies_request (ou->host, ou->port, ou->path,
+                                    ou->proto == URLHTTPS);
+
   /* Allocate the memory for the request.  */
   request = (char *)alloca (strlen (command) + strlen (path)
                            + strlen (useragent)