mirror of
https://github.com/mirror/wget.git
synced 2025-03-31 06:30:12 +08:00
[svn] Commited new HTTP output format.
This commit is contained in:
parent
b15ddc5b71
commit
b5be7ce301
@ -1,3 +1,8 @@
|
|||||||
|
2006-01-30 Mauro Tortonesi <mauro@ferrara.linux.it>
|
||||||
|
|
||||||
|
* http.c: Changed output format. Removed excessively verbose debugging
|
||||||
|
output.
|
||||||
|
|
||||||
2005-12-07 Mauro Tortonesi <mauro@ferrara.linux.it>
|
2005-12-07 Mauro Tortonesi <mauro@ferrara.linux.it>
|
||||||
|
|
||||||
* http.c: Fixed pre-download verbose output which was broken by
|
* http.c: Fixed pre-download verbose output which was broken by
|
||||||
|
40
src/http.c
40
src/http.c
@ -1200,8 +1200,6 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
|
|||||||
|
|
||||||
bool host_lookup_failed = false;
|
bool host_lookup_failed = false;
|
||||||
|
|
||||||
DEBUGP(("in gethttp 1\n"));
|
|
||||||
|
|
||||||
#ifdef HAVE_SSL
|
#ifdef HAVE_SSL
|
||||||
if (u->scheme == SCHEME_HTTPS)
|
if (u->scheme == SCHEME_HTTPS)
|
||||||
{
|
{
|
||||||
@ -1217,9 +1215,6 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
|
|||||||
}
|
}
|
||||||
#endif /* HAVE_SSL */
|
#endif /* HAVE_SSL */
|
||||||
|
|
||||||
DEBUGP(("in gethttp 2\n"));
|
|
||||||
DEBUGP(("in gethttp 3\n"));
|
|
||||||
|
|
||||||
/* Initialize certain elements of struct http_stat. */
|
/* Initialize certain elements of struct http_stat. */
|
||||||
hs->len = 0;
|
hs->len = 0;
|
||||||
hs->contlen = -1;
|
hs->contlen = -1;
|
||||||
@ -1609,8 +1604,6 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
|
|||||||
print_server_response (resp, " ");
|
print_server_response (resp, " ");
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUGP(("in gethttp 4\n"));
|
|
||||||
|
|
||||||
/* Determine the local filename if needed. Notice that if -O is used
|
/* Determine the local filename if needed. Notice that if -O is used
|
||||||
* hstat.local_file is set by http_loop to the argument of -O. */
|
* hstat.local_file is set by http_loop to the argument of -O. */
|
||||||
if (!hs->local_file)
|
if (!hs->local_file)
|
||||||
@ -1627,8 +1620,6 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUGP(("in gethttp 5\n"));
|
|
||||||
|
|
||||||
/* TODO: perform this check only once. */
|
/* TODO: perform this check only once. */
|
||||||
if (opt.noclobber && file_exists_p (hs->local_file))
|
if (opt.noclobber && file_exists_p (hs->local_file))
|
||||||
{
|
{
|
||||||
@ -2013,6 +2004,13 @@ File `%s' already there; not retrieving.\n\n"), hs->local_file);
|
|||||||
return RETRFINISHED;
|
return RETRFINISHED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Print fetch message, if opt.verbose. */
|
||||||
|
if (opt.verbose)
|
||||||
|
{
|
||||||
|
logprintf (LOG_NOTQUIET, _("\nStoring resource in file: `%s'\n"),
|
||||||
|
HYPHENP (hs->local_file) ? "STDOUT" : hs->local_file);
|
||||||
|
}
|
||||||
|
|
||||||
/* Open the local file. */
|
/* Open the local file. */
|
||||||
if (!output_stream)
|
if (!output_stream)
|
||||||
{
|
{
|
||||||
@ -2106,8 +2104,6 @@ http_loop (struct url *u, char **newloc, char **local_file, const char *referer,
|
|||||||
struct http_stat hstat; /* HTTP status */
|
struct http_stat hstat; /* HTTP status */
|
||||||
struct_stat st;
|
struct_stat st;
|
||||||
|
|
||||||
DEBUGP(("in http_loop\n"));
|
|
||||||
|
|
||||||
/* Assert that no value for *LOCAL_FILE was passed. */
|
/* Assert that no value for *LOCAL_FILE was passed. */
|
||||||
assert (local_file == NULL || *local_file == NULL);
|
assert (local_file == NULL || *local_file == NULL);
|
||||||
|
|
||||||
@ -2144,8 +2140,6 @@ http_loop (struct url *u, char **newloc, char **local_file, const char *referer,
|
|||||||
/* THE loop */
|
/* THE loop */
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
DEBUGP(("in http_loop LOOP\n"));
|
|
||||||
|
|
||||||
/* Increment the pass counter. */
|
/* Increment the pass counter. */
|
||||||
++count;
|
++count;
|
||||||
sleep_between_retrievals (count);
|
sleep_between_retrievals (count);
|
||||||
@ -2157,28 +2151,18 @@ http_loop (struct url *u, char **newloc, char **local_file, const char *referer,
|
|||||||
if (opt.verbose)
|
if (opt.verbose)
|
||||||
{
|
{
|
||||||
char *hurl = url_string (u, true);
|
char *hurl = url_string (u, true);
|
||||||
logprintf (LOG_VERBOSE, "--%s-- %s\n",
|
|
||||||
tms, hurl);
|
|
||||||
|
|
||||||
if (count > 1)
|
if (count > 1)
|
||||||
{
|
{
|
||||||
char tmp[256];
|
char tmp[256];
|
||||||
sprintf (tmp, _("(try:%2d)"), count);
|
sprintf (tmp, _("(try:%2d)"), count);
|
||||||
logprintf (LOG_VERBOSE, " %s", tmp);
|
logprintf (LOG_NOTQUIET, "--%s-- %s %s\n\n",
|
||||||
|
tms, tmp, hurl);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
logprintf (LOG_VERBOSE, " ");
|
logprintf (LOG_NOTQUIET, "--%s-- %s\n\n",
|
||||||
}
|
tms, hurl);
|
||||||
|
|
||||||
if (hstat.local_file)
|
|
||||||
{
|
|
||||||
logprintf (LOG_VERBOSE, " => `%s'\n",
|
|
||||||
HYPHENP (hstat.local_file) ? "STDOUT" : hstat.local_file);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
logprintf (LOG_VERBOSE, "\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
@ -2352,6 +2336,8 @@ The sizes do not match (local %s) -- retrieving.\n"),
|
|||||||
else
|
else
|
||||||
logputs (LOG_VERBOSE,
|
logputs (LOG_VERBOSE,
|
||||||
_("Remote file is newer, retrieving.\n"));
|
_("Remote file is newer, retrieving.\n"));
|
||||||
|
|
||||||
|
logputs (LOG_VERBOSE, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* free_hstat (&hstat); */
|
/* free_hstat (&hstat); */
|
||||||
|
Loading…
Reference in New Issue
Block a user