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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alberty at neptunlabs dot de
New email:
PHP Version: OS:

 

 [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-2020 The PHP Group
All rights reserved.
Last updated: Sun Sep 20 12:01:25 2020 UTC