aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tool_cb_hdr.c3
-rw-r--r--src/tool_cb_wrt.c14
2 files changed, 12 insertions, 5 deletions
diff --git a/src/tool_cb_hdr.c b/src/tool_cb_hdr.c
index 06ced4541..fb24b4508 100644
--- a/src/tool_cb_hdr.c
+++ b/src/tool_cb_hdr.c
@@ -60,8 +60,7 @@ size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata)
return failure;
#ifdef DEBUGBUILD
- if((size * nmemb > (size_t)CURL_MAX_WRITE_SIZE) ||
- (size * nmemb > (size_t)CURL_MAX_HTTP_HEADER)) {
+ if(size * nmemb > (size_t)CURL_MAX_HTTP_HEADER) {
warnf(outs->config, "Header data exceeds single call write limit!\n");
return failure;
}
diff --git a/src/tool_cb_wrt.c b/src/tool_cb_wrt.c
index de94f6e49..53c192084 100644
--- a/src/tool_cb_wrt.c
+++ b/src/tool_cb_wrt.c
@@ -55,9 +55,17 @@ size_t tool_write_cb(void *buffer, size_t sz, size_t nmemb, void *userdata)
return failure;
#ifdef DEBUGBUILD
- if(sz * nmemb > (size_t)CURL_MAX_WRITE_SIZE) {
- warnf(config, "Data size exceeds single call write limit!\n");
- return failure;
+ if(config->include_headers) {
+ if(sz * nmemb > (size_t)CURL_MAX_HTTP_HEADER) {
+ warnf(config, "Data size exceeds single call write limit!\n");
+ return failure;
+ }
+ }
+ else {
+ if(sz * nmemb > (size_t)CURL_MAX_WRITE_SIZE) {
+ warnf(config, "Data size exceeds single call write limit!\n");
+ return failure;
+ }
}
{