mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Prettier printing of HTTP headers.
Published in <sxs4rnsdcw1.fsf@florida.arsdigita.de>.
This commit is contained in:
parent
22bfc65534
commit
6ef5baa07b
@ -1,3 +1,8 @@
|
||||
2001-11-18 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||
|
||||
* http.c (gethttp): Print the whole response line when printing
|
||||
headers is requested.
|
||||
|
||||
2001-05-12 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||
|
||||
* res.c: New file. Implement all RES-related code here.
|
||||
|
15
src/http.c
15
src/http.c
@ -939,10 +939,6 @@ Accept: %s\r\n\
|
||||
all_headers[all_length] = '\0';
|
||||
}
|
||||
|
||||
/* Print the header if requested. */
|
||||
if (opt.server_response && hcount != 1)
|
||||
logprintf (LOG_VERBOSE, "\n%d %s", hcount, hdr);
|
||||
|
||||
/* Check for status line. */
|
||||
if (hcount == 1)
|
||||
{
|
||||
@ -973,7 +969,12 @@ Accept: %s\r\n\
|
||||
&& !opt.debug
|
||||
#endif
|
||||
)
|
||||
logprintf (LOG_VERBOSE, "%d %s", statcode, error);
|
||||
{
|
||||
if (opt.server_response)
|
||||
logprintf (LOG_VERBOSE, "\n%2d %s", hcount, hdr);
|
||||
else
|
||||
logprintf (LOG_VERBOSE, "%2d %s", statcode, error);
|
||||
}
|
||||
|
||||
goto done_header;
|
||||
}
|
||||
@ -985,6 +986,10 @@ Accept: %s\r\n\
|
||||
break;
|
||||
}
|
||||
|
||||
/* Print the header if requested. */
|
||||
if (opt.server_response && hcount != 1)
|
||||
logprintf (LOG_VERBOSE, "\n%2d %s", hcount, hdr);
|
||||
|
||||
/* Try getting content-length. */
|
||||
if (contlen == -1 && !opt.ignore_length)
|
||||
if (header_process (hdr, "Content-Length", header_extract_number,
|
||||
|
Loading…
Reference in New Issue
Block a user