1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

Fix checking the URL length when filename is specified

This commit is contained in:
Håkon Vågsether 2014-01-05 00:19:14 +01:00 committed by Giuseppe Scrivano
parent 70f7cdf1af
commit d260ded060
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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'.

View File

@ -3043,7 +3043,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. */
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;