Commit Graph

3161 Commits

Author SHA1 Message Date
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
c43d1d8f29 * fuzz/Makefile.am: Add -lz to fuzzer libs 2022-09-24 19:42:15 +02:00
bca5582840 Fix spelling Warmup -> Warm-up
* benchmarks/benches/http1.sh: Likewise
* benchmarks/benches/http2.sh: Likewise
2022-09-04 15:10:41 +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
2661ab6d47 Support compilation of wget.h from C++
* include/wget/wget.h: Replace restrict with __restrict

Copyright-paperwork-exempt: Yes
2022-08-14 15:07:58 +02:00
c6abd27da0 * .gitlab-ci.yml (MinGW64): Set CFLAGS to $CFLAGS_DEFAULT 2022-08-14 14:51:03 +02:00
94e9486ad1 * src/bar.c (bar_deinit): Fix segfault (joining not initialized thread) 2022-08-14 14:50:38 +02:00
dcad432329 * tests/valgrind-suppressions: Suppress memleak in gpgme_data_new_from_mem() 2022-08-14 14:48:50 +02:00
4f12e73bbf * bootstrap.conf: Remove obsolete module strpbrk 2022-08-07 12:31:22 +02:00
8e2b81911f * contrib/spell-checker: Fix some shellcheck issues [skip ci] 2022-07-23 18:19:29 +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
8e3f5136bd * .gitlab-ci.yml (Minimal/Debian): Fix configure flag 2022-07-23 16:24:33 +02:00
2f55a2a1ca * unit-tests/test.c (test_robots): Fix test error message [skip ci] 2022-07-23 15:53:33 +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
7f2db0c398 Fix status code for 5xx errors
* src/wget.c (process_response_header): Set EXIT_STATUS_REMOTE on 5xx.
* tests/test-i-https.c: New test to check 503 behavior.
* tests/test-wget-1.c: Likewise.
2022-07-01 18:19:42 +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
abbc27c9f1 * fuzz/libwget_http_client_fuzzer.c: Silence clang warning 2022-06-26 14:01:12 +02:00
724c72d5a4 * .gitlab-ci.yml: Add scan-build for make check 2022-06-26 13:50:04 +02: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
8892867db0 * examples/getstream.c: Initialize array to avoid strduping random memory 2022-06-26 13:03:50 +02:00
5e08ab0729 * libwget/http_parse.c: Fix sscanf return value check 2022-06-25 19:26:38 +02:00
24c7691fa0 * unit-tests/test.c (check): Exit if any of the basic tests fail
Found-by: scan-build
2022-06-25 19:25:11 +02:00
c4e9c0966d * unit-tests/test.c (test_buffer): Add new test 2022-06-25 19:21:36 +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
aa14732645 * .gitignore: Ignore all executables in libwget/ 2022-06-25 13:56:19 +02:00
b22e6b8b07 * examples/Makefile.am: Remove linking of libgnu.la 2022-06-25 13:38:31 +02:00
a398b78e15 * Add -Wno-declaration-after-statement to clang-14+ manywarnings 2022-06-25 13:30:01 +02:00
8bbb852eca * src/wget.c (convert_links): Remove unused loop variable 2022-06-18 16:59:44 +02:00
660b313118 * configure.ac: Add -Wno-declaration-after-statement to clang-15 manywarnings 2022-06-18 16:59:00 +02:00
586ecf7cde * configure.ac: Drop -Wc90-c99-compat -Wlong-long from manywarnings (gcc-12) 2022-06-18 16:51:07 +02:00
89f7b8fde6 * docs/wget2.md (--progress): Fix the docs for --progress 2022-06-12 20:03:59 +02:00
f7fe3e78d2 * src/options.c (parse_progress_type): Improve Wget compatibility 2022-06-12 20:00:56 +02:00
d1f2858720 * src/options.c (config): Use PROGRESS_TYPE_BAR as default 2022-06-12 19:28:03 +02:00
5e76805748 Add defines for PROGRESS_TYPE_(BAR|NONE)
* src/bar.c: Make use of PROGRESS_TYPE defines.
* src/wget.c: Likewise.
* src/wget_bar.h: Define PROGRESS_TYPE_BAR and PROGRESS_TYPE_NONE.
2022-06-12 19:26:06 +02:00
c355efb7c8 * docs/wget2.md: Fix .wgetrc to .wget2rc 2022-06-12 14:39:48 +02:00
032734ab8f * docs/announce_template.txt: New file [skip ci] 2022-05-27 19:49:57 +02:00
6a4568d3ec * .gitlab-ci.yml: Fix pages 2022-05-27 12:19:18 +02:00
3d25515253 Release v2.0.1 v2.0.1 2022-05-27 11:48:57 +02:00
dc4999ddb6 * .gitlab-ci.yml: Move static wget2.exe to https://gnuwget.gitlab.io/wget2/wget2.exe 2022-05-27 11:38:22 +02:00
607136d548 * libwget/ssl_openssl.c (wget_ssl_open): Silence sc_useless_cpp_parens 2022-05-27 10:52:56 +02:00