]> granicus.if.org Git - curl/commitdiff
make sure we return CURLE_WRITE_ERROR if the write callback returned
authorDaniel Stenberg <daniel@haxx.se>
Fri, 15 Mar 2002 12:42:41 +0000 (12:42 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 15 Mar 2002 12:42:41 +0000 (12:42 +0000)
an error, even if we were decoding a chunked-encoded transfer

lib/transfer.c

index b887d010ab432798677a5113378747bfd55343fb..e0dc7c91893c15bb18d2bea1a8f2b5e5be814862 100644 (file)
@@ -693,7 +693,11 @@ CURLcode Curl_readwrite(struct connectdata *conn,
             Curl_httpchunk_read(conn, k->str, nread, &nread);
 
           if(CHUNKE_OK < res) {
-            failf(data, "Receeived problem in the chunky parser");
+            if(CHUNKE_WRITE_ERROR == res) {
+              failf(data, "Failed writing data");
+              return CURLE_WRITE_ERROR;
+            }
+            failf(data, "Received problem in the chunky parser");
             return CURLE_READ_ERROR;
           }
           else if(CHUNKE_STOP == res) {