Commit Graph

3323 Commits

Author SHA1 Message Date
04b2b54377 libwget/ssl_wolfssl.c (wget_ssl_init): Use wolfSSL_CTX_load_system_CA_certs() 2024-01-06 19:00:29 +01:00
1bab5454f9 Fix IPv6 address representation
* libwget/dns.c (resolve): Fix IPv6 in debug message,
  (wget_dns_cache_ip): Fix IPv6 in error message,
  (wget_dns_resolve): Fix IPv6 in debug message.
* libwget/dns_cache.c (wget_dns_cache_get): Fix IPv6 in debug message.
* libwget/hsts.c (hsts_db_add_entry): Fix IPv6 in debug message.
* libwget/http.c (wget_http_create_request): Fix IPv6 in Host header,
  (establish_proxy_connect): Fix IPv6 in CONNECT and in Host header.
* libwget/ip.c (wget_ip_is_family): Cosmetic change.
* libwget/iri.c (wget_iri_get_connection_part): Fix IPv6 in URL creation.
* libwget/net.c (debug_addr): Fix IPv6 in debug message.
* src/options.c (stats_callback_dns): Fix IPv6 in output.
* src/wget.c (test_modify_hsts): Fix IPv6 in console output,
  (http_create_request): Fix IPv6 in Referer header.
* unit-tests/test.c (test_iri_parse): Add two IPv6 parsing tests.
* libwget/Makefile.am (libwget_dnscache.la): Link with libwget_ip.la,
  (libwget_hsts.la): Link with libwget_ip.la.
2023-12-17 18:52:27 +01:00
1c2e2d69a2 * src/options.c (parse_restrict_names): Avoid false positive for -Wjump-misses-init 2023-12-03 18:54:23 +01:00
fa75072eb4 * src/utils.c (wget_restrict_file_name): Remove forgotten info_printf() 2023-12-03 18:44:00 +01:00
2849545536 Fix --restrict-file-names to be backwards compatible wot wget 1.x
* src/options.c (parse_restrict_names): Allow comma-separated list of arguments.
* src/utils.c (wget_restrict_file_name): Support combinations of modes.
2023-12-03 12:32:10 +01:00
ae24f83fd0 * libwget/netrc.c (wget_netrc_db_load): Add fetchmail compatibility (user and passwd) 2023-11-26 19:01:30 +01:00
8271687e29 Rename internal functions 2023-11-18 18:45:35 +00:00
b23c934422 Rename internal functions 2023-11-18 18:45:35 +00:00
a6ab8a1d0c Remove empty guard 2023-11-18 18:45:35 +00:00
0aa23dfc79 Fix NULLABLES 2023-11-18 18:45:35 +00:00
abaa0f6b66 Update POTFILES 2023-11-18 18:45:35 +00:00
829528217c Extract common HTTP functions
* libwget/http.h: new functions wget_http_connection_is_aborted,
   wget_http_fix_broken_server_encoding,
   wget_decompress_get_body_cb, wget_decompress_error_handler_cb,
   wget_http2_open, wget_http2_close, wget_http2_send_request,
   wget_http2_get_response_cb
 * libwget/http2.c: new file
2023-11-18 18:45:35 +00:00
ec77b3ebf0 * libwget/http_parse.c: Make http_isseparator an inline function 2023-11-17 20:00:00 +01:00
7014ef7a51 * unit-tests/test.c: Add tests for wget_http_parse_full_date() 2023-11-17 19:40:51 +01:00
7bf93ff6c6 Add support for another non-standard cookie timstamp format
- example: Sun Nov 26 2023 21:24:47

* libwget/http_parse.c (wget_http_parse_full_date): Parse additional format.
2023-11-17 19:39:25 +01:00
c062ce984a * Makefile.am: Fix lcov command line 2023-11-04 18:59:14 +01:00
cabedf3847 * .gitlab-ci.yml (pages): Install libcapture-tiny-perl and libdatetime-perl 2023-11-04 18:58:32 +01:00
1a886595e6 Add libproxy support
Add support for libproxy, which is capable to extract desktop
environment proxy configurations from dozens of systems and platforms.
This also enables wget to handle pac/wpad proxy server.

* configure.ac: Add check for libbproxy.
* libwget/http.c (wget_http_open): Retrieve proxy via libproxy.

