cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: memlimit fail

From: Gisle Vanem <giva_at_bgnett.no>
Date: Sat, 05 Feb 2005 16:21:00 +0100

> Looks like Curl_http_done() is not smart enough. Shouldn't it
> remember the CURLE_OUT_OF_MEMORY from add_buffer()?

This seems to fix it:

RCS file: /cvsroot/curl/curl/lib/http.c,v
retrieving revision 1.259
diff -u -r1.259 http.c
--- http.c 21 Jan 2005 09:32:33 -0000 1.259
+++ http.c 5 Feb 2005 13:59:48 -0000
@@ -1274,7 +1274,6 @@
 {
   struct SessionHandle *data;
   struct HTTP *http;
- (void)status; /* no use for us */

   data=conn->data;
   http=conn->proto.http;
@@ -1291,7 +1290,7 @@

     free(buff->buffer);
     free(buff);
- http->send_buffer = NULL; /* cleaer the pointer */
+ http->send_buffer = NULL; /* clear the pointer */
   }

   if(HTTPREQ_POST_FORM == data->set.httpreq) {
@@ -1307,6 +1306,9 @@
   else if(HTTPREQ_PUT == data->set.httpreq)
     conn->bytecount = http->readbytecount + http->writebytecount;

+ if (status == CURLE_OUT_OF_MEMORY)
+ return (status);
+
   if(!conn->bits.retry &&
      ((http->readbytecount +
        conn->headerbytecount -
 
--gv
Received on 2005-02-05