Bug #11908: Post not binary safe
| From: | alberty at neptunlabs dot de | Date: | Thu, 05 Jul 2001 14:36:13 +0000 |
| Subject: | Bug #11908: Post not binary safe | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-58998@lists.php.net to get a copy of this message | ||
From: alberty@neptunlabs.de
Operating system: i686-pc-linux-gnu
PHP version: 4.0 Latest CVS (2001-07-05)
PHP Bug Type: cURL related
Bug description: Post not binary safe
Hi,
the code:
----
$ch = curl_init ("http://www.php.net/");
$fp = fopen ("php_homepage.txt", "w");
for ($str["field1"]="",$i=0;$i<256;$i++,$str["field1"].=chr($i)){}
curl_setopt ($ch, CURLOPT_POSTFIELDS, $str);
curl_setopt ($ch, CURLOPT_FILE, $fp);
curl_setopt ($ch, CURLOPT_HEADER, 1);
//curl_setopt ($ch, CURLOPT_BINARYTRANSFER, 1);
curl_exec ($ch);
curl_close ($ch);
fclose ($fp);
-----
are not binary safe.
if the CURLOPT_BINARYTRANSFER set to "1",
cURL results:
"Warning: Cannot call the CURLOPT_WRITEFUNCTION"
Regards,
--
Steve
--
Edit Bug report at: http://bugs.php.net/?id=11908&edit=1