Merge branch 'master' into parallel-wget

Conflicts:
	src/main.c
This commit is contained in:
Giuseppe Scrivano 2014-01-22 22:12:22 +01:00
commit 9020b71c18
14 changed files with 84 additions and 26 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "gnulib"]
path = gnulib
url = git://git.sv.gnu.org/gnulib.git

View File

@ -1,3 +1,7 @@
2013-12-22 Giuseppe Scrivano <gscrivan@redhat.com>
* gnulib: add git submodule.
2013-10-23 Darshit Shah <darnir@gmail.com>
* configure.ac: Add --race-detection.

6
NEWS
View File

@ -8,6 +8,10 @@ Please send GNU Wget bug reports to <bug-wget@gnu.org>.
* Changes in Wget X.Y.Z
** Introduce --no-config.
* Changes in Wget 1.15
** Add support for --method.
** Add support for file names longer than MAX_FILE.
@ -35,6 +39,8 @@ Please send GNU Wget bug reports to <bug-wget@gnu.org>.
** Support some FTP servers that return an empty list with "LIST -a".
** Specify Host with the HTTP CONNECT method.
** Use the correct HTTP method on a redirection.
* Changes in Wget 1.14

View File

@ -1,3 +1,11 @@
2013-12-29 Giuseppe Scrivano <gscrivan@redhat.com>
* wget.texi: Update to GFDL 1.3.
2013-12-22 Mike Frysinger <vapier@gentoo.org>
* sample.wgetrc: add links to the manual.
2013-10-06 Tim Ruehsen <tim.ruehsen@gmx.de>
* wget.texi: add/explain quoting of wildcard patterns

View File

@ -5,7 +5,10 @@
## You can use this file to change the default behaviour of wget or to
## avoid having to type many many command-line options. This file does
## not contain a comprehensive list of commands -- look at the manual
## to find out what you can put into this file.
## to find out what you can put into this file. You can find this here:
## $ info wget.info 'Startup File'
## Or online here:
## https://www.gnu.org/software/wget/manual/wget.html#Startup-File
##
## Wget initialization file can reside in /usr/local/etc/wgetrc
## (global, for all users) or $HOME/.wgetrc (for a single user).

View File

@ -47,11 +47,11 @@ notice identical to this one except for the removal of this paragraph
(this paragraph not being relevant to the printed manual).
@end ignore
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled ``GNU Free
Documentation License''.
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the section entitled
``GNU Free Documentation License''.
@c man end
@end copying
@ -4419,7 +4419,7 @@ subscribers of the Wget mailing list.
@appendix Copying this manual
@menu
* GNU Free Documentation License:: Licnse for copying this manual.
* GNU Free Documentation License:: License for copying this manual.
@end menu
@node GNU Free Documentation License, , Copying this manual, Copying this manual

1
gnulib Submodule

@ -0,0 +1 @@
Subproject commit 0ac90c5a98030c998f3e1db3a0d7f19d4630b6b6

View File

@ -1,3 +1,27 @@
2014-01-17 Darshit Shah <darnir@gmail.com>
* init.c (commands[]): Add --no-config.
* options.h: Same.
* main.c (option_data[]): Same.
(print_help): Same.
(main): If --no-config is set, then do not read the wgetrc files.
2014-01-05 Håkon Vågsether <hauk142@gmail.com> (tiny change)
* http.c (http_loop): Fix checking the URL length when filename is
specified.
2013-12-29 Giuseppe Scrivano <gscrivan@redhat.com>
* init.c (home_dir): Remove useless 'if'.
* warc.c (warc_start_new_file): Likewise.
(warc_process_cdx_line): Likewise.
(warc_write_response_record): Likewise.
2013-12-26 Tim Ruehsen <tim.ruehsen@gmx.de>
* gnutls.c (ssl_connect_wget): Fix connect timeout failure
2013-11-10 Giuseppe Scrivano <gscrivan@redhat.com>
* options.h (struct options) [!ENABLE_THREADS]: Define jobs.

View File

