Commit Graph

3317 Commits

Author SHA1 Message Date
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
33a6454aa7 gcc specific C constructor/destructors support for MSVC
* libwget/private.h: Define INITIALIZER to support constructors with MSVC.
* libwget/dns.c: Use INITIALIZER for library constructor.
* libwget/http.c: Likewise.
* libwget/init.c: Likewise.
* libwget/random.c: Likewise.
* libwget/ssl_gnutls.c: Likewise.
* libwget/ssl_openssl.c: Likewise.
* libwget/ssl_wolfssl.c: Likewise.

Co-authored-by: Tim Rühsen <tim.ruehsen@gmx.e
2023-08-18 20:40:02 +02:00
dc13592997 * AUTHORS: Set Mitch Capper to ASSGN [skip ci] 2023-08-18 16:23:00 +02:00
3595963416 Add better default cert/bundle paths for Windows
* include/wget/wget.h: New function wget_ssl_default_cert_dir,
  new function wget_ssl_default_ca_bundle_path.
* libwget/Makefile.am: Add ssl.c.
* libwget/ssl.c: New file for common ssl/tls code.
* libwget/ssl_gnutls.c (tls_init): Initialize cert paths.
* libwget/ssl_openssl.c (tls_init): Likewise.
* libwget/ssl_wolfssl.c (tls_init): Likewise.
* src/options.c (struct config): Init ca_cert,
  (init): Allocate / dup config.ca_cert.

Co-authored-by: Tim Rühsen <tim.ruehsen@gmx.d
2023-08-18 12:40:27 +02:00
f67ca61ab1 * src/options.c (print_version): Work around MSVC preprocessor issue 2023-08-18 10:44:34 +02:00
d735738d73 Don't enable debug logging with wolfssl unless defined prior to including the options file
* libwget/ssl_wolfssl.c: Test for DEBUG_WOLFSSL
2023-08-15 22:43:21 +02:00
f0ef9f4c01 * .gitlab-ci.yml: New stages 2023-08-05 23:22:55 +02:00