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

2122 Commits

Author SHA1 Message Date
Hubert Tarasiuk
ac40b84ee1 Fix error in free_vec.
* src/utils.c (free_vec): Increment pointer instead of its value.

Reported-by: Gisle Vanem <gvanem@yahoo.no>
2015-04-10 18:06:14 +02:00
Ángel González
45463eaad7 Fix const usage in iri.c
* src/iri.c (remote_to_utf8): Do not qualify with const the output pointer.
(do_conversion): Use the provided input parameter as const.
(idn_encode): casts to remote_to_utf8 parameters are no longer needed.
* src/iri.h: Adjusted remote_to_utf8 prototype.
* src/url.c: It is no longer necessary to cast new_url to const char.
2015-04-10 10:23:01 +02:00
Miquel Llobet
d03b40e31e Fixed #44628 honoring RFC 6266 content-disposition
src/http.c (parse_content_disposition): stores filename* and filename
separately and choses filename* if available.
(test_parse_content_disposition): added new tests.
2015-04-06 10:30:30 +02:00
Steven M. Schweda
5efb24e4a2 Add option to restrict filenames used VMS.
* src/options.h (enum restrict_files_os): Define "restrict_vms".
* src/init.c (defaults) [__VMS]: Set "opt.restrict_files_os" to
"restrict_vms".
(cmd_spec_restrict_file_names): honor "vms".
* src/url.c (filechr_not_unix): Define "filechr_not_vms".
(filechr_table): Update for VMS.
(append_uri_pathel): Honor opt.restrict_files_os.
(FN_QUERY_SEP): Update for VMS.
(FN_QUERY_SEP_STR): Update for VMS.
2015-04-02 15:36:42 +02:00
Hubert Tarasiuk
eae8b1d565 Change semantics of resp_free and request_free in http.c
* src/http.c (resp_free): Change the semantics of this function.
(request_free): Change the semantics of this function.
(initialize_request): Adjust request_free call.
(establish_connection): Adjust request_free, resp_free calls.
(gethttp): Adjust request_free, resp_free calls.
2015-04-01 17:01:07 +02:00
Hubert Tarasiuk
045463b814 Do not free request in establish_connection; do it in gethttp
* src/http.c (establish_connection): Do not free request here (it is
* never allocated here).
* src/http.c (gethttp): Free request before returning if error in
* establish_connection encountered.
2015-04-01 17:01:07 +02:00
Hubert Tarasiuk
621c313b94 Transform read_header label and goto into a loop
* src/http.c (gethttp): Replace label and goto statement with a do
loop.
2015-04-01 17:00:40 +02:00
Hubert Tarasiuk
52a7d0ad85 Factor out set_content_type function from gethttp
* src/http.c (gethttp): Move some code in...
(set_content_type): ... a new function.
2015-03-31 17:00:07 +02:00
Giuseppe Scrivano
59e9ef00e6 Factor out some gethttp code
* src/http.c (gethttp): Move some code in...
(open_output_stream): ... a new function.
2015-03-18 12:09:55 +01:00
Giuseppe Scrivano
14bbc18512 Factor out some auth gethttp code
* src/http.c (gethttp): Move some code in...
(check_auth): ... a new function.
2015-03-18 12:09:55 +01:00
Giuseppe Scrivano
8aa63e482e Factor out some gethttp code
* src/http.c (gethttp): Move some code in...
(check_file_output): ... a new function.
2015-03-18 12:09:55 +01:00
Giuseppe Scrivano
0bc2757713 Factor out some connection initialization code for gethttp
* src/http.c (gethttp): Move some initialization code in...
(establish_connection): ... a new function.
2015-03-18 12:09:55 +01:00
Giuseppe Scrivano
f8abb9dd00 Factor out some proxy initialization code for gethttp
* src/http.c (gethttp): Move some initialization code in...
(initialize_proxy_configuration): ... a new function.
2015-03-18 12:09:55 +01:00
Giuseppe Scrivano
29850e77d0 Factor out some initialization code for gethttp
* src/http.c (gethttp): Move some initialization code in...
(initialize_request): ... a new function.
2015-03-18 12:09:54 +01:00
Tim Ruehsen
799c545722 src/ftp.c: make sure warc_tmp becomes closed before return
Reported-by: Coverity bug #1188044
2015-03-18 10:46:11 +01:00
Tim Ruehsen
014b1d6041 src/http.c: fix error return of digest_authentication_encode()
Reported-by: Coverity bug #1188036
2015-03-18 10:46:05 +01:00
Darshit Shah
cc9f76c5a4 retr.c: Fix memory leak in retrieve_from_file()
Reported by: Coverity Bug 1188045
2015-03-14 16:48:30 +05:30
Darshit Shah
53b22974cb html-url.c: Fix potential memory leaks
Reported by: Coverity Bug 1188050
2015-03-14 16:48:30 +05:30
Darshit Shah
7d5a7ef9ca main.c: Fix two potential memory leaks
Reported by: Coverity bug 1188048
2015-03-14 16:48:30 +05:30
Darshit Shah
735cc220e3 retr.c: Fix two memory leaks when proxy URL is bad
Reported by: Coverity bug 1188047
2015-03-14 16:48:29 +05:30
Giuseppe Scrivano
16f1fb1d1f maint: update copyright year ranges to include 2015 2015-03-09 16:32:01 +01:00
Yousong Zhou
91e9a20752 Fix --content-on-error option handling.
* src/http.c: Log --content-on-error downloads.
* src/retr.c (retrieve_url): Register the download of an error page
when --content-on-error is specified.
2015-03-09 11:45:01 +01:00
Anderson Goulart
882ed28d59 src/main.c (--no-verbose): don't show progress bar
Fixes #44431
2015-03-09 00:44:23 +05:30
Darshit Shah
e316d253fa main.c: Use assertion to test buffer size 2015-03-07 00:38:04 +05:30
Darshit Shah
9dde436dd6 main.c: Need to explicitly disallow show_progress in -q 2015-03-02 21:40:57 +05:30
Eli Zaretskii
33c5d979ce warc.c: native uuid generation on Windows
* warc.c (windows_uuid_str) [WINDOWS]: New function specific to
MS-Windows.
(warc_uuid_str) [WINDOWS]: If windows_uuid_str succeeds, use its
result; otherwise use the fallback method.
2015-02-23 23:36:02 +01:00
Gisle Vanem
9df2250f4c idn: use idn_free() to free allocated libidn memory
xfree() might crash on libidn memory on Windows.

