Skip to content

Commit 0fa8221

Browse files
committed
Fixed GH-10270 Unable to return CURL_READFUNC_PAUSE in readfunc callback
1 parent 7b68ff4 commit 0fa8221

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/curl/interface.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,6 +1547,8 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
15471547
if (Z_TYPE(retval) == IS_STRING) {
15481548
length = MIN((int) (size * nmemb), Z_STRLEN(retval));
15491549
memcpy(data, Z_STRVAL(retval), length);
1550+
} else if (Z_TYPE(retval) == IS_LONG) {
1551+
length = zval_get_long(&retval);
15501552
}
15511553
zval_ptr_dtor(&retval);
15521554
}

0 commit comments

Comments
 (0)