Copyright-paperwork-exempt: Yes
2023-11-04 16:02:45 +00:00
3c61c41645 * src/wget.c: Fix minor typo comment 2023-11-04 17:02:29 +01:00
0415d036b3 Fix minor typos in comments 2023-11-04 14:36:43 +01:00
045976cf8f Add instructions on how to build wget2.exe
* ../README.md: Add new section.
* Dockerfile.win32.static: Remove cp command.
2023-10-31 20:20:10 +01:00
64c854b402 * README.md: Add table of contents
Copyright-paperwork-exempt: Yes
2023-10-31 11:14:49 +01:00
4eb06ba02d * src/wget.c: Fix typos in comments 2023-10-31 11:03:53 +01:00
cbe2875a3c * cfg.mk: Fxuix 'make syntax-check' 2023-10-29 17:28:50 +01:00
089520564f * src/wget.c (http_create_request): Use 'Accept: */*' for single file downloads 2023-10-21 19:32:41 +02:00
d77205a092 * .gitlab-ci.yml (MinGW64-static): Add configure flag --enable-threads=windows
This allows multi-threading on Windows.
2023-10-20 20:27:23 +02:00
7e82d2839c * gitlab-ci.yml: Enable Gitlab SAST 2023-10-03 19:27:47 +02:00
75775a77e9 * libwget/ssl_openssl.c (tls_exit): Fix syntax-check 2023-10-03 18:10:39 +02:00
c569c7f4f8 * libwget/http.c: Fix NULLABLE issues 2023-10-03 18:03:00 +02:00
d7afffb981 * libwget/cookie.c: Fix NULLABLE issues 2023-10-03 17:53:08 +02:00
56d77a8a30 * libwget/metalink.c (add_mirror): Fix NULLABLE issue 2023-10-03 17:51:03 +02:00
75dc1467e0 * libwget/cookie_parse.c: Fix NULLABLE issues 2023-10-03 17:49:26 +02:00
4f85f69837 * libwget/html_url.c (html_get_url): Fix NULLABLE issue 2023-10-03 17:46:58 +02:00
c9d57f0577 * libwget/hpkp_db.c: Fix NULLABLE issues 2023-10-03 17:44:53 +02:00
61ba540ea6 * libwget/hpkp.c: Fix NULLABLE issues 2023-10-03 17:42:08 +02:00
2156dca17e * libwget/css_url.c (urls_to_absolute): Silence clang nullability checks 2023-10-03 17:34:01 +02:00
0b5be69ecd * libwget/ssl_gnutls.c (wget_ssl_open): Check ctx for NULL 2023-10-03 17:28:28 +02:00
6836b7d873 * libwget/ssl_openssl.c (tls_exit): Don't call CRYPTO_free_ex_index() when build with LibreSSL 2023-09-30 20:02:23 +02:00
43c2976d7d * cfg.mk: Exclude docs/announce*.txt from trailing blank check 2023-09-24 20:16:15 +02:00
7449d63e17 announce: Remove trailing spaces
Trailing spaces are causing the first stage of the pipeline to fail.
2023-09-11 10:26:38 +02:00
a8d241db63 fuzz: Fix http_client fuzzer
Properly free the addrinfo structs, assuming there could be more than
one.
2023-09-07 19:55:49 +02:00
4b872ad601 dns: Merge SOCK_STREAM and SOCK_DGRAM addrinfo lists
We want resolve() to return both, TCP and UDP sockets.

On Linux, we could set .ai_socktype = 0 on the getaddrinfo() hints which
would return us all the socket types available. However, that is not
accepted on Windows. Instead, we ask for TCP and UDP sockets separately
and then merge the two lists.
2023-09-07 19:55:49 +02:00
e3f039a4eb * contrib/release: Fix GPG key selection 2023-08-31 16:38:05 +02:00
0db6e34558 * contrib/mk_authors: Use previous tag instead of current release tag" 2023-08-31 16:20:32 +02:00
b5a3348997 Fix typos
* NEWS: HTMP -> HTML.
* docs/announce_2.1.0.txt: Likewise.
2023-08-31 16:17:47 +02:00
657e3d22c4 Release v2.1.0 v2.1.0 2023-08-31 14:46:39 +02:00
15ba1db248 Update copyrights 2023-08-31 12:57:30 +02:00
fa2f03cbe5 * libwget/dns.c (resolve): Restrict socket type to SOCK_STREAM on Windows 2023-08-31 12:40:57 +02:00
3fb56d60ff Fix parsing HTMP/XML entities in URLs from HTML/XML
* libwget/xml.c (wget_xml_decode_entities_inline): Fix decoding of &#dddd; and &#xhhhh;.
* tests/test-base.c (main): Add test case for &#dddd; and &#xhhhh;.

Reported-by: Michael Roosz
2023-08-27 20:38:17 +02:00
bb20093f02 dns: Return all kinds of socket types available
The resolve() function only returned SOCK_STREAM (TCP) sockets. We lift
that limitation here, such that it will now return all socket types
available in the system, both SOCK_STREAM and SOCK_DGRAM. And we let the
calling function choose the socket type they want. We make this change
to adapt for the upcoming QUIC code, which works entirely over UDP.

 * libwget/dns.c (resolve): Remove SOCK_STREAM constraint, return all
   kinds of sock types available.
 * libwget/net.c (wget_tcp_connect): select SOCK_STREAM socket types
   only
   (tcp_connect): new function to establish TCP connections.
2023-08-23 11:00:17 +02:00