1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Would forget to close the connection when keep_alive was not used.

This commit is contained in:
hniksic 2005-05-14 12:24:22 -07:00
parent 0640c88e3c
commit c1ba8c2111
2 changed files with 13 additions and 14 deletions

View 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

View 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))
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))
if (keep_alive && skip_short_body (sock, contlen))
CLOSE_FINISH (sock);
else
CLOSE_INVALIDATE (sock);
}
xfree_null (type);
return NEWLOCATION;
}