]> sjero.net Git - wget/commitdiff
[svn] Use the full path when building the authorization line.
authorhniksic <devnull@localhost>
Sat, 1 Dec 2001 17:39:07 +0000 (09:39 -0800)
committerhniksic <devnull@localhost>
Sat, 1 Dec 2001 17:39:07 +0000 (09:39 -0800)
Published in <sxsitbqu9iw.fsf@florida.arsdigita.de>.

src/ChangeLog
src/http.c
src/url.c

index 6102481351ad25f6af039f7df47e745f507077a3..e09a2c6c857e153432e6a726a2be9f44700bbaf7 100644 (file)
@@ -1,3 +1,10 @@
+2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+       * url.c (url_full_path): Document better.
+
+       * http.c (gethttp): Use the full path when creating digest
+       authorization.
+
 2001-12-01  Hrvoje Niksic  <hniksic@arsdigita.com>
 
        * cookies.c (path_matches): Return 0 if PREFIX doesn't begin with
index 500e4b9fbc32a9afa6bbdf803795ffe20caabecb..261b51e4cf980ad50c0e6fbc8dfc3241d8e86900 100644 (file)
@@ -756,8 +756,13 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
        }
       else
        {
+         /* Use the full path, i.e. one that includes the leading
+            slash and the query string, but is independent of proxy
+            setting.  */
+         char *pth = url_full_path (u);
          wwwauth = create_authorization_line (authenticate_h, user, passwd,
-                                              command, u->path);
+                                              command, pth);
+         xfree (pth);
        }
     }
 
@@ -812,6 +817,9 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
   if (proxy)
     full_path = xstrdup (u->url);
   else
+    /* Use the full path, i.e. one that includes the leading slash and
+       the query string.  E.g. if u->path is "foo/bar" and u->query is
+       "param=value", full_path will be "/foo/bar?param=value".  */
     full_path = url_full_path (u);
 
   /* Allocate the memory for the request.  */
index 38469418abb6954081c79528b4ae546b7815688c..44866bf6208dc233c7255ee8036196a9aa9f829d 100644 (file)
--- a/src/url.c
+++ b/src/url.c
@@ -886,7 +886,10 @@ full_path_write (const struct url *url, char *where)
 #undef FROB
 }
 
-/* Public function for getting the "full path". */
+/* Public function for getting the "full path".  E.g. if u->path is
+   "foo/bar" and u->query is "param=value", full_path will be
+   "/foo/bar?param=value". */
+
 char *
 url_full_path (const struct url *url)
 {
@@ -900,6 +903,7 @@ url_full_path (const struct url *url)
 }
 
 /* Sync u->path and u->url with u->dir and u->file. */
+
 static void
 sync_path (struct url *url)
 {