That's more of a feature then a bug report no? If so, it does not belong in 5.2

On 2009-09-24, at 2:20 PM, Sriram Natarajan wrote:

srinatar Thu, 24 Sep 2009 18:20:49 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=288677

Log:
- Fixed bug #49571 (CURLOPT_POSTREDIR not implemented).

Bug: http://bugs.php.net/49571 (Feedback) CURLOPT_POSTREDIR not implemented

Changed paths:
   U   php/php-src/branches/PHP_5_2/NEWS
   U   php/php-src/branches/PHP_5_2/ext/curl/interface.c
   U   php/php-src/branches/PHP_5_3/NEWS
   U   php/php-src/branches/PHP_5_3/ext/curl/interface.c
   U   php/php-src/trunk/ext/curl/interface.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===================================================================
--- php/php-src/branches/PHP_5_2/NEWS 2009-09-24 18:01:17 UTC (rev 288676) +++ php/php-src/branches/PHP_5_2/NEWS 2009-09-24 18:20:49 UTC (rev 288677)
@@ -12,6 +12,8 @@
  of a multibyte character). (Moriyoshi)
- Fixed bug #49528 (UTF-16 strings prefixed by BOMs wrondly converted).
  (Moriyoshi)
+- Fixed bug #49571 (CURLOPT_POSTREDIR not implemented).
+  (Sriram Natarajan)

17 Sep 2009, PHP 5.2.11
- Fixed certificate validation inside php_openssl_apply_verification_policy.

Modified: php/php-src/branches/PHP_5_2/ext/curl/interface.c
===================================================================
--- php/php-src/branches/PHP_5_2/ext/curl/interface.c 2009-09-24 18:01:17 UTC (rev 288676) +++ php/php-src/branches/PHP_5_2/ext/curl/interface.c 2009-09-24 18:20:49 UTC (rev 288677)
@@ -649,6 +649,10 @@
        REGISTER_CURL_CONSTANT(CURLFTPSSL_ALL);
#endif

+#if LIBCURL_VERSION_NUM > 0x071301
+       REGISTER_CURL_CONSTANT(CURLOPT_POSTREDIR);
+#endif
+
#if LIBCURL_VERSION_NUM >= 0x071304
        REGISTER_CURL_CONSTANT(CURLOPT_REDIR_PROTOCOLS);
        REGISTER_CURL_CONSTANT(CURLOPT_PROTOCOLS);
@@ -1381,6 +1385,12 @@
                        }
                        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:

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS 2009-09-24 18:01:17 UTC (rev 288676) +++ php/php-src/branches/PHP_5_3/NEWS 2009-09-24 18:20:49 UTC (rev 288677)
@@ -10,6 +10,8 @@
- 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??

Modified: php/php-src/branches/PHP_5_3/ext/curl/interface.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/curl/interface.c 2009-09-24 18:01:17 UTC (rev 288676) +++ php/php-src/branches/PHP_5_3/ext/curl/interface.c 2009-09-24 18:20:49 UTC (rev 288677)
@@ -747,8 +747,10 @@
        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 @@
                        }
                        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:

Modified: php/php-src/trunk/ext/curl/interface.c
===================================================================
--- php/php-src/trunk/ext/curl/interface.c 2009-09-24 18:01:17 UTC (rev 288676) +++ php/php-src/trunk/ext/curl/interface.c 2009-09-24 18:20:49 UTC (rev 288677)
@@ -767,6 +767,10 @@
        REGISTER_CURL_CONSTANT(CURLE_SSH);
#endif

+#if LIBCURL_VERSION_NUM > 0x071301
+       REGISTER_CURL_CONSTANT(CURLOPT_POSTREDIR);
+#endif
+
#if LIBCURL_VERSION_NUM >= 0x071304
        REGISTER_CURL_CONSTANT(CURLOPT_REDIR_PROTOCOLS);
        REGISTER_CURL_CONSTANT(CURLOPT_PROTOCOLS);
@@ -1685,6 +1689,12 @@
                        }
                        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:

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to