From 'man idn_free':
"Under Windows, different parts of the same application may use different
 heap memory, and then it is important to deallocate memory allocated within
 the same  module  that  allocated it. This function makes that possible."
2015-02-18 12:50:57 +01:00
Tim Rühsen
3d8e765c1d gettext: Use gnulib's gettext.h for compatibility
Fixes issues with gettext on Solaris
Reported-by: Kiyoshi KANAZAWA <yoi_no_myoujou@yahoo.co.jp>
2015-02-10 09:56:32 +01:00
Tim Rühsen
c83f344564 src/openssl.c: Use SSL_state() instead of ssl_st.state
Changes in OpenSSL 1.0.2 API hides ssl_st structure members.
Reported-by: Gisle Vanem <gvanem@yahoo.no>
2015-02-10 09:53:42 +01:00
Darshit Shah
8705e27e20 progress bar: Allow display on stderr alongwith -o
This commit causes the --show-progress option to print the progress bar
to stderr even when a logfile was explicitly provided on the command
line. Such a combination allows a user to log the output of Wget while
simultaneously keeping track of the download status.
2015-01-20 20:16:20 +01:00
Mathieu Parent
87f4fee8c9 src/connect.c: More verbose error message (tiny change)
This fixes Debian bug #144076.
2015-01-16 10:18:13 +01:00
Tim Ruehsen
5e3a760731 src/ftp-basic.c: Accept 5-digit port numbers in EPSV responses
Reported-by: Adam Sampson <ats@offog.org>
2015-01-04 20:57:15 +01:00
Tim Ruehsen
103cbf1751 src/http.c: Revert commit d81a8d5f56
The removal of the 'redundant' condition was a failure.
Fixes: #43876
Reported-by: Sean Jensen-Grey <seanj@xyke.com>
2014-12-27 23:27:20 +01:00
Tim Ruehsen
f6b28575cc src/main.c, src/warc.c: Use gnulib's base_name() instead of basename()
Reported-by: Eli Zaretskii <eliz@gnu.org>
2014-12-25 12:07:42 +01:00
Giuseppe Scrivano
a8d437d827 merge ChangeLog files in ChangeLog-2014-12-10.
* ChangeLog: truncate file.
* ChangeLog.README: Likewise.
* doc/ChangeLog: Likewise.
* msdos/ChangeLog: Likewise.
* src/ChangeLog: Likewise.
* testenv/ChangeLog: Likewise.
* tests/ChangeLog: Likewise.
* ChangeLog-2014-12-10: New file.
* Makefile.am: Distribute ChangeLog-2014-12-10.
2014-12-24 11:04:30 +01:00
Eli Zaretskii
fc336758ab src/utils.c: Don't include termios.h on Windows 2014-12-21 19:10:26 +01:00
Tim Rühsen
cfe7589397 gnulib: Use basename() from gnulib module 'dirname'
Avoid basename incompatibilities between POSIX and GNU implementations.
Also, libgen.h isn't needed any more which increases compatibility.
2014-12-21 17:34:14 +01:00
Benno Schulenberg
ee196f6fe5 * src/main.c (print_help): Indent description continuation lines by two spaces. 2014-12-21 14:10:40 +01:00
Benno Schulenberg
0417ef8b50 * src/main.c (print_help): Don't use a possessive instead of a plural. 2014-12-21 14:10:35 +01:00
Benno Schulenberg
56c0098063 * src/main.c (print_help): Don't use the backtick as a left quote mark in the help text. 2014-12-21 14:10:31 +01:00
Benno Schulenberg
712d607f9b * src/main.c (print_help): Remove the full stops from option descriptions.
And use semicolons to separate multiple phrases in a description.
2014-12-21 14:10:25 +01:00
Benno Schulenberg
32499e717d * src/main.c (print_help): Make all option descriptions start with a lowercase letter.
Also spell URL consistently in all uppercase, and fix the grammar.
2014-12-21 14:09:51 +01:00
Yuriy M. Kaminskiy
ec5e0f421c src/log.c: Fix unexpected termination in logprintf (tiny change)
When errno was set to EPIPE before call to logprintf (e.g. during close of
SSL connection that was reset by peer), it will unexpectedly terminate wget.
It should exit only when EPIPE was triggered by logging code.

