ID:               48774
 Updated by:       j...@php.net
 Reported By:      fel...@php.net
-Status:           Open
+Status:           Assigned
 Bug Type:         cURL related
 Operating System: Linux
 PHP Version:      5.3CVS-2009-07-02 (CVS)
 Assigned To:      srinatar
 New Comment:

See also bug #48965


Previous Comments:
------------------------------------------------------------------------

[2009-07-18 07:10:50] srina...@php.net

while looking into this bug, i also realized that this below test case
is also broken

less curl_copy_handle_basic_002.phpt 
...
  curl_setopt($ch, CURLOPT_POSTFIELDS,
"Hello=World&Foo=Bar&Person=John%20Doe");
  curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use
  
  $copy = curl_copy_handle($ch);
  curl_close($ch);
...

(currently, marked as expected failure..) so, i have filed a separate
bug : 48965 to track this separately

------------------------------------------------------------------------

[2009-07-14 09:40:45] sriram dot natarajan at gmail dot com

Hi
 though the above patch does fix the crash reported by the developer,
on further investigation this patch is not the right fix. 

the issue that is happening is when the form input data is a array, the
constructed form data is not available when executing curl_exec on the
cloned handle.

------------------------------------------------------------------------

[2009-07-11 10:54:13] sriram dot natarajan at gmail dot com

here is a better way to read the patches..
http://pastebin.org/1041

------------------------------------------------------------------------

[2009-07-11 10:12:27] sriram dot natarajan at gmail dot com

i was able to reproduce this on rhel 5 which ships with curl 7.15.5.

and this below patch seems to fix this problem
--- ext/curl/interface.c.ORIG   2009-07-09 15:24:00.000000000 -0700
+++ ext/curl/interface.c        2009-07-11 03:08:56.000000000 -0700
@@ -1444,9 +1444,13 @@
        zend_llist_copy(&dupch->to_free.str, &ch->to_free.str);
        /* Don't try to free copied strings, they're free'd when the
original handle is destroyed */
        dupch->to_free.str.dtor = NULL;
-#endif
+
        zend_llist_copy(&dupch->to_free.slist, &ch->to_free.slist);
+       dupch->to_free.slist.dtor = NULL;
+
        zend_llist_copy(&dupch->to_free.post, &ch->to_free.post);
+       dupch->to_free.post.dtor = NULL;
+#endif
 
        ZEND_REGISTER_RESOURCE(return_value, dupch, le_curl);
        dupch->id = Z_LVAL_P(return_value);


need to investigate and possibly add couple of test cases

------------------------------------------------------------------------

[2009-07-09 16:31:59] daniel at haxx dot se

I think it would help the devs if you'd also specify what libcurl
version you use (preferably with curl -V or similar to give all the
details).

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/48774

-- 
Edit this bug report at http://bugs.php.net/?id=48774&edit=1

Reply via email to