]> sjero.net Git - wget/commitdiff
[svn] Would forget to close the connection when keep_alive was not used.
authorhniksic <devnull@localhost>
Sat, 14 May 2005 19:24:22 +0000 (12:24 -0700)
committerhniksic <devnull@localhost>
Sat, 14 May 2005 19:24:22 +0000 (12:24 -0700)
src/ChangeLog
src/http.c

index 1ed3c003d5439a50406dbe86a885aa943bb80953..ced611bf64cc979c66f2010887736bad46b166c9 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-14  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * http.c (gethttp): Would forget to close the connection when
+       keep_alive was not used.
+
 2005-05-13  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * openssl.c (pattern_match): Document the code that decides
index c6e83decd1c9ae69f8ffb0cca0aebfd7cb40435a..b2027a93b15971e533b48d765dab5ce341dbcdd5 100644 (file)
@@ -1625,13 +1625,10 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
   if (statcode == HTTP_STATUS_UNAUTHORIZED)
     {
       /* Authorization is required.  */
-      if (keep_alive)
-       {
-         if (skip_short_body (sock, contlen))
-           CLOSE_FINISH (sock);
-         else
-           CLOSE_INVALIDATE (sock);
-       }
+      if (keep_alive && skip_short_body (sock, contlen))
+       CLOSE_FINISH (sock);
+      else
+       CLOSE_INVALIDATE (sock);
       pconn.authorized = 0;
       if (!auth_finished && (user && passwd))
        {
@@ -1768,13 +1765,10 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
                     _("Location: %s%s\n"),
                     hs->newloc ? escnonprint_uri (hs->newloc) : _("unspecified"),
                     hs->newloc ? _(" [following]") : "");
-         if (keep_alive)
-           {
-             if (skip_short_body (sock, contlen))
-               CLOSE_FINISH (sock);
-             else
-               CLOSE_INVALIDATE (sock);
-           }
+         if (keep_alive && skip_short_body (sock, contlen))
+           CLOSE_FINISH (sock);
+         else
+           CLOSE_INVALIDATE (sock);
          xfree_null (type);
          return NEWLOCATION;
        }