mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Ignore HTTP 1xx responses.
This commit is contained in:
parent
8f91cbd2d6
commit
475c452780
@ -1,3 +1,8 @@
|
|||||||
|
2010-05-25 Giuseppe Scrivano <gscrivano@gnu.org>
|
||||||
|
|
||||||
|
* http.c (H_10X): New macro.
|
||||||
|
(gethttp): Silently ignore 1xx responses.
|
||||||
|
|
||||||
2010-05-24 Giuseppe Scrivano <gscrivano@gnu.org>
|
2010-05-24 Giuseppe Scrivano <gscrivano@gnu.org>
|
||||||
|
|
||||||
* iri.h (dummy_iri): Define static.
|
* iri.h (dummy_iri): Define static.
|
||||||
|
@ -93,6 +93,7 @@ static struct cookie_jar *wget_cookie_jar;
|
|||||||
#define TEXTCSS_S "text/css"
|
#define TEXTCSS_S "text/css"
|
||||||
|
|
||||||
/* Some status code validation macros: */
|
/* Some status code validation macros: */
|
||||||
|
#define H_10X(x) (((x) >= 100) && ((x) < 200))
|
||||||
#define H_20X(x) (((x) >= 200) && ((x) < 300))
|
#define H_20X(x) (((x) >= 200) && ((x) < 300))
|
||||||
#define H_PARTIAL(x) ((x) == HTTP_STATUS_PARTIAL_CONTENTS)
|
#define H_PARTIAL(x) ((x) == HTTP_STATUS_PARTIAL_CONTENTS)
|
||||||
#define H_REDIRECTED(x) ((x) == HTTP_STATUS_MOVED_PERMANENTLY \
|
#define H_REDIRECTED(x) ((x) == HTTP_STATUS_MOVED_PERMANENTLY \
|
||||||
@ -1958,6 +1959,7 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
|
|||||||
contrange = 0;
|
contrange = 0;
|
||||||
*dt &= ~RETROKF;
|
*dt &= ~RETROKF;
|
||||||
|
|
||||||
|
read_header:
|
||||||
head = read_http_response_head (sock);
|
head = read_http_response_head (sock);
|
||||||
if (!head)
|
if (!head)
|
||||||
{
|
{
|
||||||
@ -1995,6 +1997,13 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
|
|||||||
request_free (req);
|
request_free (req);
|
||||||
return HERR;
|
return HERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (H_10X (statcode))
|
||||||
|
{
|
||||||
|
DEBUGP (("Ignoring response\n"));
|
||||||
|
goto read_header;
|
||||||
|
}
|
||||||
|
|
||||||
hs->message = xstrdup (message);
|
hs->message = xstrdup (message);
|
||||||
if (!opt.server_response)
|
if (!opt.server_response)
|
||||||
logprintf (LOG_VERBOSE, "%2d %s\n", statcode,
|
logprintf (LOG_VERBOSE, "%2d %s\n", statcode,
|
||||||
|
Loading…
Reference in New Issue
Block a user