From 4e37187e44b85aa11fee92eca4d87b3839cd435f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 19 Oct 2001 11:58:32 +0000 Subject: now counts header size return from server and if nothing is returned from a HTTP server we return error --- lib/http.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/http.c') diff --git a/lib/http.c b/lib/http.c index d12db0c8c..b3074ec65 100644 --- a/lib/http.c +++ b/lib/http.c @@ -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; } -- cgit v1.2.3