Regression by 0b5b100fc9
2014-12-17 12:50:06 +01:00
Tim Rühsen
6bc2620592 src/main.c: Conditionally print help for --random-file and --egd-file
--random-file is only relevant when compiled with either OpenSSL or LibreSSL.
--egd-file is only relevant when compiled with OpenSSL
2014-12-17 12:39:00 +01:00
Tim Rühsen
b0b1cde6e2 src/init.c: Fix indentation for crlfile option 2014-12-17 12:39:00 +01:00
Jérémie Courrèges-Anglas
b5778699f0 openssl: Detect the availability of RAND_egd (tiny change)
Alternatives like LibreSSL don't provide RAND_egd() anymore.
Fixes compilation on OpenBSD.
2014-12-17 11:47:15 +01:00
Jérémie Courrèges-Anglas
b8c567a3ef Fix use of uuid libc functions (tiny change)
* Always attempt to detect uuid.h and uuid_create().
* Split libuuid and uuid.h implementations of warc_uuid_str(), since
  those APIs vary significantly.
* Correctly use the uuid.h functions
2014-12-17 09:24:31 +01:00
Darshit Shah
425368c602 Revert "ChangeLog: Move all ChangeLog files to .pre-gitlog"
This reverts commit fcd3b3c473.

Turns out that removing the ChangeLog files causes the Wget build to
fail. While this issue is investigated and sorted out, the commit is
reversed to allow people to be able to build Wget from master
2014-12-16 23:31:36 +05:30
Cong Ma
26790c3583 ftp: fix invalid pointer dereference in getftp() (tiny change)
The pointer respline in use after being passed to ftp_response() may be
uninitialized if ftp_response() fails.  Ensure that respline be used
after checking the return value of ftp_response().
2014-12-16 15:51:36 +01:00
Darshit Shah
fcd3b3c473 ChangeLog: Move all ChangeLog files to .pre-gitlog
From v1.16.1 onwards, Wget no longer maintains an active ChangeLog file.
Instead the ChangeLog will be automatically generated on each release
through gnulib's gitlog-to-changelog script. However, the old versions
of the ChangeLog files are retained for reference. These files are
renamed with a .pre-gitlog appended to their filenames.
Also removed ChangeLog.README file which is not required anymore
2014-12-16 00:51:56 +05:30