now counts header size return from server and if nothing is returned from a

HTTP server we return error
This commit is contained in:
Daniel Stenberg
2001-10-19 11:58:32 +00:00
parent 74d5a6fb3b
commit 4e37187e44
4 changed files with 13 additions and 2 deletions

View File

@@ -352,6 +352,13 @@ CURLcode Curl_http_done(struct connectdata *conn)
*bytecount = http->readbytecount + http->writebytecount;
}
if(0 == (http->readbytecount + conn->headerbytecount)) {
/* nothing was read from the HTTP server, this can't be right
so we return an error here */
failf(data, "Empty reply from server\n");
return CURLE_GOT_NOTHING;
}
return CURLE_OK;
}