projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fix typo
[m6w6/ext-http]
/
php_http_client_curl.c
diff --git
a/php_http_client_curl.c
b/php_http_client_curl.c
index 9ebffa395f9da893751b778d60d3f72ea05834c5..78c552a2ce723dbd8d9ea76edf8dbe08482ab129 100644
(file)
--- a/
php_http_client_curl.c
+++ b/
php_http_client_curl.c
@@
-502,10
+502,11
@@
static ZEND_RESULT_CODE php_http_curle_get_info(CURL *ch, HashTable *info)
case CURLSSLBACKEND_QSOSSL:
backend = "qsossl";
break;
case CURLSSLBACKEND_QSOSSL:
backend = "qsossl";
break;
-#e
ndif
+#e
lse
case CURLSSLBACKEND_GSKIT:
backend = "gskit";
break;
case CURLSSLBACKEND_GSKIT:
backend = "gskit";
break;
+#endif
case CURLSSLBACKEND_POLARSSL:
backend = "polarssl";
break;
case CURLSSLBACKEND_POLARSSL:
backend = "polarssl";
break;
@@
-528,7
+529,7
@@
static ZEND_RESULT_CODE php_http_curle_get_info(CURL *ch, HashTable *info)
}
#endif
}
#endif
-#if
PHP_HTTP_CURL_VERSION(7,19,1) && defined(PHP_HTTP_HAVE_OPENSSL
)
+#if
(PHP_HTTP_CURL_VERSION(7,19,1) && defined(PHP_HTTP_HAVE_OPENSSL)) || (PHP_HTTP_CURL_VERSION(7,34,0) && defined(PHP_HTTP_HAVE_NSS)) || (PHP_HTTP_CURL_VERSION(7,42,0) && defined(PHP_HTTP_HAVE_GNUTLS)) || (PHP_HTTP_CURL_VERSION(7,39,0) && defined(PHP_HTTP_HAVE_GSKIT)
)
{
int i;
zval *ci_array;
{
int i;
zval *ci_array;
@@
-1233,6
+1234,11
@@
static void php_http_curle_options_init(php_http_options_t *registry TSRMLS_DC)
opt->setter = php_http_curle_option_set_proxyheader;
}
#endif
opt->setter = php_http_curle_option_set_proxyheader;
}
#endif
+#if PHP_HTTP_CURL_VERSION(7,43,0)
+ if ((opt = php_http_option_register(registry, ZEND_STRL("proxy_service_name"), CURLOPT_PROXY_SERVICE_NAME, IS_STRING))) {
+ opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_STRLEN;
+ }
+#endif
#if PHP_HTTP_CURL_VERSION(7,40,0)
if ((opt = php_http_option_register(registry, ZEND_STRL("unix_socket_path"), CURLOPT_UNIX_SOCKET_PATH, IS_STRING))) {
#if PHP_HTTP_CURL_VERSION(7,40,0)
if ((opt = php_http_option_register(registry, ZEND_STRL("unix_socket_path"), CURLOPT_UNIX_SOCKET_PATH, IS_STRING))) {
@@
-1309,6
+1315,11
@@
static void php_http_curle_options_init(php_http_options_t *registry TSRMLS_DC)
if ((opt = php_http_option_register(registry, ZEND_STRL("httpauthtype"), CURLOPT_HTTPAUTH, IS_LONG))) {
Z_LVAL(opt->defval) = CURLAUTH_ANYSAFE;
}
if ((opt = php_http_option_register(registry, ZEND_STRL("httpauthtype"), CURLOPT_HTTPAUTH, IS_LONG))) {
Z_LVAL(opt->defval) = CURLAUTH_ANYSAFE;
}
+#if PHP_HTTP_CURL_VERSION(7,43,0)
+ if ((opt = php_http_option_register(registry, ZEND_STRL("service_name"), CURLOPT_SERVICE_NAME, IS_STRING))) {
+ opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_STRLEN;
+ }
+#endif
/* redirects */
if ((opt = php_http_option_register(registry, ZEND_STRL("redirect"), CURLOPT_FOLLOWLOCATION, IS_LONG))) {
/* redirects */
if ((opt = php_http_option_register(registry, ZEND_STRL("redirect"), CURLOPT_FOLLOWLOCATION, IS_LONG))) {
@@
-1488,7
+1499,7
@@
static void php_http_curle_options_init(php_http_options_t *registry TSRMLS_DC)
}
# endif
#endif
}
# endif
#endif
-#if
PHP_HTTP_CURL_VERSION(7,19,1) && defined(PHP_HTTP_HAVE_OPENSSL
)
+#if
(PHP_HTTP_CURL_VERSION(7,19,1) && defined(PHP_HTTP_HAVE_OPENSSL)) || (PHP_HTTP_CURL_VERSION(7,34,0) && defined(PHP_HTTP_HAVE_NSS)) || (PHP_HTTP_CURL_VERSION(7,42,0) && defined(PHP_HTTP_HAVE_GNUTLS)) || (PHP_HTTP_CURL_VERSION(7,39,0) && defined(PHP_HTTP_HAVE_GSKIT)
)
php_http_option_register(registry, ZEND_STRL("certinfo"), CURLOPT_CERTINFO, IS_BOOL);
#endif
#if PHP_HTTP_CURL_VERSION(7,36,0)
php_http_option_register(registry, ZEND_STRL("certinfo"), CURLOPT_CERTINFO, IS_BOOL);
#endif
#if PHP_HTTP_CURL_VERSION(7,36,0)
@@
-1515,6
+1526,9
@@
static void php_http_curle_options_init(php_http_options_t *registry TSRMLS_DC)
if ((opt = php_http_option_register(registry, ZEND_STRL("tlsauthpass"), CURLOPT_TLSAUTH_PASSWORD, IS_STRING))) {
opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_STRLEN;
}
if ((opt = php_http_option_register(registry, ZEND_STRL("tlsauthpass"), CURLOPT_TLSAUTH_PASSWORD, IS_STRING))) {
opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_STRLEN;
}
+#endif
+#if PHP_HTTP_CURL_VERSION(7,42,0) && (defined(PHP_HTTP_HAVE_NSS) || defined(PHP_HTTP_HAVE_DARWINSSL))
+ php_http_option_register(registry, ZEND_STRL("falsestart"), CURLOPT_SSL_FALSESTART, IS_BOOL);
#endif
}
}
#endif
}
}
@@
-2103,7
+2117,7
@@
static php_resource_factory_t *create_rf(php_http_client_t *h, php_http_client_e
}
/* only if the client itself is setup for persistence */
}
/* only if the client itself is setup for persistence */
- if (
h->rf->dtor == (void (*)(void*)) php_persistent_handle_abandon
) {
+ if (
php_resource_factory_is_persistent(h->rf)
) {
char *id_str = NULL;
size_t id_len;
int port = url->port ? url->port : 80;
char *id_str = NULL;
size_t id_len;
int port = url->port ? url->port : 80;
@@
-2124,7
+2138,7
@@
static php_resource_factory_t *create_rf(php_http_client_t *h, php_http_client_e
}
if (pf) {
}
if (pf) {
- rf = php_
resource_factory_init(NULL, php_persistent_handle_get_resource_factory_ops(), pf, (void (*)(void*)) php_persistent_handle_abandon
);
+ rf = php_
persistent_handle_resource_factory_init(NULL, pf
);
} else {
rf = php_resource_factory_init(NULL, &php_http_curle_resource_factory_ops, NULL, NULL);
}
} else {
rf = php_resource_factory_init(NULL, &php_http_curle_resource_factory_ops, NULL, NULL);
}