b3e383b123
Initial commit for the multi API
2022-10-08 13:19:20 +02:00
b8839418d0
* libwget/buffer_printf.c (read_precision,read_field_width): Use bool arg
2022-10-03 18:36:45 +02:00
76ebb467c2
* libwget/buffer_printf.c (copy_string): Use strnlen if precision is given
2022-10-03 18:33:32 +02:00
45f5033bb9
* libwget/buffer_printf.c (read_precision): Remove superfluous initialization
2022-10-03 17:43:38 +02:00
b89af6d0b8
Introduce XML function to decode entities
...
* include/wget/wget.h: Add wget_xml_decode_entities_inline().
* libwget/iri.c (iri_unescape_inline): Remove decoding of XML entities.
* libwget/xml.c: Add wget_xml_decode_entities_inline().
* src/wget.c (normalize_uri): Call wget_xml_decode_entities_inline().
2022-09-02 19:51:52 +02:00
9395dd4b79
Implement --check-certificate=quiet
...
* include/wget/wget.h: Add WGET_SSL_REPORT_INVALID_CERT macro
* libwget/ssl_gnutls.c: Change certificate related error_printf() calls, for error_printf_check()
* libwget/ssl_openssl.c: Consider the case WGET_SSL_REPORT_INVALID_CERT in wget_ssl_set_config_int()
* libwget/ssl_wolfssl.c: Change certificate related error_printf() calls, for error_printf_check()
* src/options.c: Admit quiet as a valid value on --check-certificate
* src/wget_options.h: Move check_certificate from bool to an enum type (with enabled, disabled and log_disabled as values)
2022-07-23 16:28:22 +02:00
471f263d5f
* libwget/ssl_gnutls.c (verify_certificate_callback): Fix -Werror=dangling-else
2022-07-23 16:25:23 +02:00
b89f8f8079
Handle comments in robots.txt correctly
...
* libwget/robots.c (wget_robots_parse): Check for # as terminator.
* unit-tests/test.c (test_robots): Fix tests, add new test for comments.
2022-07-02 12:53:01 +02:00
c8b7d61e73
* libwget/http_highlevel.c (stream_callback): Log 'Failed to fwrite' instead of 'Failed to write'
2022-07-01 19:02:41 +02:00
35e9246787
* libwget/net.c (wget_tcp_write): Log 'Failed to send' instead of 'Failed to write'
2022-07-01 19:02:07 +02:00
71ea8f8673
* libwget/bar.c: Redraw all slots of progress bar when resizing the window
...
* libwget/bar.c: Set minimum width to bar decorations size, to avoid crashing when resizing terminal
2022-06-26 12:04:17 +00:00
791affdaaa
Fix wget_buffer_trim() for strings with only whitespaces
...
* libwget/buffer.c: Don't access `start - 1`
* unit-tests/test.c: Add tests
Co-authored-by: Tim Rühsen <tim.ruehsen@gmx.de >
2022-06-26 13:45:17 +02:00
ed80255d82
Remove redunadnt memcpy() calls and refactor
...
* libwget/iri.c: Remove redundant memcpy() calls
* libwget/iri.c: Refactor
* libwget/dns_cache.c: Refactor
2022-06-26 13:08:10 +02:00
5e08ab0729
* libwget/http_parse.c: Fix sscanf return value check
2022-06-25 19:26:38 +02:00
0ed4616ad0
Refactor and fix code formatting
...
* libwget/vector.c: Refactor
* libwget/xml.c: Refactor
* tests/test-include-and-exclude-directories.c: Refactor
* tests/libtest.c: Fix code formatting
2022-06-25 14:09:39 +02:00
11eee8284d
Remove redundant checks and update docs
...
* libwget/list.c (wget_list_remove): Remove redundant checks
* libwget/list.c (docs): Specify that it's a circular doubly linked list
2022-06-25 14:03:36 +02:00
856c435aad
* libwget/cookie.c: Don't call memset if cookie_db arg is NULL
2022-06-25 14:01:02 +02:00
44f1bb7c4c
Remove memset() calls
...
* examples/batch_loader.c (main): Likewise
* examples/check_url_types.c (main): Likewise
* libwget/metalink.c (add_file_hash): Likewise
* src/wget.c (program_init): Likewise
2022-06-25 13:57:00 +02:00
607136d548
* libwget/ssl_openssl.c (wget_ssl_open): Silence sc_useless_cpp_parens
2022-05-27 10:52:56 +02:00
27d606baf3
* libwget/iri.c (wget_iri_get_escaped_resource): Fix escaping space in query part
...
Examples and explanation in https://gitlab.com/gnuwget/wget/-/issues/10
2022-05-21 19:58:22 +02:00
564d06bf4a
* libwget/ssl_openssl.c (wget_ssl_open): Check for X509_CHECK_FLAG_NEVER_CHECK_SUBJECT (introduced in OpenSSL >= 1.1)
2022-03-11 20:08:58 +01:00
395d540c27
* libwget/Makefile.am: Use libwget_libadd for *_LIBADD
2022-03-05 16:36:19 +01:00
486a0fbc88
* libwget/Makefile.am: Add INTL_MACOSX_LIBS to LIBADDs
...
Copyright-paperwork-exempt: Yes
2022-03-05 16:24:56 +01:00
0f554ef216
* */Makefile.am: Reorder link libraries (libgnu.la first)
2022-03-05 16:23:15 +01:00
64234eeef2
* libwget/http.c (wget_http_get_response_cb): Extend error messages with URL
2022-02-27 18:12:03 +01:00
2370be9273
* libwget/ssl_openssl.c (print_openssl_time): Use _() around error message
2022-02-25 19:17:10 +01:00
3dc7f71098
Update copyright year
2022-02-25 17:46:43 +01:00
95c1f90edd
* libwget/dns.c (wget_dns_cache_ip): Put '' around host/ip in error message
2022-02-20 19:14:46 +01:00
20a6046fca
Fix issue reported by scan-build
...
* include/wget/wget.h: /// -> //.
* libwget/netrc.c (unescape_password): Check wget_malloc() return against NULL.
* libwget/xml.c (wget_xml_parse_file): Likewise.
2022-02-19 14:35:40 +01:00
97afd2138d
Allow spaces and \ escaping in passwords in .netrc
...
This is Wget1.x compatible.
* docs/wget2.md: Document the new behavior.
* libwget/netrc.c (wget_netrc_db_load): Amended the code to allow \ and "".
* unit-tests/test.c (test_netrc): Add tests.
2022-02-13 19:27:42 +01:00
1c84c4127b
Fix obscure Windows (Win11) recv() issue (returns 0 without a reason)
...
* libwget/http.c (wget_http_get_response_cb): Continue HTTP/2 loop if recv()
return 0.
Fixes https://github.com/rockdaboot/wget2/issues/256
2022-01-21 17:57:46 +01:00
849b54eeed
* libwget/http.c (wget_http_get_response_cb): Amend debug output [skip ci]
2022-01-19 18:41:33 +01:00
d1ff6143f7
WolfSSL: Fix buffer overflow in SHA512 hashing
...
* libwget/hashfile.c (wget_hash_deinit, WOLFSSL): Include wolfssl/options.h.
2022-01-09 13:44:18 +01:00
7846a3d6c5
Fix deflate decompression when server omits the header
...
* libwget/decompressor.c (gzip_decompress): Retry decompression without header
2022-01-07 12:25:07 +01:00
104ea7431d
* libwget/Makefile.am: Remove -no-whole-archive (due to the previous commit reversion)
2022-01-03 14:27:56 +01:00
89b45801f8
Revert "build: Use -Wl,--no-whole-archive"
...
This reverts commit acfa50d31c .
2022-01-03 14:21:45 +01:00
54bbe8e12d
OpenSSL: OCSP: Be more realistic with update times
2022-01-02 14:26:25 +01:00
daba3a2094
* libwget/ssl_wolfssl.c: Comment out unneeded code
2022-01-01 19:02:31 +01:00
d3fcdf51ee
* libwget/ssl_wolfssl.c (wget_ssl_open): Fix memory leak
2022-01-01 18:42:54 +01:00
1d260ecfef
Add support for unquoted HTML attribute values
...
* libwget/xml.c (getHTMLValue): New function.
(getValue): Call getHTMLValue if parsing HTML.
* tests/test-base.c: Use an unquoted HREF value to trigger the new code.
2022-01-01 17:55:36 +01:00
8c0d48fc6a
* libwget/ssl_gnutls.c (check_ocsp_response): Print issue and update time
2022-01-01 17:38:48 +01:00
da11916b57
* libwget/ssl_openssl.c: Code cleanup
2022-01-01 15:44:35 +01:00
8019021604
* libwget/ssl_openssl.c (check_ocsp_response): Fix OCSP checks
2022-01-01 15:27:47 +01:00
f84b838ade
* libwget/ssl_openssl.c: Use SHA-1 for OCSP signature
2021-12-30 19:17:59 +01:00
5c38bb0a25
* libwget/ssl_openssl.c: Continue after OCSP failed other than REVOKED
2021-12-30 19:03:29 +01:00
2b26d53b8d
* libwget/ssl_openssl.c (read_ocsp_uri_from_certificate): Free string stack after use
2021-12-30 18:50:19 +01:00
8e2589030d
* libwget/ssl_openssl.c (read_ocsp_uri_from_certificate): Rewrite implementation of OCSP URI retrieval
2021-12-30 17:23:08 +01:00
408f2220c1
* libwget/ssl_openssl.c (check_cert_chain_for_ocsp): Fix number of ignored OCSP responses
2021-12-30 16:41:53 +01:00
d93f7ff71a
openssl: Do not check max time in stapled OCSP
2021-12-30 12:28:13 +01:00
992cd5fbfd
* libwget/http_parse.c (wget_http_parse_response_header): Use keep-alive for HTTP/1.1 and higher as default
2021-12-29 12:54:22 +01:00