diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/transfer.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/transfer.c b/lib/transfer.c index 2d5d0dfe8..6b7b81978 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -501,9 +501,19 @@ CURLcode Curl_readwrite(struct connectdata *conn, k->keepon |= KEEP_WRITE; } } - else + else { k->header = FALSE; /* no more header to parse! */ + if((k->size == -1) && !conn->bits.chunk && !conn->bits.close) + /* When connection is not to get closed, but no + Content-Length nor Content-Encoding chunked have been + received, there is no body in this response. We don't set + stop_reading TRUE since that would also prevent necessary + authentication actions to take place. */ + conn->bits.no_body = TRUE; + + } + if (417 == k->httpcode) { /* * we got: "417 Expectation Failed" this means: |