]> sjero.net Git - wget/blobdiff - src/http.c
[svn] Rewrite with_thousand_seps to be size-agnostic. Remove printing of separators
[wget] / src / http.c
index 5eb256ba06ac7500069814b53b7b727442739a13..30207e6c374a1176b8d51453143df3d186fab10b 100644 (file)
@@ -59,7 +59,7 @@ so, delete this exception statement from your version.  */
 #include "convert.h"
 
 extern char *version_string;
-extern LARGE_INT total_downloaded_bytes;
+extern SUM_SIZE_INT total_downloaded_bytes;
 
 extern FILE *output_stream;
 extern bool output_stream_regular;
@@ -1706,7 +1706,6 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
   /* Handle (possibly multiple instances of) the Set-Cookie header. */
   if (opt.cookies)
     {
-      char *pth = NULL;
       int scpos;
       const char *scbeg, *scend;
       /* The jar should have been created by now. */
@@ -1717,15 +1716,8 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
           ++scpos)
        {
          char *set_cookie; BOUNDED_TO_ALLOCA (scbeg, scend, set_cookie);
-         if (pth == NULL)
-           {
-             /* u->path doesn't begin with /, which cookies.c expects. */
-             pth = (char *) alloca (1 + strlen (u->path) + 1);
-             pth[0] = '/';
-             strcpy (pth + 1, u->path);
-           }
-         cookie_handle_set_cookie (wget_cookie_jar, u->host, u->port, pth,
-                                   set_cookie);
+         cookie_handle_set_cookie (wget_cookie_jar, u->host, u->port,
+                                   u->path, set_cookie);
        }
     }
 
@@ -1846,7 +1838,7 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
          logputs (LOG_VERBOSE, _("Length: "));
          if (contlen != -1)
            {
-             logputs (LOG_VERBOSE, with_thousand_seps (contlen + contrange));
+             logputs (LOG_VERBOSE, number_to_static_string (contlen + contrange));
              if (contlen + contrange >= 1024)
                logprintf (LOG_VERBOSE, " (%s)",
                           human_readable (contlen + contrange));
@@ -1854,11 +1846,11 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
                {
                  if (contlen >= 1024)
                    logprintf (LOG_VERBOSE, _(", %s (%s) remaining"),
-                              with_thousand_seps (contlen),
+                              number_to_static_string (contlen),
                               human_readable (contlen));
                  else
                    logprintf (LOG_VERBOSE, _(", %s remaining"),
-                              with_thousand_seps (contlen));
+                              number_to_static_string (contlen));
                }
            }
          else
@@ -2004,7 +1996,7 @@ http_loop (struct url *u, char **newloc, char **local_file, const char *referer,
   *newloc = NULL;
 
   /* Warn on (likely bogus) wildcard usage in HTTP.  */
-  if (has_wildcards_p (u->path))
+  if (opt.ftp_glob && has_wildcards_p (u->path))
     logputs (LOG_VERBOSE, _("Warning: wildcards not supported in HTTP.\n"));
 
   xzero (hstat);