@@ -644,6 +644,10 @@ PHP_MINIT_FUNCTION(curl)
644
644
#if LIBCURL_VERSION_NUM > 0x071301
645
645
REGISTER_CURL_CONSTANT (CURLINFO_CERTINFO );
646
646
#endif
647
+ #if LIBCURL_VERSION_NUM >= 0x071202
648
+ REGISTER_CURL_CONSTANT (CURLINFO_REDIRECT_URL );
649
+ #endif
650
+
647
651
648
652
/* cURL protocol constants (curl_version) */
649
653
REGISTER_CURL_CONSTANT (CURL_VERSION_IPV6 );
@@ -2346,6 +2350,11 @@ PHP_FUNCTION(curl_getinfo)
2346
2350
if (curl_easy_getinfo (ch -> cp , CURLINFO_LOCAL_PORT , & l_code ) == CURLE_OK ) {
2347
2351
CAAL ("local_port" , l_code );
2348
2352
}
2353
+ #endif
2354
+ #if LIBCURL_VERSION_NUM >= 0x071202
2355
+ if (curl_easy_getinfo (ch -> cp , CURLINFO_REDIRECT_URL , & s_code ) == CURLE_OK ) {
2356
+ CAAS ("redirect_url" , s_code );
2357
+ }
2349
2358
#endif
2350
2359
if (ch -> header .str_len > 0 ) {
2351
2360
CAAS ("request_header" , ch -> header .str );
@@ -2361,7 +2370,11 @@ PHP_FUNCTION(curl_getinfo)
2361
2370
#endif
2362
2371
case CURLINFO_PRIVATE :
2363
2372
case CURLINFO_EFFECTIVE_URL :
2364
- case CURLINFO_CONTENT_TYPE : {
2373
+ case CURLINFO_CONTENT_TYPE :
2374
+ #if LIBCURL_VERSION_NUM >= 0x071202
2375
+ case CURLINFO_REDIRECT_URL :
2376
+ #endif
2377
+ {
2365
2378
char * s_code = NULL ;
2366
2379
2367
2380
if (curl_easy_getinfo (ch -> cp , option , & s_code ) == CURLE_OK && s_code ) {
0 commit comments