From abb14de7e05505d4159e6ffbb75f6135d21b3f6e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 7 Feb 2001 09:31:03 +0000 Subject: [PATCH] GetLine() didn't properly act on -1 lengths returned from Curl_read() --- lib/http.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/http.c b/lib/http.c index 9fe056c5f..54623ec6b 100644 --- a/lib/http.c +++ b/lib/http.c @@ -226,17 +226,18 @@ int GetLine(int sockfd, char *buf, struct connectdata *conn) (nreadbits.verbose) { fputs("< ", data->err); fwrite(buf, 1, nread, data->err); fputs("\n", data->err); } - return nread; + return nread>0?nread:0; }