ID: 14321
Updated by: sterling
Reported By: [EMAIL PROTECTED]
Old Status: Assigned
Status: Bogus
Bug Type: cURL related
Operating System: i686-gnu-linux
PHP Version: 4.0CVS-2001-12-03
Assigned To: sterling
New Comment:

a) not a cURL related bug report
b) bogus, when you print binary data, expect it to be truncated at the NULL, this is 
the same in every language.

Previous Comments:
------------------------------------------------------------------------

[2001-12-03 06:23:56] [EMAIL PROTECTED]

Assigning to sterling, the cURL master.

Derick

------------------------------------------------------------------------

[2001-12-03 06:22:04] [EMAIL PROTECTED]

This one is related to the report of [EMAIL PROTECTED] (Bug id #11516).
I talked to sniper about this problem a year ago, but I could not convince him that 
this behaviour of PHP to truncate post variables at the first occurrance of 0x00 
exists and that it's incorrect (when used with multipart-formdata). Some days ago I 
used libCURL with C++ to post binary data with the "CURLFORM_PTRCONTENTS" option which 
lead to the same problem. Packet-sniffing revealed that the data is sent correctly, 
but PHP truncates the variable at the first occurance of 0x00. I had a discussion with 
Daniel Stenberg (Curl-developer) on that topic. He agreed that following RFC1867 it is 
allowed to send binary data in the way jeroen describes and he was pretty much 
suprised that PHP causes such problems. As the function curl_formadd() and 
"CURLOPT_POSTFIELDSIZE" is not implemented in PHP I can not give you a PHP script 
which produces the error but let me know if you're interested in an example written in 
C++. I would appriciate very much if this bug could be removed in future versions of 
PHP.
thanks in advance
Hanno




------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=14321&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to