mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Document the side effect of test_socket_open.
This commit is contained in:
parent
a41c753675
commit
79a8def8c8
10
src/http.c
10
src/http.c
@ -1009,11 +1009,17 @@ persistent_available_p (const char *host, int port, bool ssl,
|
||||
}
|
||||
|
||||
/* Finally, check whether the connection is still open. This is
|
||||
important because most server implement a liberal (short) timeout
|
||||
important because most servers implement liberal (short) timeout
|
||||
on persistent connections. Wget can of course always reconnect
|
||||
if the connection doesn't work out, but it's nicer to know in
|
||||
advance. This test is a logical followup of the first test, but
|
||||
is "expensive" and therefore placed at the end of the list. */
|
||||
is "expensive" and therefore placed at the end of the list.
|
||||
|
||||
(Current implementation of test_socket_open has a nice side
|
||||
effect that it treats sockets with pending data as "closed".
|
||||
This is exactly what we want: if a broken server sends message
|
||||
body in response to HEAD, or if it sends more than conent-length
|
||||
data, we won't reuse the corrupted connection.) */
|
||||
|
||||
if (!test_socket_open (pconn.socket))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user