Commit Graph

88 Commits

Author SHA1 Message Date
datibbaw
488e64dbe4 Allow NULL as value for CURLOPT_CUSTOMREQUEST option.
Added test case.

Refactored the code to isolate the string handling. Fixed return values to use SUCCESS and FAILURE.

Removed unused error variable.

Indentation fix.
Removed the ugly goto.
2014-02-28 18:27:22 +08:00
Xinchen Hui
47c9027772 Bump year 2014-01-03 11:06:16 +08:00
Adam Harvey
69f12ad582 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Track created curl_slist structs by option so they can be updated in situ.

Conflicts:
	ext/curl/interface.c
2013-08-19 12:16:36 -07:00
Adam Harvey
aa7d3d8e6d Track created curl_slist structs by option so they can be updated in situ.
At present, when curl_setopt() is called with an option that requires the
creation of a curl_slist, we simply push the new curl_slist onto a list to be
freed when the curl handle is freed. This avoids a memory leak, but means that
repeated calls to curl_setopt() on the same handle with the same option wastes
previously allocated memory on curl_slist structs that will no longer be read.

This commit changes the zend_llist that was previously used to track the lists
to a HashTable keyed by the option number, which means that we can simply
update the hash table each time curl_setopt() is called.

Fixes bug #65458 (curl memory leak).
2013-08-19 12:01:04 -07:00
Pierrick Charron
b79e65f268 Remove curl wrappers 2013-04-23 17:01:17 -04:00
Stanislav Malyshev
a9d013bb02 Implement fix for bug #46439 - add CURLFile class for safer uploads 2013-01-28 22:22:59 -08:00
Pierrick Charron
f85e5950ab Improve resource management for curl handle
Previous implementation was using its own refcounting (uses field of
the php_curl struct). zend_list_add/remove already implements its own
refcount, so we don't need to use an other one.
2013-01-05 11:07:59 -05:00
Pierrick Charron
343a9199bb Remove passwd handler from struct when not needed
CURLOPT_PASSWDFUNCTION was removed in cURL 7.15.5, the passwd field
will not be used for version greater than this one
2013-01-01 21:12:02 -05:00
Xinchen Hui
a666285bc2 Happy New Year 2013-01-01 16:37:09 +08:00
Xinchen Hui
0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Pierrick Charron
33f44af1a7 New curl_pause() function
Add the curl_pause function (binding of curl_easy_pause).
Using this function, you can explicitly mark a running connection
to get paused, and you can unpause a connection that was
previously paused.
2012-12-23 17:13:49 -05:00
Pierrick Charron
4b4f3db731 Support for curl_strerror and curl_multi_strerror
Add the support for both curl_strerror and curl_multi_strerror.
Those function will return a string describing the error code
passed in the argument errornum
2012-12-23 15:45:39 -05:00
Pierrick Charron
64595a5d1a Add curl_multi_setopt and clean curl_share_setopt
curl_multi_setopt is now available and supports CURLMOPT_PIPELINING
and CURLMOPT_MAXCONNECTS
2012-12-23 14:59:41 -05:00
Pierrick Charron
ded889e865 Remove duplicated function definition 2012-12-23 14:05:04 -05:00
Pierrick Charron
aa9156d7e0 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #55438 (Curlwapper is not sending http header randomly)
2012-12-19 19:46:57 -05:00
Pierrick Charron
c46e1cdcae Fixed bug #55438 (Curlwapper is not sending http header randomly)
Since curl multi is used, it sometime happen that the resource is freed before
the curl multi really execute the query. The patch will store the headers
slist in the curlstream handle and free it only when the stream will be closed
2012-12-19 19:40:29 -05:00
Felipe Pena
e4ca0ed09f - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
8775a37559 - Year++ 2012-01-01 13:15:04 +00:00
Pierrick Charron
8253bdbb41 add CURLOPT_WILDCARDMATCH and CURLOPT_FNMATCH_FUNCTION 2011-12-04 00:19:12 +00:00
Pierrick Charron
e69f987948 Clean / Improve the curl extension
# NEWS file will come soon
2011-12-01 21:48:07 +00:00
Pierrick Charron
70136445cb Revert commit r319729 until I have a clean version for non-ZTS 2011-11-24 12:49:11 +00:00
Pierrick Charron
da2797108f Implemented FR #55540, added functions curl_share_init(), curl_share_setopt() and curl_share_close(). 2011-11-23 22:20:28 +00:00
Pierrick Charron
33d3eb1e43 Fixed bug #55635 2011-11-22 17:13:26 +00:00
Pierrick Charron
a1f1e0bcf9 Fix memory leak when using libcurl < 7.17.0 2011-11-22 05:19:37 +00:00
Pierrick Charron
18e4f02921 Fix memory leak when using libcurl < 7.17.0 2011-11-22 05:19:37 +00:00
Hannes Magnusson
8db792d1f2 Fixed issues when streams were closed before curl read/write from them, or cleaning
Closing a original handle after copying it now no longer cleans up all resources (fixes missing CURLOPT_POSTFIELDS values among others)
2011-09-12 09:16:04 +00:00
Hannes Magnusson
e43c21e53a Fixed issues when streams were closed before curl read/write from them, or cleaning
Closing a original handle after copying it now no longer cleans up all resources (fixes missing CURLOPT_POSTFIELDS values among others)
2011-09-12 09:16:04 +00:00
Felipe Pena
927bf09c29 - Year++ 2011-01-01 02:19:59 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Ilia Alshanetsky
c579738b94 Same as before 2010-11-30 16:12:45 +00:00
Ilia Alshanetsky
964eff5276 Missing bits from last commit 2010-11-30 16:11:27 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Ilia Alshanetsky
809dbcda08 Fixed bug #49517 (cURL's CURLOPT_FILE prevents file from being deleted after fclose). 2009-09-30 02:34:17 +00:00
Sriram Natarajan
27dccf7ac0 - Fixed bug #48774 (SIGSEGVs when using curl_copy_handle()). 2009-07-21 20:32:32 +00:00
Pierre Joye
2a93efcea3 - fix build, stderr cannot be used as var or struct member 2009-05-27 22:35:26 +00:00
Jani Taskinen
83748ac00d MFH: Fixed bug #48203 (crash when CURLOPT_STDERR is set to regular file) 2009-05-26 15:49:15 +00:00
Pierre Joye
8e7031087a - [DOC] MFH: #41712, implement progress callback
- add constants  CURLOPT_PROGRESSFUNCTION
2009-05-03 14:59:46 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Jani Taskinen
77a63540a5 MFH:- Fixed bug #45161 (Reusing a curl handle leaks memory) 2008-12-17 14:13:40 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Antony Dovgal
a5d86612e3 MFH: decrement ch->uses (or destroy handle) when destroying multi handle 2006-10-05 15:06:40 +00:00
Ilia Alshanetsky
5f25d80d10 cURL extension news. 2006-01-24 20:11:14 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
George Schlossnagle
d0ec239661 Darwin seems to like this much better. 2005-07-15 16:47:48 +00:00
Antony Dovgal
56a68b5be1 fix bug #33222 (segfault when CURL handle is closed in a callback).
fix segfaults when CURL callback functions throw exception.
2005-06-02 21:04:12 +00:00
Sterling Hughes
177db33c63 add the curl_copy_handle() function which will exactly duplicate a cURL handle.
Useful when you have multiple "similair" transforms as with a multi handle with
only small variances (like the URL)
2004-03-12 18:37:55 +00:00
Ilia Alshanetsky
21a7e57ae7 Fixed memory leak in the multi interface.
Fixed proto of curl_multi_exec().
Fixed crash in curl resource attached to curl multi resource is manually
freed via curl_close().
2004-03-11 00:11:18 +00:00
foobar
ccfc46b0aa - Happy new year and PHP 5 for rest of the files too..
# Should the LICENSE and Zend/LICENSE dates be updated too?
2004-01-08 17:33:29 +00:00