]> granicus.if.org Git - curl/commitdiff
WRITEFUNCTION: add missing set_in_callback around callback
authorTaiyu Len <taiyu.len@gmail.com>
Sat, 4 May 2019 06:59:28 +0000 (23:59 -0700)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 5 May 2019 09:09:30 +0000 (11:09 +0200)
Closes #3837

lib/sendf.c

index 504a28ae44fe95ace78f76247873b7e24b8ebe13..5913ea4060ef4f3c3a29c2b1a9c2aaae6bacfee2 100644 (file)
@@ -595,7 +595,10 @@ static CURLcode chop_write(struct connectdata *conn,
     size_t chunklen = len <= CURL_MAX_WRITE_SIZE? len: CURL_MAX_WRITE_SIZE;
 
     if(writebody) {
-      size_t wrote = writebody(ptr, 1, chunklen, data->set.out);
+      size_t wrote;
+      Curl_set_in_callback(data, true);
+      wrote = writebody(ptr, 1, chunklen, data->set.out);
+      Curl_set_in_callback(data, false);
 
       if(CURL_WRITEFUNC_PAUSE == wrote) {
         if(conn->handler->flags & PROTOPT_NONETWORK) {