f561b176cb
* m4/wget_manywarnings.m4: Call gcc instead of gcc
2017-03-29 17:12:56 +02:00
cc355a30bb
* m4/wget_manywarings.m4: Add extra options only for gcc >= 6
2017-03-29 16:48:34 +02:00
7171aff7e8
Use atoll() instead of atol() for time_t variables
...
* libwget/cookie.c: Use atoll() instead of atol()
* libwget/hsts.c: Likewise
* libwget/http.c: Likewise
* libwget/ocsp.c: Likewise
* libwget/tls_session.c: Likewise
* libwget/hpkp.c: Change type of maxage from long to time_t
2017-03-29 16:18:26 +02:00
7d6a1935a7
* .travis.sh: Set CFLAGS to '-O0 -g'
2017-03-29 12:26:37 +02:00
706b19648f
Read and write time_t as long long int
...
* libwget/cookie.c: Write time_t as long long int
* libwget/hsts.c: Likewise
* libwget/ocsp.c: Likewise
* libwget/tls_session.c: Likewise
* libwget/hpkp.c: Read and write time_t as long long int
Reported-By: Tim Rühsen
2017-03-29 11:58:51 +05:30
e276d99b8d
Prevent a NULL pointer dereference
...
* src/options.c (parse_header): Prevent derefencing a potential NULL
pointer
Reported-by: Coverity Scan (cid: 165230)
2017-03-28 13:23:58 +02:00
52e7349c12
Fix resource leak
...
* libwget/http.c (_on_header_callback): Prevent leaking memory when
there is an empty HTTP2 response
Reported-by: Coverity Scan (cid: 165231)
2017-03-28 13:23:55 +02:00
07f97dde0c
Prevent resource leak
...
* src/wget.c (_normalize_uri): Prevent leaking resource urlpart when the
url is just "#".
Reported-by: Coverity Scan (cid: 165232)
2017-03-28 13:01:38 +02:00
7d2eb91b1c
Skip IDNA tests when IDNA not available
...
* libwget/encoding.c: Fix #ifdef
* tests/test-idn-cmd.c: Skip if IDNA not available
* tests/test-idn-meta.c: Likewise
* tests/test-idn-robots.c: Likewise
* tests/test.c (test_iri_parse): Skip IDN test
2017-03-27 21:51:42 +02:00
1de7114a15
* examples/check_url_types.c: Move #include <signal.h> further to the top
2017-03-25 21:05:21 +01:00
4d7238e282
Fix vpath builds
...
* examples/Makefile.am: Add -DWGETVER_FILE to AM_CPPFLAGS
* libwget/Makefile.am: Likewise
* src/Makefile.am: Likewise
* tests/Makefile.am: Likewise
* include/wget/wget.h: Include WGETVER_FILE if defined
2017-03-25 20:49:41 +01:00
62a41fbd2d
Fix regression regarding chunked transfer-encoding
...
* libwget/http.c (wget_http_get_response_cb): Save data when chunk
complete in one data packet.
* tests/Makefile.am: Add new test 'test-chunked'
* tests/test-chunked.c: New test
2017-03-25 20:35:05 +01:00
1d52ade444
* libwget/encoding.c: Include idn-free.h on _WIN32
2017-03-23 16:44:47 +01:00
3ad7f8991c
* libwget/xalloc.c (wget_calloc): Init *p explicit (_noreturn issue)
2017-03-23 16:35:39 +01:00
fb37b457d0
* libwget/xalloc.c (wget_realloc): Initialize variable p to NULL
2017-03-23 14:48:34 +01:00
3005824e71
Fix misuse of libidn & libidn2 memory
...
* libwget/encoding.c (wget_str_to_ascii):
Free libidn memory with idn_free(),
Free libidn2 memory with idn2_free()
2017-03-23 14:33:11 +01:00
12d4cafa2d
Fix chunk overflow in HTTP download for 32bit systems
...
* libwget/http.c: Check for pointer overflow
* tests/test-bad-chunk.c: Adjust tests
Reported-by: Dagobert Michelsen
2017-03-23 11:25:21 +01:00
cd88f68f44
* libwget/random.c: Include process.h on Windows
2017-03-21 12:56:45 +01:00
13371152f8
Fix console colors for Windows
...
* include/wget/wget.h: Add WGET_CONSOLE_COLOR_MAGENTA
* libwget/console.c: Add WGET_CONSOLE_COLOR_MAGENTA
* src/log.c: Add colors to write functions
Reported-by: Gisle Vanem
2017-03-21 12:54:54 +01:00
e7a982f799
* libwget/html_url.c (_html_get_url): Fix commented info_printf line
2017-03-21 10:32:11 +01:00
d1fdf96631
* src/options.c: Do not include wordexp.h
2017-03-21 10:27:17 +01:00
e41ae5298a
* libwget/console.c (wget_console_set_fg_color): Fix WIN32 code
2017-03-21 10:25:34 +01:00
b273dd5c6c
NEWS: Mention brotli compression support
2017-03-21 10:24:46 +01:00
8610300d78
Use IDNA2008 + TR46 non-transitional for IRIs
...
* libwget/encoding.c: Fix unistring includes,
(wget_str_to_ascii): Check for libidn2 version
* src/options.c (init): Remove "unistring" output for --version
2017-03-20 09:59:37 +01:00
bca903813c
* tests/test-k.c: Test link within <script> tag
2017-03-13 10:00:53 +01:00
4d8ad5685e
Update AUTHORS and NEWS
2017-03-10 17:14:28 +01:00
a6900631fe
Check NULL value param in wget_iri_escape()
...
* include/wget/wget.h: Remove G_GNUC_WGET_NONNULL_ALL from wget_iri_escape
* libwget/iri.c (wget_iri_escape): Check 'src' for NULL value
2017-03-10 17:12:25 +01:00
5d6dc7c9f0
* examples/check_url_types.c (html_parse): Fix possible crash
2017-03-10 17:11:23 +01:00
d7385604b5
Check for invalid 'BASE' URLs in HTML
...
* src/wget.c (html_parse): Check if 'base' parses correctly
* tests/test-base.c: Add test with invalid base URL
2017-03-09 11:37:49 +01:00
64cfea7f05
* libwget/tls_session.c: Make code similar to hsts.c
2017-03-08 12:18:28 +01:00
582c27e1b0
* libwget/hpkp.c: Make code similar to hsts.c
2017-03-08 12:05:18 +01:00
c415b03df6
* libwget/hsts.c: Be compliant with Wget 1.x
2017-03-08 11:45:24 +01:00
1a56fadd98
* libwget/hpkp.c (wget_hpkp_db_add): NULLify freed pointer
2017-03-08 11:10:37 +01:00
6fe7c234fa
* libwget/ssl_gnutls.c: Improve msg for invalid OCSP stapling status
2017-03-07 15:22:25 +01:00
0c6cf2a630
Fix .netrc parsing
...
* include/wget/wget.h (_wget_netrc_db_st): Rename .key to .host
* libwget/netrc.c (wget_netrc_db_add): Fix parsing
* tests/test.c: New function test_netrc()
2017-03-07 13:17:46 +01:00
08ba27aaad
* src/wget.c (process_response_header): Fix formatting
2017-03-07 11:16:46 +01:00
ac8bdc9d22
* libwget/ssl_gnutls.c (_verify_certificate_callback): Use GnuTLS error printing
2017-03-05 21:50:54 +01:00
79350f1dfd
* libwget/hpkp.c (_hpkp_db_load): Fix parsing host entries
2017-03-05 21:47:48 +01:00
7d8539eca0
* tests/test.c: Remove call of wget_hpkp_set_port()
2017-03-04 18:59:28 +01:00
79667f113d
Remove port from HPKP code
...
* include/wget/wget.h: Remove wget_hpkp_set_port()
* libwget/hpkp.c (struct _wget_hpkp_st): Remove 'port'
* src/wget.c (process_response_header): Do not call wget_hpkp_set_port()
2017-03-04 18:32:22 +01:00
e07854949e
Add examples/check_url_types.c
...
* examples/Makefile.am: Add rule for examples/check_url_types
* examples/check_url_types.c: New file
This adds a Alexa top-X scanner to find out the numbers of
http:// links in landing pages retrieved via https://.
It follows and counts redirections separated by secure and insecure
ones, flags if the landing page was completely secure, counts links
in the landing HTML page (same-page, external, http, https).
2017-03-03 17:07:42 +01:00
b4e305a1c2
* libwget/http_highlevel.c (wget_http_get): Do not loop forever on repeating 401 responses
2017-03-03 17:05:50 +01:00
047e45f2f5
* libwget/ssl_gnutls.c (_verify_certificate_callback): Fix #ifdefs
2017-03-03 16:23:52 +01:00
01d445b8db
Fix crash on unexpected server PUSH PROMISE (http/2)
...
* libwget/http.c (_on_frame_recv_callback): Check for valid context,
(_on_header_callback): Likewise
2017-03-03 11:57:14 +01:00
e01926d2e2
Allow new 'expires' format for Set-Cookie header
...
* libwget/http.c (wget_http_parse_full_date): Allow format
'1 Mar 2027 09:23:12 GMT'
* tests/test.c (test_cookies): Test new format
2017-03-03 10:45:01 +01:00
4a7cebd3fa
* libwget/http.c (_on_frame_recv_callback): Fix decompressor init
2017-03-01 16:29:40 +01:00
96c8e81f81
* libwget/init.c (wget_global_deinit): Free more resources
2017-03-01 16:28:41 +01:00
877f5392f2
* gnulib: Update
2017-03-01 12:30:03 +01:00
07b4c4623e
Fix URL encoding issue in requests
...
* libwget/iri.c (wget_iri_escape_query): Do not escape ampersand,
(wget_iri_get_escaped_resource): Use wget_iri_escape_query()
* tests/test-base.c: Add test URLs with spacing in path, query and param
2017-02-28 17:02:35 +01:00
ec396c577f
Fix URLs to HTTPS where possible
2017-02-28 15:31:30 +01:00