summaryrefslogtreecommitdiff
path: root/src/tool_cb_hdr.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-09-26 03:18:51 +0200
committerYang Tse <yangsita@gmail.com>2011-09-26 13:05:42 +0200
commitd9f686db88cc6ed01af8f7d690a9e44b7dcfb6ee (patch)
tree6cb022096ed3d70163760390e60a7fcb5a48ef7b /src/tool_cb_hdr.c
parenta1087db5c61c7cc1e8bae09d2abc65a88d1826cf (diff)
downloadcurl-d9f686db88cc6ed01af8f7d690a9e44b7dcfb6ee.tar.gz
remove short-lived CURL_WRITEFUNC_OUT_OF_MEMORY
Diffstat (limited to 'src/tool_cb_hdr.c')
-rw-r--r--src/tool_cb_hdr.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/tool_cb_hdr.c b/src/tool_cb_hdr.c
index 6dcc9f46a..2643ad2cf 100644
--- a/src/tool_cb_hdr.c
+++ b/src/tool_cb_hdr.c
@@ -47,10 +47,6 @@ size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata)
const size_t cb = size * nmemb;
const char *end = (char*)ptr + cb;
- if(cb >= CURL_WRITEFUNC_PAUSE)
- /* CURL_WRITEFUNC_PAUSE limits input size */
- return CURL_WRITEFUNC_OUT_OF_MEMORY;
-
if(cb > 20 && checkprefix("Content-disposition:", str)) {
const char *p = str + 20;
@@ -78,13 +74,12 @@ size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata)
*/
len = (ssize_t)cb - (p - str);
filename = parse_filename(p, len);
+ /* TODO: OOM handling - return (size_t)-1 ? */
if(filename) {
outs->filename = filename;
outs->alloc_filename = TRUE;
break;
}
- else
- return CURL_WRITEFUNC_OUT_OF_MEMORY;
}
}