allow write callbacks to indicate OOM to libcurl

Allow (*curl_write_callback) write callbacks to return
CURL_WRITEFUNC_OUT_OF_MEMORY to properly indicate libcurl of OOM conditions
inside the callback itself.
This commit is contained in:
Yang Tse
2011-09-25 18:53:29 +02:00
parent e276802ff8
commit 119f43360b
8 changed files with 50 additions and 5 deletions

View File

@@ -160,6 +160,11 @@ From 7.18.0, the function can return CURL_WRITEFUNC_PAUSE which then will
cause writing to this connection to become paused. See
\fIcurl_easy_pause(3)\fP for further details.
From 7.22.1, the function can return CURL_WRITEFUNC_OUT_OF_MEMORY to indicate
libcurl that an attempt to dynamically allocate memory from within the write
callback itself has failed. This will abort the transfer and make libcurl
return CURLE_OUT_OF_MEMORY.
This function may be called with zero bytes data if the transferred file is
empty.

View File

@@ -685,4 +685,5 @@ CURL_VERSION_SPNEGO 7.10.8
CURL_VERSION_SSL 7.10
CURL_VERSION_SSPI 7.13.2
CURL_VERSION_TLSAUTH_SRP 7.21.4
CURL_WRITEFUNC_OUT_OF_MEMORY 7.22.1
CURL_WRITEFUNC_PAUSE 7.18.0