Commit Graph

120 Commits

Author SHA1 Message Date
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Nikita Popov
be7f405f6b Merge branch 'PHP-7.3' into PHP-7.4 2019-07-18 14:42:20 +02:00
Nikita Popov
4a9f78f9d7 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-18 14:41:35 +02:00
Abyr Valg
c8c183eb62 Fixed bug #77946
Save multi_info_read() result into easy handle.
2019-07-18 14:40:47 +02:00
Christoph M. Becker
c68dc6b5e3 Extend CURLFile to support streams
Due to former restrictions of the libcurl API, curl multipart/formdata
file uploads supported only proper files.  However, as of curl 7.56.0
the new `curl_mime_*()` API is available (and already supported by
PHP[1]), which allows us to support arbitrary *seekable* streams, which
is generally desirable, and particularly resolves issues with the
transparent Unicode and long part support on Windows (see bug #77711).

Note that older curl versions are still supported, but CURLFile is
still restricted to proper files in this case.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=a83b68ba56714bfa06737a61af795460caa4a105>
2019-04-29 10:21:07 +02:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Nikita Popov
47699a24e6 Bump libcurl requirement to 7.15.5
The existence of the following functions is now guaranteed:
 * curl_escape()
 * curl_unescape()
 * curl_multi_setopt()

libcurl 7.15.5 has been released 11.5 years ago and is available
even in RHEL 5.
2018-02-03 21:11:20 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Nikita Popov
161fd75773 Bump libcurl requirement to 7.12.1
The existence of the following functions is now guaranteed:
 * curl_reset()
 * curl_strerror()
 * curl_multi_strerror()
 * curl_share_strerror()

libcurl 7.12.1 has been released more than 13 years ago and is
available even in RHEL 4.
2017-12-19 23:23:56 +01:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Davey Shafik
ad15e1ccda Implement curl server push 2016-06-27 01:17:32 -07:00
Davey Shafik
63275a1e58 Refactor setup of handlers on copied curl handles 2016-06-27 00:52:46 -07:00
Pierrick Charron
3d71c1de7a Add curl_multi/share_errno() curl_share_strerror()
Add 3 new functions :
- curl_multi_errno()
- curl_share_errno()
- curl_share_strerror()

https://wiki.php.net/rfc/new-curl-error-functions
2016-06-26 13:29:42 -04:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Xinchen Hui
4df6f26442 Fixed bug #70330 (Segmentation Fault with multiple "curl_copy_handle") 2015-08-23 13:01:47 +08:00
Xinchen Hui
f05baec0db Reorder fields of curl 2015-05-08 13:36:55 +08:00
Anatol Belski
ec89c85054 cleaning up the version macros 2015-03-23 20:13:59 +01:00
Nikita Popov
b5184ef336 Remove unsafe curl file uploads
The option CURLOPT_SAFE_UPLOAD still exists, but cannot be disabled.
2015-03-09 11:00:04 +01:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Anatol Belski
3b6a8b1163 remove the thread ctx from curl 2014-12-17 11:38:46 +01:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Nikita Popov
a770d29df7 Add smart_str_append for appending zend_strings
Also replaces usages in Zend/ and ext/standard
2014-09-21 20:58:31 +02:00
Nikita Popov
e33f3d3b7c Move smart_str implementation into Zend/
So we can use it there as well...

For now I've retained the zend_smart_str_public.h header, though
it would probably be better to just move that one struct into
zend_types.h.
2014-09-21 20:49:39 +02:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Anatol Belski
6f9f0bf205 master renames phase 2 2014-08-25 19:28:33 +02:00
Xinchen Hui
763cee63ab Use zend_string for better performance 2014-05-09 14:14:09 +08:00
Xinchen Hui
2d9bc88db8 Fixed clone refcount 2014-05-09 14:00:47 +08:00
Xinchen Hui
c5e63f8a63 Refactoring ext/curl (only compilable now) 2014-05-09 12:17:39 +08:00
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