[php-src] Issue #10270: ext/curl: Support of CURL_WRITEFUNC_PAUSE and CURL_READFUNC_PAUSE in curl_read and curl_write handlers.

From: Date: Mon, 09 Jan 2023 16:00:19 +0000
Subject: [php-src] Issue #10270: ext/curl: Support of CURL_WRITEFUNC_PAUSE and CURL_READFUNC_PAUSE in curl_read and curl_write handlers.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243382@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/10270
Author: jameno123

### Description

First, I consider this a bug as the read/write handlers do not seem to be implemented fully, but
recognize that its not currently supported so I have submitted it as a feature request. Please
accept my apologies if I have submitted it incorrectly.

Currently it seems that PHP does not support the construct of returning CURL_WRITEFUNC_PAUSE and
CURL_READFUNC_PAUSE as a return code from the curl_read and curl_write function handlers.

This breaks the ability to implement things like rate limited and pausing an upload when your are
handling read+write using curl_multi. If you need to pause the upload to wait for the download to
finish delivering data there is no way to PAUSE the upload from the read handler if there is
insufficient data available.

Please see the documentation of the CURL API here:
https://curl.se/libcurl/c/curl_easy_pause.html

I believe this is the affected file:
https://github.com/php/php-src/blob/master/ext/curl/interface.c

Line 583 and Line 773


Thread (1 message)

  • jameno123
« previous php.bugs (#243382) next »