* src/wget.c (downloader_thread): Signal main() on exit.
Without this, the main thread may get stuck waiting for signals from
downloaders while those have already exited and will never signal it.
Observed with --wait.
Fixes: https://github.com/rockdaboot/wget2/issues/348
Copyright-paperwork-exempt: Yes
* include/wget/wget.h: New function declaration wget_http_connection_receive_only().
* libwget/http.c: New function definition wget_http_connection_receive_only().
* libwget/http.h (struct wget_http_connection_st): Add member goaway.
* libwget/http2.c (struct http2_stream_context): Add member conn,
(on_frame_recv_callback): Handle NGHTTP2_GOAWAY,
(wget_http2_send_request): Initialize conn member.
* src/host.c (_release_job): Don't release parts if in 'done' state.
* src/wget.c (process_response_header): Remove handling of LINK headers,
(process_response): Add handling of LINK headers,
(downloader_thread): Handle pending responses correctly.
This patch fixes two related issues:
1. With HTTP/2, servers sometimes limit the number of requests per connection.
Beforethis patch, the connection was closed too early after GOAWAY and pending
responses weren't received.
2. In _release_job(), already downloaded parts of a file were erroneous released.
This caused successful metalink and chunked downloads to fail in combination with
a GOAWAY or a remotely closed connection.
* src/wget.c: Add new function progress_report(),
add new declaration progress_report().
* src/wget.c (main): Start thread progress_report().
* src/bar.c: Increase BAR_THREAD_SLEEP_DURATION from 125 to 1000 millseconds.
* libwget/bar.c (bar_update_slot): Limit ratio to 100%, add TODO.
* src/wget.c: Add new functions add_parent(), is_parent(), matches_parent().
* src/wget.c (queue_url_from_remote): Add redirected URL to parents if
origin is a parent.
* src/wget.c (queue_url_from_remote): Do not apply robots.txt to redirected
URL if origin was requested by user.
Fixes https://github.com/rockdaboot/wget2/issues/331
* 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
* libwget/dns.c (getaddrinfo_merging, resolve): Code cleanup.
* libwget/net.c (wget_tcp_connect): Connect first, then set socket to async.
Connecting asynchronously prevented wget2 to fallback to the next IP address
of a host when a connect error occurred.
Reported at https://github.com/rockdaboot/wget2/issues/325