projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
3d37274
)
add CURLOPT_MAXAGE_CONN
author
Michael Wallner
<mike@php.net>
Mon, 8 Mar 2021 10:52:46 +0000
(11:52 +0100)
committer
Michael Wallner
<mike@php.net>
Mon, 8 Mar 2021 10:52:46 +0000
(11:52 +0100)
src/php_http_client_curl.c
patch
|
blob
|
history
diff --git
a/src/php_http_client_curl.c
b/src/php_http_client_curl.c
index aa79d2947f37683c79f07f1b54ffd63dbe99091a..ee3a2b432353635b9fc48ce9328d1306b2897d63 100644
(file)
--- a/
src/php_http_client_curl.c
+++ b/
src/php_http_client_curl.c
@@
-1306,6
+1306,11
@@
static void php_http_curle_options_init(php_http_options_t *registry)
*/
php_http_option_register(registry, ZEND_STRL("fresh_connect"), CURLOPT_FRESH_CONNECT, _IS_BOOL);
php_http_option_register(registry, ZEND_STRL("forbid_reuse"), CURLOPT_FORBID_REUSE, _IS_BOOL);
*/
php_http_option_register(registry, ZEND_STRL("fresh_connect"), CURLOPT_FRESH_CONNECT, _IS_BOOL);
php_http_option_register(registry, ZEND_STRL("forbid_reuse"), CURLOPT_FORBID_REUSE, _IS_BOOL);
+#if PHP_HTTP_CURL_VERSION(7,65,0)
+ if ((opt = php_http_option_register(registry, ZEND_STRL("maxage_conn"), CURLOPT_MAXAGE_CONN, IS_LONG))) {
+ ZVAL_LONG(&opt->defval, 118);
+ }
+#endif
/* outgoing interface */
php_http_option_register(registry, ZEND_STRL("interface"), CURLOPT_INTERFACE, IS_STRING);
/* outgoing interface */
php_http_option_register(registry, ZEND_STRL("interface"), CURLOPT_INTERFACE, IS_STRING);