|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-11-22 09:58 UTC] pierrick@php.net
-Assigned To:
+Assigned To: pierrick
[2011-11-22 17:13 UTC] pierrick@php.net
[2011-11-22 17:16 UTC] pierrick@php.net
[2011-11-22 17:16 UTC] pierrick@php.net
-Status: Assigned
+Status: To be documented
[2012-04-18 09:47 UTC] laruence@php.net
[2012-07-24 23:38 UTC] rasmus@php.net
[2012-09-22 14:44 UTC] pierrick@php.net
-Type: Bug
+Type: Documentation Problem
[2012-11-03 04:18 UTC] pierrick@php.net
[2012-11-03 04:18 UTC] pierrick@php.net
[2012-11-03 04:18 UTC] pierrick@php.net
-Status: Assigned
+Status: Closed
[2013-11-17 09:35 UTC] laruence@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 07:00:01 2025 UTC |
Description: ------------ While trying to find out what CURLOPT_BINARYTRANSFER did exactly, I found that it isn't used at all. I looked around in the ext/curl directory in trunk for uses of the PHP_CURL_BINARY and PHP_CURL_ASCII constants, and found that they're only used for setting the ch->handlers->write->type value, but this value is never used anywhere. It seems the last use of the constants has disappeared in r211314 ("fix bug #37061 (curl_exec() doesn't zero-terminate binary strings) - we get the data length from cURL, so it's binary safe. fix leak appearing when re-using curl handle"). I'm not 100% sure my analysis is correct, but if it is, I guess the (code for) the option should be removed and the documentation updated. there's no need for them to be zero-terminated It actually makes sense not to distinguish between binary and non-binary results: A normal string is just a special case of binary string, so always returning a "binary string" should work just fine. AFAIK strings always have a length associated with them, so zero bytes could occur within any PHP string (it's just that using strings with zero bytes in them don't always work with external C functions that expect zero terminated strings...).