php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11908 Post not binary safe
Submitted: 2001-07-05 10:36 UTC Modified: 2001-07-30 17:08 UTC
From: alberty at neptunlabs dot de Assigned:
Status: Closed Package: cURL related
PHP Version: 4.0 Latest CVS (2001-07-05) OS: i686-pc-linux-gnu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
4 + 28 = ?
Subscribe to this entry?

 
 [2001-07-05 10:36 UTC] alberty at neptunlabs dot de
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-30 17:07 UTC] sterling@php.net
CURLOPT_BINARYTRANSFER is only for use with
CURLOPT_RETURNTRANSFER.
 [2001-07-30 17:08 UTC] sterling@php.net
close, sorry guys, its been awhile.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 01:01:28 2024 UTC