Bug #14321 Updated: multipart/form-data doesn't accept a NULL character
| From: | derick@php.net | Date: | Mon, 03 Dec 2001 11:23:56 +0000 |
| Subject: | Bug #14321 Updated: multipart/form-data doesn't accept a NULL character | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-72325@lists.php.net to get a copy of this message | ||
ID: 14321
Updated by: derick
Reported By: kranzhoff@neptunelabs.de
Old Status: Open
Status: Assigned
Old Bug Type: Variables related
Bug Type: cURL related
Operating System: i686-gnu-linux
PHP Version: 4.0CVS-2001-12-03
Old Assigned To:
Assigned To: sterling
New Comment:
Assigning to sterling, the cURL master.
Derick
Previous Comments:
------------------------------------------------------------------------
[2001-12-03 06:22:04] kranzhoff@neptunelabs.de
This one is related to the report of jeroen@smartnet.dhs.org (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