@ -526,8 +526,7 @@ ssl_connect_wget (int fd, const char *hostname)
break;
}
if (err <= 0)
break;
err = GNUTLS_E_AGAIN;
}
else if (err < 0)
{
@ -543,7 +542,7 @@ ssl_connect_wget (int fd, const char *hostname)
}
}
}
while (err == GNUTLS_E_WARNING_ALERT_RECEIVED && gnutls_error_is_fatal (err) == 0);
while (err && gnutls_error_is_fatal (err) == 0);
if (opt.connect_timeout)
{

View File

@ -3344,7 +3344,10 @@ http_loop (struct url *u, struct url *original_url, char **newloc,
/* Send preliminary HEAD request if -N is given and we have an existing
* destination file. */
file_name = url_file_name (opt.trustservernames ? u : original_url, NULL);
if (!opt.output_document)
file_name = url_file_name (opt.trustservernames ? u : original_url, NULL);
else
file_name = xstrdup (opt.output_document);
if (opt.timestamping && (file_exists_p (file_name)
|| opt.content_disposition))
send_head_first = true;

View File

@ -160,7 +160,7 @@ static const struct {
#ifdef ENABLE_DEBUG
{ "debug", &opt.debug, cmd_boolean },
#endif
{ "defaultpage", &opt.default_page, cmd_string },
{ "defaultpage", &opt.default_page, cmd_string },
{ "deleteafter", &opt.delete_after, cmd_boolean },
{ "dirprefix", &opt.dir_prefix, cmd_directory },
{ "dirstruct", NULL, cmd_spec_dirstruct },
@ -226,6 +226,7 @@ static const struct {
{ "mirror", NULL, cmd_spec_mirror },
{ "netrc", &opt.netrc, cmd_boolean },
{ "noclobber", &opt.noclobber, cmd_boolean },
{ "noconfig", &opt.noconfig, cmd_boolean },
{ "noparent", &opt.no_parent, cmd_boolean },
{ "noproxy", &opt.no_proxy, cmd_vector },
{ "numtries", &opt.ntry, cmd_number_inf },/* deprecated*/
@ -477,8 +478,7 @@ home_dir (void)
}
ret = home ? xstrdup (home) : NULL;
if (buf)
free (buf);
free (buf);
return ret;
}

View File

@ -244,6 +244,7 @@ static struct cmdline_option option_data[] =
{ "mirror", 'm', OPT_BOOLEAN, "mirror", -1 },
{ "no", 'n', OPT__NO, NULL, required_argument },
{ "no-clobber", 0, OPT_BOOLEAN, "noclobber", -1 },
{ "no-config", 0, OPT_BOOLEAN, "noconfig", -1},
{ "no-parent", 0, OPT_BOOLEAN, "noparent", -1 },
{ "output-document", 'O', OPT_VALUE, "outputdocument", -1 },
{ "output-file", 'o', OPT_VALUE, "logfile", -1 },
@ -483,11 +484,14 @@ Logging and input file:\n"),
relative to URL.\n"),
N_("\
--config=FILE Specify config file to use.\n"),
N_("\
--no-config Do not read any config file.\n"),
"\n",
#ifdef ENABLE_METALINK
N_("\
--metalink-file download URLs found in local or external metalink FILE.\n"),
#endif
"\n",
N_("\
Download:\n"),
@ -1066,6 +1070,7 @@ main (int argc, char **argv)
longindex = -1;
int retconf;
bool use_userconfig = false;
bool noconfig = false;
while ((retconf = getopt_long (argc, argv,
short_options, long_options, &longindex)) != -1)
@ -1078,7 +1083,12 @@ main (int argc, char **argv)
{
confval = long_options[longindex].val;
config_opt = &option_data[confval & ~BOOLEAN_NEG_MARKER];
if (strcmp (config_opt->long_name, "config") == 0)
if (strcmp (config_opt->long_name, "no-config") == 0)
{
noconfig = true;
break;
}
else if (strcmp (config_opt->long_name, "config") == 0)
{
bool userrc_ret = true;
userrc_ret &= run_wgetrc (optarg);
@ -1095,7 +1105,7 @@ main (int argc, char **argv)
}
/* If the user did not specify a config, read the system wgetrc and ~/.wgetrc. */
if (use_userconfig == false)
if (noconfig == false && use_userconfig == false)
initialize ();
opterr = 0;

View File

@ -65,6 +65,7 @@ struct options
char *lfilename; /* Log filename */
char *input_filename; /* Input filename */
char *choose_config; /* Specified config file */
bool noconfig;
bool force_html; /* Is the input file an HTML file? */
char *default_page; /* Alternative default page (index file) */

View File

@ -726,10 +726,9 @@ warc_start_new_file (bool meta)
if (warc_current_file != NULL)
fclose (warc_current_file);
if (warc_current_warcinfo_uuid_str)
free (warc_current_warcinfo_uuid_str);
if (warc_current_filename)
free (warc_current_filename);
free (warc_current_warcinfo_uuid_str);
free (warc_current_filename);
warc_current_file_number++;
@ -918,8 +917,7 @@ warc_process_cdx_line (char *lineptr, int field_num_original_url,
else
{
free (original_url);
if (checksum_v != NULL)
free (checksum_v);
free (checksum_v);
free (record_id);
}
}
@ -1417,10 +1415,8 @@ warc_write_response_record (char *url, char *timestamp_str,
response_uuid);
}
if (block_digest)
free (block_digest);
if (payload_digest)
free (payload_digest);
free (block_digest);
free (payload_digest);
return warc_write_ok;
}