diff options
Diffstat (limited to 'lib/http.c')
-rw-r--r-- | lib/http.c | 7 |
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; } |