Commit Graph

1671 Commits

Author SHA1 Message Date
Daniel Stenberg 226785838a url: remove shorten_string
The function wasn't used and caused a compiler warning:

url.c:1288:1: warning: 'shorten_length' defined but not used [-Wunused-function]
2014-03-25 15:56:23 +01:00
Yousong Zhou dfa1f4e064 Make wget capable of starting downloads from a specified position.
This patch adds an option `--start-pos' for specifying starting position
of a HTTP or FTP download.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2014-03-21 11:21:00 +01:00
Giuseppe Scrivano 43c89ab7a5 http: aesthetic change 2014-03-04 17:26:32 +01:00
Vladimír Pýcha 5bb2f43165 URL-decode the filename parameter of Content-Disposition HTTP header if it is encoded 2014-03-03 11:07:00 +01:00
Giuseppe Scrivano d68295bdb1 wget: move --version copyright year out of the localized string 2014-02-06 18:35:05 +01:00
Darshit Shah b65b9cb8c5 Turn --debug into no-op if compiled without debugging support 2014-02-01 11:49:49 +01:00
Darshit Shah b9e5c3e8b3 Introduce --no-config. The wgetrc files will not be read
In case of a conflict between --config and --no-config, the one
that appears first will be considered and the other ignored.
2014-01-22 21:59:06 +01:00
Håkon Vågsether d260ded060 Fix checking the URL length when filename is specified 2014-01-07 15:59:29 +01:00
Giuseppe Scrivano 70f7cdf1af Remove some useless if statements 2013-12-29 11:46:04 +01:00
Tim Ruehsen 3b6a3e84a0 fix GnuTLS connect timeout 2013-12-29 11:35:58 +01:00
Giuseppe Scrivano 38933de17c http: Increase max header value length to 512 2013-11-02 11:53:18 +01:00
Pavel Mateja aed7d4163a http: specify Host when CONNECT is used. 2013-11-02 11:30:04 +01:00
Giuseppe Scrivano 42c15e47b4 Remove assert which is always true 2013-10-30 21:20:50 +01:00
Andrea Urbani c3835a425a "LIST" or "LIST -a" ftp command according to the remote system 2013-10-28 23:37:10 +01:00
Bykov Aleksey 8b2954e58a Fix FTP list parsing & Fix cookies reject 2013-10-28 00:26:58 +01:00
Bykov Aleksey bba67890f3 Fix FTP list parsing 2013-10-28 00:20:18 +01:00
Tim Ruehsen 0c9fb2b041 better backport availability for PFS feature 2013-10-17 09:56:27 +02:00
Giuseppe Scrivano 1fd32c995c iri: Fix parsing of some URLs contained in HTML documents 2013-10-10 23:13:13 +02:00
Tim Ruehsen 85dd2f7ce2 fix --without-ssl compile error 2013-09-14 11:35:43 +02:00
Tim Ruehsen e1fc2057c7 PFS runtime check 2013-09-08 00:49:36 +02:00
Tim Ruehsen e505664ef3 added PFS to --secure-protocol 2013-09-07 13:22:15 +02:00
Tim Ruehsen 42c78fdd71 added option --https-only 2013-08-22 20:05:41 +02:00
Tim Ruehsen 695f11304b gnutls: Prevent CA files from being loaded twice if possible 2013-08-09 23:06:17 +02:00
Will Dietz a12bd59111 wget: Fix --version wrapping issue 2013-08-09 20:35:23 +02:00
Darshit Shah 92035dbabd Fix erroneous error codes when HTTP Digest Authentication fails. 2013-07-22 19:31:07 +02:00
Tim Ruehsen c19d76c024 ntlm: support libnettle. 2013-07-22 14:17:03 +02:00
Giuseppe Scrivano a300f1e47d Fix some memory leaks a problem introduced with the last commit 2013-07-13 16:25:43 +02:00
Steven M. Schweda 72b2c58983 warc: Fix some portability issues on VMS. 2013-07-13 13:36:55 +02:00
Giuseppe Scrivano c52bbad9e4 Make --backups work as documented 2013-07-13 13:36:55 +02:00
Steven M. Schweda eee1589ef3 vms: support --backups 2013-07-13 13:36:54 +02:00
Giuseppe Scrivano e9cc8b2f7c Fix HTTP Digest authentication when the algorithm is not specified 2013-07-12 19:07:22 +02:00
Karsten Hopp b8f036d16c Fix timeout option when used with SSL
Previously wget didn't honor the --timeout option if the remote host did
not answer SSL handshake

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2013-07-12 11:43:41 +02:00
Tim Ruehsen 91f0f99e9a gnutls: honor connect timeout 2013-07-12 00:07:05 +02:00
Tomas Hozza c78caecbb4 Document missing options and fix --preserve-permissions
Added documentation for --regex-type and --preserve-permissions
options.

Fixed --preserve-permissions to work properly also if downloading a
single file from FTP.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2013-07-11 22:01:43 +02:00
Tomas Hozza 8760123cee Set sock variable to -1 if no persistent conn exists
Wget should set sock variable to -1 if no persistent
connection exists. Function persistent_available_p()
tests persistent connection but if test_socket_open()
fails it closes the socket but will not set sock variable
to -1. After returning from persistent_available_p()
it is possible that sock has still value of already
closed connection.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2013-07-11 20:50:42 +02:00
Tomas Hozza c9c0e4c641 Fix using deadcode and possible use of NULL pointer
Fix for deadcode in unique_create() so that "opened_name" parameter is
always initialized to a valid string or NULL when returning from
function.

Fix for redirect_output() so that "logfile" is not blindly used in
fprintf() call and checked if it is not NULL.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2013-07-10 23:04:25 +02:00
Darshit Shah 9e0d87a248 Download response body data for all requests 2013-06-27 20:07:47 +02:00
Ciprian Vieru 6a2d67b583 Add HTML5 media tags to list of known tags and attributes 2013-06-25 23:49:03 +02:00
Ángel González 49f6d0ded8 Cleanup cmd_string_uppercase 2013-06-22 14:06:06 +02:00
Tim Ruehsen 4df7703d62 fix segfault in ftp.c (ftp_loop_internal) 2013-06-22 13:22:24 +02:00
Ray Satiro 9d35f87218 MinGW compatibility fixes 2013-06-16 22:55:38 +02:00
Darshit Shah 90896e3314 Follow RFC 2616 and httpbis specifications when handling redirects 2013-06-16 22:31:16 +02:00
Bykov Aleksey 5ce9389384 Removing "Could not open temporary WARC manifest file." issue in Win builds 2013-06-04 20:36:42 +02:00
Tim Ruehsen 099d8ee3da replaced read_whole_file() by getline() 2013-05-17 20:19:02 +02:00
Tim Ruehsen e976d4f3dc src/utils.c cleanup 2013-05-12 21:41:07 +02:00
mancha ae80fd2ec7 gnutls: do not abort on non-fatal alerts during handshake
Signed-off-by: mancha <mancha1@hush.com>
2013-05-06 22:52:13 +02:00
Darshit Shah 277785fa2a Fix issue when converting string to uppercase 2013-05-05 01:34:47 +02:00
Gijs van Tulder 52dd6da6e0 Keep the same method on a 307 redirect 2013-05-02 23:04:31 +02:00
Giuseppe Scrivano 550457bcad Fix crash when receiving a HTTP redirect upon a POST request
The crash was introduced by a recent commit.
2013-05-02 21:57:20 +02:00
Darshit Shah 54fd8de415 Improve output in case of --post-{file,body} commands. 2013-04-24 21:08:33 +02:00
Gijs van Tulder 81409cb9c8 Remove old reference to opt.post_data. 2013-04-23 22:02:29 +02:00
Gijs van Tulder 7df4b05f0b warc: Follow the guidelines for metadata records
Do not use the same UUID for the manifest and arguments records.
Write the manifest as a metadata record, not as a resource.
2013-04-14 14:01:01 +02:00
Darshit Shah 6c30653a1a Add a generic --method command to set a method in HTTP Requests.
Add supplementary --body-data and --body-file commands to send BODY Data.

Signed-off-by: Darshit Shah <darnir@gmail.com>
2013-04-14 12:57:58 +02:00
Gijs van Tulder edbeaa0c4e warc: correctly write the field length in the skip length field 2013-04-06 20:57:47 +02:00
Darshit Shah 50238e49b9 Make wget abort if --post-file does not exist
Signed-off-by: Darshit Shah <darnir@gmail.com>
2013-03-14 21:19:13 +01:00
Darshit Shah 6443581d72 Fix behaviour to match RFC 6265 on encountering domain mismatch. 2013-02-24 22:15:32 +01:00
Tim Ruehsen 3be7e0a53c fix --secure-protocol=SSLv2/SSLv3 2012-12-23 01:40:53 +01:00
Giuseppe Scrivano b56a528aea Do not honor --config only when used as first long argument 2012-12-09 17:04:57 +01:00
Giuseppe Scrivano dcf667fb57 Fix a build error with new gnulib versions. 2012-12-09 15:41:18 +01:00
Michael Stapelberg a2c0835007 Bugfix: Avoid double free of iri->orig_url
When accessing a URL using IDN which directly redirects to another page,
wget would xfree_null(iri->orig_url); in src/retr.c:retrieve_url()
first, then later xfree_null(iri->orig_url); in src/iri.c:iri_free()
again.

This can be tested with wget -O /dev/null http://μφ.net
2012-12-09 13:47:23 +01:00
Giuseppe Scrivano 3ebbd84518 warc: remove a magic number 2012-11-26 22:50:06 +01:00
Tim Ruehsen b60ff61b75 Added support for MD5-sess authentication 2012-11-25 18:16:20 +01:00
Ángel González 2c1e0326a3 Fix compilation under gcc -std=c89 2012-11-25 15:01:03 +01:00
Gijs van Tulder 359dd16760 warc: fix format string for off_t in CDX function. 2012-11-24 16:06:32 +01:00
Giuseppe Scrivano 1e229375aa warc: fix format string for off_t 2012-11-24 12:27:16 +01:00
Giuseppe Scrivano 4f09a3118f Fix comment 2012-11-15 00:35:17 +01:00
Giuseppe Scrivano b1838bdfd1 Fix -c with servers that don't specify a content-length
* retr.c (fd_read_body): Correctly check the return code from
write_data.
2012-11-13 23:58:04 +01:00
Rohit Mathulla 5dcb116087 Support shorthand URLs in an input file 2012-11-04 22:03:23 +01:00
Ray Satiro 242ddfc74e Change growable string object to null terminate
src/ChangeLog
src/url.c

@ src/url.c:

Any function directly writing to the members of a growable string
object must call append_null(). Functions that already do this I've
changed to call append_null(): shorten_length(), append_char(),
append_string(), append_uri_pathel().

- (append_null)
New function to null terminate a growable string object.

- (shorten_length)
New function to shorten the length of a growable string object.
2012-10-13 13:34:23 +02:00
Nikolay Merinov 13c6e7832a Recieve ftp listing even when .listing file exist and --no-clobber option is given. 2012-10-07 15:22:34 +02:00
Giuseppe Scrivano 22bd8011e8 Fallback to PATH_MAX when pathconf is not available 2012-10-07 13:09:56 +02:00
Giuseppe Scrivano fe401688a6 Fix a regression when -c and --content-dispositionn are used together. 2012-10-07 13:00:46 +02:00
Nikolay Merinov 022dbcb343 Support new WinNT ftp listing format 2012-09-30 18:18:38 +02:00
Tim Ruehsen 67e6027ea1 Add support for file names longer than MAX_FILE. 2012-09-29 13:47:53 +02:00
Steven Schubiger e9845d2813 Combine duplicated code. 2012-09-29 11:40:01 +02:00
Nguyễn Thái Ngọc Duy 74f6cb8884 Mark more strings for translation 2012-09-02 16:06:24 +02:00
Tim Ruehsen e2cb2fa2e3 don't error if CA directory is empty 2012-09-02 14:17:50 +02:00
Tim Ruehsen b718128b4f gnutls: deinit gnutls_x509_crt_t 2012-09-02 14:16:47 +02:00
Giuseppe Scrivano 06fc1edb54 Remove static modifier for functions used in other modules. 2012-08-28 21:38:12 +02:00
Hrvoje Niksic 85b98d0834 Use hash_table_get instead of hash_table_get_pair. 2012-08-26 11:48:07 +02:00
y-iida@secom.co.jp 4759cf099f Fix a build error. 2012-08-21 20:46:27 +02:00
Steven Schubiger 31674653eb Include missing header. 2012-07-08 11:36:54 +02:00
Steven Schubiger c32ef46f99 Fix header comments for exits.h and exits.c. 2012-07-08 11:30:53 +02:00
Tim Ruehsen 4fe805a7ec Add support for RFC 2617 Digest Access Authentication 2012-07-07 10:58:30 +02:00
Giuseppe Scrivano 172a117647 Fix some log messages. 2012-07-07 10:27:09 +02:00
Giuseppe Scrivano ae0598df9b Check for fclose errors. 2012-06-17 22:24:32 +02:00
Giuseppe Scrivano 90e9d9e1bd Move cleanup related code to `cleanup' 2012-06-16 12:20:33 +02:00
Giuseppe Scrivano 93720df4c8 Do not close stdout twice. 2012-06-16 12:15:03 +02:00
Giuseppe Scrivano aa2f287c68 help: Move --report-speed under 'Logging and input file'. 2012-06-09 13:13:28 +02:00
Giuseppe Scrivano 6b5c0c742d Rename, again, --reports-bits to report-speed. 2012-06-06 20:41:25 +02:00
Giuseppe Scrivano 96418c6885 Rename --bits to --report-bps. 2012-06-06 14:10:07 +02:00
Tim Ruehsen 321b5dce85 * fix a few little dissonances 2012-06-04 22:05:40 +02:00
Giuseppe Scrivano 6741bc4233 Revert 2b1dd8d23b 2012-06-02 19:36:45 +02:00
Gijs van Tulder 1d14c18d7f warc: Fix segfault if CDX record is not found. 2012-06-02 14:26:18 +02:00
Steven Schweda 2b1dd8d23b Guard inclusion of some headers. 2012-05-26 14:39:13 +02:00
Mike Frysinger 639a454528 warc: use the right type for the gzip stream 2012-05-26 14:05:56 +02:00
Giuseppe Scrivano 9cc514d21c Use the right type as result from readline. 2012-05-26 02:55:53 +02:00
Tim Ruehsen 370f96d36c gnutls: honor the specified timeout value
* gnutls.c (wgnutls_poll): Honor the specified `timeout' value.
(wgnutls_peek): Likewise.
2012-05-21 22:54:41 +02:00
illusionoflife e93bb4fa28 Remove unused arguments. 2012-05-20 21:02:25 +02:00
Giuseppe Scrivano 8ac9c05fc0 warc: Cut long lines to 80 columns. 2012-05-18 11:28:49 +02:00
Tim Ruehsen 2e86829809 removed 'const' warnings.
* hash.h (hash_table_put): Make argument "value" const.
* hash.c (hash_table_put): Make argument value const.  Cast `value' to
void.
* http.c (request_set_header): Make argument `name' const.  Cast `value'
and `name' to void*.
(request_remove_header): Make argument `name' const.
* url.c (url_file_name): Make `index_filename' static.
* warc.h (warc_write_cdx_record): Make `url', `timestamp', `mime_type',
`payload_digest', `redirect_location', `warc_filename', response_uuid'
arguments const. Make `checksum' const.
* warc.c (warc_write_date_header): Make the `timestamp' argument const.
Make `extension' const.
(warc_write_cdx_record): Make `url', `timestamp', `mime_type',
`payload_digest', `redirect_location', `warc_filename', response_uuid'
arguments const. Make `checksum' const.
2012-05-14 23:20:10 +02:00
Tim Ruehsen d19cc259cb gnutls: do not call fcntl in a loop.
* gnutls.c (wgnutls_read_timeout): removed warnings, moved fcntl stuff
outside loop.
2012-05-14 22:18:41 +02:00
Tim Ruehsen 0b4c04b583 gnutls: remove deprecated gnutls types. 2012-05-13 16:03:39 +02:00
Gijs van Tulder f5a1097871 Add support for -accept-regex and --reject-regex. 2012-05-09 21:18:23 +02:00
Tim Ruehsen 0aa3c5d33c Fix some compiler warnings. 2012-05-05 15:24:35 +02:00
Tim Ruehsen 378c203079 Use empty query in local filenames. 2012-04-24 21:46:06 +02:00
Tim Ruehsen c6889dab18 Fix a possible invalid `free'. 2012-04-22 18:36:09 +02:00
Tim Ruehsen 196f70a7df Silent compiler warning. 2012-04-21 13:48:18 +02:00
Tim Ruehsen 0fcd1bb235 Fix memory leak. 2012-04-21 12:19:25 +02:00
Tim Ruehsen f1d4aeaffb Fix memory leak. 2012-04-21 12:08:45 +02:00
Phil Pennock fd582e4543 Add support for TLS SNI 2012-04-13 23:58:46 +02:00
Tim Ruehsen bd4f1e6042 Fix a memory leak. 2012-04-13 21:35:29 +02:00
Daniel Kahn Gillmor 154d499be2 Enable client certificates when GNU TLS is used. 2012-04-07 14:43:12 +02:00
Gijs van Tulder 08a147c672 Fix a segfault on an incomplete STYLE tag. 2012-04-01 23:29:16 +02:00
Giuseppe Scrivano b30ba732ad gnutls: Fix a memory leak. 2012-04-01 16:30:59 +02:00
Giuseppe Scrivano 3bb17fca04 gnutls: do not access unitialized variable. 2012-04-01 16:26:44 +02:00
Tim Ruehsen 2541e0b579 warc: make warc_uuid_str implementation depend on HAVE_LIBUUID 2012-04-01 13:59:46 +02:00
Tim Ruehsen 2ffc383654 activate itimer support. 2012-03-29 20:13:27 +02:00
Giuseppe Scrivano 6533cf2452 Assume some headers files provided by gnulib are always present. 2012-03-25 17:49:55 +02:00
Ray Satiro 44ea82bc67 Fix build under mingw when OpenSSL is used. 2012-03-25 13:47:53 +02:00
Steven Schubiger 0ccaa999a2 Fix typo. 2012-03-08 10:00:51 +01:00
Sasikantha Babu b9b510ca5f Accept --bit option 2012-03-05 22:23:06 +01:00
Giuseppe Scrivano 04f29f2f08 Report stdout close errors. 2012-02-26 02:41:07 +01:00
Gijs van Tulder 6a25955fe6 warc: support large files. 2012-02-25 11:58:21 +01:00
Giuseppe Scrivano 408126aae0 Print some diagnostic messages to stderr not to stdout. 2012-02-23 11:56:44 +01:00
Giuseppe Scrivano bcc2abf116 Handle correctly some malloc failures. 2012-02-23 11:45:05 +01:00
Giuseppe Scrivano 611a219fb0 gnutls: Remove two unused variables. 2012-02-23 11:11:49 +01:00
Steven Schubiger c60530b369 warc: add license header. 2012-02-17 17:05:26 +01:00
Gijs van Tulder 6d67d793f5 Add support for chunks to the WARC outputter. 2012-01-28 14:09:29 +01:00
Gijs van Tulder 586ade4fb1 Fix memory leak. 2012-01-28 14:08:52 +01:00
Gijs van Tulder 0a8a898fbe Fix a linker error if zlib is not found. 2012-01-11 15:27:06 +01:00
Sasikantha Babu 5e1badae1e Properly format IPv6 addresses. 2012-01-09 00:03:23 +01:00
Gijs van Tulder 1316701791 Fix for gzip bug in WARC + zlib 1.2.4. 2011-11-20 18:28:19 +01:00
Steven Schweda eed850d938 warc: Fix a problem under OS X. 2011-11-05 11:52:51 +01:00
Steven Schweda 127036d3ec gnutls: fix memory leak. 2011-11-04 22:31:48 +01:00
Gijs van Tulder e3820953b2 Add support for WARC files. 2011-11-04 22:25:00 +01:00
Steven Schweda 8c7bd588fe Fix some problems under VMS. 2011-10-23 13:11:22 +02:00
Henrik Holst fce4e757a2 Add support for --content-on-error. 2011-10-06 13:25:17 +02:00
Giuseppe Scrivano 356fc9fc68 Fix typo in an inline comment. 2011-09-19 17:29:48 +02:00
Giuseppe Scrivano 91aeb7db2f Fix copyright year. 2011-09-19 17:29:33 +02:00
Giuseppe Scrivano bbe6b86c9e Return a network failure when FTP downloads fail and --timestamping is used. 2011-09-13 10:11:46 +02:00
Giuseppe Scrivano 19ef7249b8 Allow --timestamping and --continue at the same time. 2011-09-07 12:57:55 +02:00
Jakob Matthes c3a0c1a5b5 Do not exit prematurely when --help is passed. 2011-09-06 15:53:39 +02:00
Christian Jullien eb557e9e77 Fix a build problem under solaris. 2011-09-04 13:30:01 +02:00
Mojca Miklavec a25607f788 Now --version works again. 2011-09-02 13:37:10 +02:00
Giuseppe Scrivano d23ce97885 Fix some other problems with GNU TLS and non blocking sockets. 2011-08-30 16:43:25 +02:00
Giuseppe Scrivano 66bbc5bc63 Fix some problems with the GNU TLS backend and not-blocking sockets. 2011-08-29 16:21:45 +02:00
Giuseppe Scrivano a024990e18 Detect some failures when write to stdout fails. 2011-08-27 11:19:24 +02:00
Giuseppe Scrivano 5bcd75d32f gnutls: Honor read timeout. 2011-08-26 17:13:56 +02:00
Giuseppe Scrivano 547bcb0d3f Silent a compiler warning. 2011-08-26 12:37:17 +02:00