mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
HEAD: don't force-close after response-headers
A HEAD response has no body length and gets the headers like the corresponding GET would so it should not get closed after the response based on the same rules. This mistake caused connections that did HEAD to get closed too often without a valid reason. Bug: http://curl.haxx.se/bug/view.cgi?id=3542731 Reported by: Eelco Dolstra
This commit is contained in:
parent
18f8b7eb72
commit
85ce195f75
@ -2851,7 +2851,8 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
|
||||
|
||||
if((k->size == -1) && !k->chunk && !conn->bits.close &&
|
||||
(conn->httpversion >= 11) &&
|
||||
!(conn->handler->protocol & CURLPROTO_RTSP)) {
|
||||
!(conn->handler->protocol & CURLPROTO_RTSP) &&
|
||||
data->set.httpreq != HTTPREQ_HEAD) {
|
||||
/* On HTTP 1.1, when connection is not to get closed, but no
|
||||
Content-Length nor Content-Encoding chunked have been
|
||||
received, according to RFC2616 section 4.4 point 5, we
|
||||
|
Loading…
Reference in New Issue
Block a user