WRITEFUNCTION: add missing set_in_callback around callback

Closes #3837
This commit is contained in:
Taiyu Len 2019-05-03 23:59:28 -07:00 committed by Daniel Stenberg
parent c86d635b66
commit 0eec832603
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View 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) {