aboutsummaryrefslogtreecommitdiff
path: root/lib/http.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-10-19 11:58:32 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-10-19 11:58:32 +0000
commit4e37187e44b85aa11fee92eca4d87b3839cd435f (patch)
tree7275e4cf4be1cc2bc8daf3ba614a6f048dfa3db1 /lib/http.c
parent74d5a6fb3b9a96d9fa51ba90996e94c878ebd151 (diff)
now counts header size return from server and if nothing is returned from a
HTTP server we return error
Diffstat (limited to 'lib/http.c')
-rw-r--r--lib/http.c7
1 files changed, 7 insertions, 0 deletions
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;
}