From: Sriram Natarajan Date: Thu, 24 Sep 2009 18:20:49 +0000 (+0000) Subject: - Fixed bug #49571 (CURLOPT_POSTREDIR not implemented). X-Git-Tag: php-5.3.2RC1~446 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=92c08b12248e40bb270063c82da5d8d94dbc3de5;p=php - Fixed bug #49571 (CURLOPT_POSTREDIR not implemented). --- diff --git a/NEWS b/NEWS index 74ac10ccff..e2da0c59ff 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,8 @@ PHP NEWS - Fixed bug #49630 (imap_listscan function missing). (Felipe) - Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning "CURLPROTO_FILE cannot be set"). (Felipe) +- Fixed bug #49571 (CURLOPT_POSTREDIR not implemented). + (Sriram Natarajan) ?? ??? 2009, PHP 5.3.1RC? <- WHY IS THIS HERE? Gonna be released after 5.3.1 or what?? diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 51c29dd3a9..d194aca8a0 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -747,8 +747,10 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLFTPSSL_CONTROL); REGISTER_CURL_CONSTANT(CURLFTPSSL_ALL); #endif + #if LIBCURL_VERSION_NUM > 0x071301 REGISTER_CURL_CONSTANT(CURLOPT_CERTINFO); + REGISTER_CURL_CONSTANT(CURLOPT_POSTREDIR); #endif /* SSH support works in 7.19.0+ using libssh2 */ @@ -1669,6 +1671,12 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu } error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue)); break; +#if LIBCURL_VERSION_NUM > 0x071301 + case CURLOPT_POSTREDIR: + convert_to_long_ex(zvalue); + error = curl_easy_setopt(ch->cp, CURLOPT_POSTREDIR, Z_LVAL_PP(zvalue) & CURL_REDIR_POST_ALL); + break; +#endif case CURLOPT_PRIVATE: case CURLOPT_URL: case CURLOPT_PROXY: