projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
new curlinfo
[m6w6/ext-http]
/
src
/
php_http_client_curl.c
diff --git
a/src/php_http_client_curl.c
b/src/php_http_client_curl.c
index b15fdd47f6c84475be23ff4026816eaf9503af5b..b7c6b05389012f74bc667b2d2a38f23feee855b9 100644
(file)
--- a/
src/php_http_client_curl.c
+++ b/
src/php_http_client_curl.c
@@
-450,6
+450,11
@@
static ZEND_RESULT_CODE php_http_curle_get_info(CURL *ch, HashTable *info)
add_assoc_long_ex(&array, "local_port", sizeof("local_port"), l);
}
#endif
add_assoc_long_ex(&array, "local_port", sizeof("local_port"), l);
}
#endif
+#if PHP_HTTP_CURL_VERSION(7,50,0)
+ if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_HTTP_VERSION, &l)) {
+ add_assoc_long_ex(&array, "http_version", sizeof("http_version"), l);
+ }
+#endif
/* END::CURLINFO */
/* END::CURLINFO */