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:
parent
0640c88e3c
commit
c1ba8c2111
@ -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>
|
2005-05-13 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
* openssl.c (pattern_match): Document the code that decides
|
* openssl.c (pattern_match): Document the code that decides
|
||||||
|
22
src/http.c
22
src/http.c
@ -1625,13 +1625,10 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
|
|||||||
if (statcode == HTTP_STATUS_UNAUTHORIZED)
|
if (statcode == HTTP_STATUS_UNAUTHORIZED)
|
||||||
{
|
{
|
||||||
/* Authorization is required. */
|
/* Authorization is required. */
|
||||||
if (keep_alive)
|
if (keep_alive && skip_short_body (sock, contlen))
|
||||||
{
|
CLOSE_FINISH (sock);
|
||||||
if (skip_short_body (sock, contlen))
|
else
|
||||||
CLOSE_FINISH (sock);
|
CLOSE_INVALIDATE (sock);
|
||||||
else
|
|
||||||
CLOSE_INVALIDATE (sock);
|
|
||||||
}
|
|
||||||
pconn.authorized = 0;
|
pconn.authorized = 0;
|
||||||
if (!auth_finished && (user && passwd))
|
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"),
|
_("Location: %s%s\n"),
|
||||||
hs->newloc ? escnonprint_uri (hs->newloc) : _("unspecified"),
|
hs->newloc ? escnonprint_uri (hs->newloc) : _("unspecified"),
|
||||||
hs->newloc ? _(" [following]") : "");
|
hs->newloc ? _(" [following]") : "");
|
||||||
if (keep_alive)
|
if (keep_alive && skip_short_body (sock, contlen))
|
||||||
{
|
CLOSE_FINISH (sock);
|
||||||
if (skip_short_body (sock, contlen))
|
else
|
||||||
CLOSE_FINISH (sock);
|
CLOSE_INVALIDATE (sock);
|
||||||
else
|
|
||||||
CLOSE_INVALIDATE (sock);
|
|
||||||
}
|
|
||||||
xfree_null (type);
|
xfree_null (type);
|
||||||
return NEWLOCATION;
|
return NEWLOCATION;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user