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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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 Dec 27 14:01:29 2024 UTC