[php-src] Issue #8165: Cannot stream request using CURLOPT_READFUNCTION without chunked encoding
| From: | cmb69 | Date: | Tue, 08 Mar 2022 11:38:45 +0000 |
| Subject: | [php-src] Issue #8165: Cannot stream request using CURLOPT_READFUNCTION without chunked encoding | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-240263@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8165
Comment Author: cmb69
> Do you think we could set CURLOPT_POSTFIELDSIZE depending on the content-length header to make
> it more intuitive?
That would require PHP to actually parse the headers passed via
CURLOPT_HTTPHEADER; not
sure whether that's worth it, and that change might break some code. Maybe we should just
document that users need to set Transfer-Encoding and Content-Length to
avoid this issue. Or maybe we should introduce a new option (say
CURLOPT_READFUNCTION_LENGTH) which allows to set the length explicitly.
It might be sensible to write to the internals mailing list to get more feedback on this issue.