X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=src%2Fphp_http_client_curl.c;h=b7c6b05389012f74bc667b2d2a38f23feee855b9;hp=b15fdd47f6c84475be23ff4026816eaf9503af5b;hb=061a30e33e42ae9332a56c26cbe15bccc9d0f61f;hpb=70cbf84439cb4b0fec252966ffd596ebb6bbfdbc diff --git a/src/php_http_client_curl.c b/src/php_http_client_curl.c index b15fdd4..b7c6b05 100644 --- 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 +#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 */