From: Michael Wallner Date: Fri, 31 Jul 2009 08:26:52 +0000 (+0000) Subject: Added postredir request options constants X-Git-Tag: RELEASE_1_7_0b2~21 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=e9d9046a032eb0db268befada723a64d0b951d9f;p=m6w6%2Fext-http Added postredir request options constants --- diff --git a/http_request_api.c b/http_request_api.c index adc3a56..904e3e4 100644 --- a/http_request_api.c +++ b/http_request_api.c @@ -192,7 +192,13 @@ PHP_MINIT_FUNCTION(http_request) HTTP_LONG_CONSTANT("HTTP_PROXY_SOCKS5", CURLPROXY_SOCKS5); HTTP_LONG_CONSTANT("HTTP_PROXY_HTTP", CURLPROXY_HTTP); #if HTTP_CURL_VERSION(7,19,4) - TTP_LONG_CONSTANT("HTTP_PROXY_HTTP_1_0", CURLPROXY_HTTP_1_0); + HTTP_LONG_CONSTANT("HTTP_PROXY_HTTP_1_0", CURLPROXY_HTTP_1_0); +#endif + +#if HTTP_CURL_VERSION(7,19,1) + HTTP_LONG_CONSTANT("HTTP_POSTREDIR_301", CURL_REDIR_POST_301); + HTTP_LONG_CONSTANT("HTTP_POSTREDIR_302", CURL_REDIR_POST_302); + HTTP_LONG_CONSTANT("HTTP_POSTREDIR_ALL", CURL_REDIR_POST_ALL); #endif return SUCCESS; } diff --git a/http_request_object.c b/http_request_object.c index 09c43a5..be4b77d 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -452,6 +452,15 @@ PHP_MINIT_FUNCTION(http_request_object) zend_declare_class_constant_long(THIS_CE, ZEND_STRS("PROXY_HTTP_1_0")-1, CURLPROXY_HTTP_1_0 TSRMLS_CC); # endif #endif /* WONKY */ + + /* + * Post Redirection Constants + */ +#if HTTP_CURL_VERSION(7,19,1) + zend_declare_class_constant_long(THIS_CE, ZEND_STRS("POSTREDIR_301")-1, CURL_REDIR_POST_301 TSRMLS_CC); + zend_declare_class_constant_long(THIS_CE, ZEND_STRS("POSTREDIR_302")-1, CURL_REDIR_POST_302 TSRMLS_CC); + zend_declare_class_constant_long(THIS_CE, ZEND_STRS("POSTREDIR_ALL")-1, CURL_REDIR_POST_ALL TSRMLS_CC); +#endif return SUCCESS; }