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

210 Commits

Author SHA1 Message Date
Ander Juaristi
b60131a399 Added support for HSTS.
* Makefile.am: Added new source files hsts.c and hsts.h.
 * http.c (parse_strict_transport_security): new function for STS header
   parsing.
   (gethttp): update the HSTS store.
 * http.h: new include "hsts.h".
 * init.c: new options --hsts and --hsts-file.
 * main.c (get_hsts_database, load_hsts, save_hsts): new functions.
   New options --no-hsts and --hsts-file added to help.
   (main): load and save HSTS store.
 * options.h: new variables for supporting --hsts and --hsts-file.
 * retr.c (retrieve_url): rewrite the URI according to the HSTS policy before
   entering http_loop.
 * test.c, test.h: new unit tests for HSTS.
 * utils.c, utils.h (countchars): new function.
 * wget.h: new preprocessor check.
 * hsts.c, hsts.h: new files with the HSTS engine implementation.

Added support for HTTP Strict Transport Security (HSTS), as defined by RFC
6797.
2015-07-20 15:55:57 +02: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
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
Darshit Shah
4b845615fa Define MIN and MAx macros in a single location
MIN and MAx are macros that a developer will universally expect
throughout the source. Yet, they were being defined in multiple places
across the source. Instead, define them in a single location in the
common wget.h header file and use them consistently everywhere.
2014-12-04 18:36:54 +05:30
Tim Ruehsen
4850e9c873 Replaced xfree_null() by xfree() and nullify argument after freeing. 2014-12-01 16:15:37 +01:00
Darshit Shah
3e609a1192 Replace all occurences of free() with xfree() 2014-11-27 11:11:34 +05:30
Tim Rühsen
255133326b Fix possibly uninitialized variable 2014-11-24 12:00:21 +01:00
Tim Rühsen
3c51ad7f02 Removed form feeds from sources and NEWS 2014-11-20 16:35:34 +01:00
Darshit Shah
d9f21b4b95 Aesthetic changes to progress bar 2014-11-20 16:43:47 +05:30
Tim Rühsen
1356e90a14 Trivial fixes for C89 compliancy 2014-11-20 09:56:57 +01:00
Tim Rühsen
148065bc00 content for commit 6092205538 2014-10-29 16:18:01 +01:00
Tim Rühsen
8c2d9afd08 fixed memleak in retrieve_url() 2014-09-30 20:50:06 +05:30
Giuseppe Scrivano
8e6de1fb5f Drop usage of strncpy 2014-06-12 18:49:13 +02:00
Darshit Shah
8624553a31 Whitespace and formatting changes.(Aesthetic only)
This commit makes lots of whitespace only changes. It has been ensured that this
commit does not make any changes to the functioning of the program. The only
changes that have been made are:
    * Remove trailing whitespaces
    * Convert tabs to spaces
    * Fix indentation issues in the code
    * Other aesthetic changes to the formatting of comments
2014-05-30 21:12:57 +05:30
Tim Ruehsen
38a7829dcb Fix compiler warnings 2014-05-12 12:18:50 +02:00
Darshit Shah
8c2fd06ba8 Add --show-progress to force display progress bar
This is a relatively large commit that implements two major features:

1. Implement --show-progress switch to force the display of the progress bar in
   any verbosity level
2. Edit the implementation of the progress bar so that the filename is displayed
   in the same line.
2014-05-01 01:07:43 +02:00
Steven M. Schweda
eee1589ef3 vms: support --backups 2013-07-13 13:36:54 +02:00
Darshit Shah
90896e3314 Follow RFC 2616 and httpbis specifications when handling redirects 2013-06-16 22:31:16 +02:00
Gijs van Tulder
52dd6da6e0 Keep the same method on a 307 redirect 2013-05-02 23:04:31 +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
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
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
Giuseppe Scrivano
96418c6885 Rename --bits to --report-bps. 2012-06-06 14:10:07 +02:00
illusionoflife
e93bb4fa28 Remove unused arguments. 2012-05-20 21:02:25 +02:00
Sasikantha Babu
b9b510ca5f Accept --bit option 2012-03-05 22:23:06 +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
e3820953b2 Add support for WARC files. 2011-11-04 22:25:00 +01:00
Giuseppe Scrivano
706871e92e Do not define max twice. 2011-08-13 10:44:40 +02:00
Giuseppe Scrivano
1e09ee5ea8 Do not register redirects when in spider mode. 2011-07-26 12:42:40 +02:00
Giuseppe Scrivano
f90ca4e54a Parse URLs read from a file. 2011-06-08 11:32:34 +02:00
Giuseppe Scrivano
544f0d478a Fix indentation. 2011-06-05 14:31:24 +02:00
Giuseppe Scrivano
00723a80f1 Define max 2011-05-24 11:13:04 +02:00
Giuseppe Scrivano
3fb4d068a7 Avoid a small buffer when retrieving a file. 2011-05-23 20:27:42 +02:00
Filipe Brandenburger
e219e587b3 Support HTTP/1.1 307 redirects keep request method. 2011-03-03 14:02:25 +01:00
Giuseppe Scrivano
2f6aa1d741 mass change: update copyright years. 2011-01-01 13:19:37 +01:00
Giuseppe Scrivano
9ae052b1e2 Remove redundant guard. 2010-12-01 13:15:13 +01:00
Giuseppe Scrivano
334a8e9027 Convert a static local buffer to be allocated dinamically. 2010-12-01 12:47:30 +01:00
Giuseppe Scrivano
c5dc4d1664 Remove unnecessary code. 2010-10-21 13:27:31 +02:00
Giuseppe Scrivano
542c549985 Silent warnings reported by clang. 2010-10-16 03:04:25 +02:00
Giuseppe Scrivano
3e25a9817f Introduce --trust-server-names. Close CVE-2010-2252. 2010-07-28 21:22:22 +02:00
Giuseppe Scrivano
293008f682 Mass update copyright years. 2010-05-08 21:56:15 +02:00
Giuseppe Scrivano
1cee086162 Support HTTP/1.1. 2010-05-01 22:34:11 +02:00
Steven Schubiger
a801efcd96 Don't delete an input file fetched via FTP. 2010-03-04 22:09:31 +01:00
Steven Schubiger
33d8b23dfd Check stricter for supported URL scheme. 2010-03-02 21:41:32 +01:00
Steven Schubiger
f391a5b5b0 Fix memory leak in retrieve_from_file. 2010-03-02 20:35:02 +01:00
Steven Schubiger
ec6950f1a6 Make -i work with FTP. 2010-03-02 00:00:17 +01:00