Skip to content

ext/curl: Support of CURL_WRITEFUNC_PAUSE and CURL_READFUNC_PAUSE in curl_read and curl_write handlers. #10270

Closed
@jameno123

Description

@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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions