php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48965 curl is not able to post a string properly from a cloned handle
Submitted: 2009-07-18 07:10 UTC Modified: 2009-07-28 18:54 UTC
From: sriram dot natarajan at gmail dot com Assigned: srinatar (profile)
Status: Not a bug Package: cURL related
PHP Version: 5.*, 6CVS (2009-07-22) OS: *
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: sriram dot natarajan at gmail dot com
New email:
PHP Version: OS:

 

 [2009-07-18 07:10 UTC] sriram dot natarajan at gmail dot com
Description:
------------
currently, within php tests, the following tests are marked as 'expected failures'

curl_copy_handle_basic_002.phpt 
curl_copy_handle_basic_005.phpt

which both does some thing like

curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "Hello=World&Foo=Bar&Person=John%20Doe");

  $copy = curl_copy_handle($ch);
  curl_close($ch);
  $curl_content_copy = curl_exec($copy);
  curl_close($copy);

  var_dump( $curl_content_copy );
  

Expected result:
----------------
these tests should pass fine.

Actual result:
--------------
string(163) "array(1) {
  ["test"]=>
  string(7) "getpost"
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-20 09:42 UTC] jani@php.net
only PHP_5_3 and HEAD? Not PHP_5_2..?
 [2009-07-20 14:55 UTC] jani@php.net
See also bug #48774
 [2009-07-21 20:45 UTC] srinatar@php.net
yes, this is an issue with HEAD, 5.2 and 5.3

- sriram
 [2009-07-25 22:15 UTC] jani@php.net
The reason is explained here:
  
  http://curl.haxx.se/libcurl/c/curl_easy_duphandle.html

You can not close the original handle before doing curl_exec($copy)..
 [2009-07-28 12:19 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

This is a cURL limitation..
 [2009-07-28 18:54 UTC] srinatar@php.net
should these below test cases be removed as it is doing some thing which is not supported or standard behavior ?

curl_copy_handle_basic_002.phpt 
curl_copy_handle_basic_005.phpt

just curious as to what is the practice in this case ?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 10 07:01:28 2024 UTC