* libwget/ssl_openssl.c (wget_ssl_open): Correctly return WGET_E_CERTIFICATE.
* libwget/ssl_wolfssl.c (wget_ssl_init): Support OCSP w/o stapling.
* src/options.c (init): Set WGET_SSL_OCSP_DATE and WGET_SSL_OCSP_NONCE for WolfSSL.
* tests/test-ocsp-server.c: Enable more tests for WolfSSL.
* libwget/decompressor.c (wget_decompress): Return error code.
* libwget/http.c: Return error from wget_decompress().
* libwget/http2.c: Likewise.
* tests/Makefile.am: New test test-broken-gzip.
* tests/test-broken-gzip.c: New test file.
* src/bar.c: Main implementation of dotted progress bar.
* src/options.c: Handle different types for the dotted progress bar.
* src/wget.c: Adjust calling the progress bar.
* src/wget_bar.h: Define PROGRESS_TYPE_DOT.
* src/wget_options.h: Extend struct config.
* tests/test-wget-1.c: Simple testing if wget2 accepts the dot types.
* src/wget.c (process_response_header): Delegate link handling to process_response().
* tests/Makefile.am: Add test-link-location.c.
* tests/test-link-location.c: New test file.
* src/wget.c (convert_links): process URL the same way as in normalize_uri().
* tests/Makefile.am: Add new test file test-k-percent-encoding.c.
* tests/test-k-percent-encoding.c: New file.
This adds extensive HTTP/2 test coverage using libnghttp2 as the test
server, covering multiplexing, stream error handling, connection
management, and settings negotiation.
* tests/libtest.h (wget_test_url_t): Add h2_delay_response and
h2_rst_stream_error fields for HTTP/2 test control.
(WGET_TEST_H2_MIN_CONCURRENT_STREAMS): New test flag.
(wget_test_get_h2_server_port): Declare function.
* tests/libtest.c: Remove HAVE_MICROHTTPD_HTTP2_H infrastructure,
(h2_session_data, h2_server_t): New structures for libnghttp2 server,
(h2_send_callback, h2_recv_callback): Implement nghttp2 I/O callbacks,
(h2_on_frame_recv_callback): Handle HTTP/2 frames,
(h2_on_header_callback): Process request headers,
(h2_data_read_callback): Stream response body with 8KB chunk limit,
(h2_on_stream_close_callback): Clean up stream resources,
(h2_session_data_new, h2_session_data_free): Manage session lifecycle,
(h2_server_thread): Main server loop with TLS and ALPN support,
(h2_server_start, h2_server_stop): Control server lifecycle,
(_http_server_stop): Remove gnutls_global_deinit() call to fix
server restart issues,
(wget_test_start_server_handler): Default start_h2 to 0 (opt-in),
enable HTTP/2 with WGET_TEST_H2_ONLY flag,
(wget_test): Skip H2_PASS when libnghttp2 unavailable,
(wget_test_get_h2_server_port): Return HTTP/2 server port.
* tests/Makefile.am (WGET_TESTS): Add test-http2-multiplexing,
test-http2-stream-errors, test-http2-connection-errors,
test-http2-settings.
* tests/test-http2-multiplexing.c: New file testing concurrent
downloads over single HTTP/2 connection with multiplexing.
* tests/test-http2-stream-errors.c: New file testing stream error
isolation with RST_STREAM frames.
* tests/test-http2-connection-errors.c: New file testing connection
recovery after server restart.
* tests/test-http2-settings.c: New file testing SETTINGS frame
exchange, header compression, and large headers.
* tests/test-limit-rate-http2.c (main): Skip 3-file multiplexed
download test when running with HTTP/2 due to rate limiting
limitations in test server.
The HTTP/2 test server uses libnghttp2 with GnuTLS for TLS and ALPN
negotiation. Tests verify protocol-specific features like multiplexing,
stream independence, and proper SETTINGS exchange. HTTP/2 is now opt-in
via WGET_TEST_H2_ONLY to avoid breaking existing tests.
* src/wget.c (queue_url_from_remote): Copy job->robotstxt flag for redirections"
* tests/test-redirection.c: Add test for correct status code after robots redirection fails"
Fixes https://gitlab.com/gnuwget/wget2/-/issues/677
* tests/libtest.c: Handle > 1 OCSP responses.
* tests/libtest.h: Rename WGET_TEST_OCSP_RESP_FILE to WGET_TEST_OCSP_RESP_FILES.
* tests/test-ocsp-server.c: Make use of WGET_TEST_OCSP_RESP_FILES.
* tests/test-spider-r.c: Add new test for redirections with spider
* src/wget.c(process_response_header): Prevent changing the request
method during a redirection to GET.
Fixes: #660
* 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
* 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.
* src/wget.c (convert_link_file_only): Use wget_debug_printf instead of wget_info_printf,
(convert_links): Add fragment.
* tests/test-k.c: Add fragment to test.
* src/wget.c (convert_link_whole): Use wget_iri_escape_path() instead of wget_buffer_strcat().
* tests/test-k.c (main): Add test of URL with query part including escaped characters.
* src/blacklist.c (get_local_filename): Remove static from definition.
* src/wget_blacklist.h (get_local_filename): Add declaration.
* src/wget.c (process_response): Use get_local_filename() to process
the filename from Content-Disposition,
(get_header): Likewise.
* tests/Makefile.am: Add new test file test-directory-prefix.c.
* tests/test-directory-prefix.c: New test file.