- added missing ssl version constants
authorMichael Wallner <mike@php.net>
Mon, 6 Nov 2006 10:31:24 +0000 (10:31 +0000)
committerMichael Wallner <mike@php.net>
Mon, 6 Nov 2006 10:31:24 +0000 (10:31 +0000)
http_request_api.c
http_request_object.c
package.xml
package2.xml

index ea63dfa6df2ee4d4f35bcd0f1d793ea4b2c6864d..4fddd30b5ed52c82f64c13d9c1ebabf212c1165d 100644 (file)
@@ -109,11 +109,18 @@ PHP_MINIT_FUNCTION(http_request)
        HTTP_LONG_CONSTANT("HTTP_AUTH_BASIC", CURLAUTH_BASIC);
        HTTP_LONG_CONSTANT("HTTP_AUTH_DIGEST", CURLAUTH_DIGEST);
        HTTP_LONG_CONSTANT("HTTP_AUTH_NTLM", CURLAUTH_NTLM);
+       HTTP_LONG_CONSTANT("HTTP_AUTH_GSSNEG", CURLAUTH_GSSNEGOTIATE);
        HTTP_LONG_CONSTANT("HTTP_AUTH_ANY", CURLAUTH_ANY);
        
-       HTTP_LONG_CONSTANT("HTTP_VERSION_NONE", CURL_HTTP_VERSION_NONE);
+       HTTP_LONG_CONSTANT("HTTP_VERSION_NONE", CURL_HTTP_VERSION_NONE); /* to be removed */
        HTTP_LONG_CONSTANT("HTTP_VERSION_1_0", CURL_HTTP_VERSION_1_0);
        HTTP_LONG_CONSTANT("HTTP_VERSION_1_1", CURL_HTTP_VERSION_1_1);
+       HTTP_LONG_CONSTANT("HTTP_VERSION_ANY", CURL_HTTP_VERSION_NONE);
+       
+       HTTP_LONG_CONSTANT("HTTP_SSL_VERSION_TLSv1", CURL_SSLVERSION_TLSv1);
+       HTTP_LONG_CONSTANT("HTTP_SSL_VERSION_SSLv2", CURL_SSLVERSION_SSLv2);
+       HTTP_LONG_CONSTANT("HTTP_SSL_VERSION_SSLv3", CURL_SSLVERSION_SSLv3);
+       HTTP_LONG_CONSTANT("HTTP_SSL_VERSION_ANY", CURL_SSLVERSION_DEFAULT);
        
        HTTP_LONG_CONSTANT("HTTP_IPRESOLVE_V4", CURL_IPRESOLVE_V4);
        HTTP_LONG_CONSTANT("HTTP_IPRESOLVE_V6", CURL_IPRESOLVE_V6);
index f158ceb8c61db920ec71d95f2cca13f0931143f6..3b40bd27caf36cf0f43eaf0ecfbf3a9c0647a422 100644 (file)
@@ -395,7 +395,16 @@ PHP_MINIT_FUNCTION(http_request_object)
        */
        DCL_CONST(long, "VERSION_1_0", CURL_HTTP_VERSION_1_0);
        DCL_CONST(long, "VERSION_1_1", CURL_HTTP_VERSION_1_1);
-       DCL_CONST(long, "VERSION_NONE", CURL_HTTP_VERSION_NONE);
+       DCL_CONST(long, "VERSION_NONE", CURL_HTTP_VERSION_NONE); /* to be removed */
+       DCL_CONST(long, "VERSION_ANY", CURL_HTTP_VERSION_NONE);
+
+       /*
+       * SSL Version Constants
+       */
+       DCL_CONST(long, "SSL_VERSION_TLSv1", CURL_SSLVERSION_TLSv1);
+       DCL_CONST(long, "SSL_VERSION_SSLv2", CURL_SSLVERSION_SSLv2);
+       DCL_CONST(long, "SSL_VERSION_SSLv3", CURL_SSLVERSION_SSLv3);
+       DCL_CONST(long, "SSL_VERSION_ANY", CURL_SSLVERSION_DEFAULT);
 
        /*
        * DNS IPvX resolving
@@ -410,6 +419,7 @@ PHP_MINIT_FUNCTION(http_request_object)
        DCL_CONST(long, "AUTH_BASIC", CURLAUTH_BASIC);
        DCL_CONST(long, "AUTH_DIGEST", CURLAUTH_DIGEST);
        DCL_CONST(long, "AUTH_NTLM", CURLAUTH_NTLM);
+       DCL_CONST(long, "AUTH_GSSNEG", CURLAUTH_GSSNEGOTIATE);
        DCL_CONST(long, "AUTH_ANY", CURLAUTH_ANY);
        
        /*
@@ -548,7 +558,7 @@ STATUS _http_request_object_requesthandler(http_request_object *obj, zval *this_
                        
                        if (Z_STRLEN_P(put_file)) {
                                php_stream_statbuf ssb;
-                               php_stream *stream = php_stream_open_wrapper_ex(put_file, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL, HTTP_DEFAULT_STREAM_CONTEXT);
+                               php_stream *stream = php_stream_open_wrapper_ex(Z_STRVAL_P(put_file), "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL, HTTP_DEFAULT_STREAM_CONTEXT);
                                
                                if (stream && SUCCESS == php_stream_stat(stream, &ssb)) {
                                        obj->request->body = http_request_body_init_ex(obj->request->body, HTTP_REQUEST_BODY_UPLOADFILE, stream, ssb.sb.st_size, 1);
index 13f2f735219b7967eb3651d2ee03e0769d268e81..ce57cf98677f07cba29639120f65e2e0a1d2f02e 100644 (file)
@@ -24,11 +24,13 @@ support. Parallel requests are available for PHP 5 and greater.
   </maintainers>
  <release>
   <version>1.4.0dev</version>
-  <date>2006-11-05</date>
+  <date>2006-11-06</date>
   <license>BSD, revised</license>
   <state>stable</state>
   <notes>+ Added &quot;ipresolve&quot; request option
 + Added HTTP_IPRESOLVE_{ANY|V4|V6}, HttpRequest::IPRESOLVE_{ANY|V4|V6} constants
++ Added missing HTTP_SSL_VERSION_{ANY|TLSv1|SSLv2|SSLv3}, HttpRequest::SSL_VERSION_{ANY|TLSv1|SSLv2|SSLv3} constants
+* Fixed aborted PUT request when empty put data was set with HttpRequest::setPutData()
 * Fixed crash when using non-associative arrays as request headers
 * Fixed crash when serializing incomplete HttpMessage objects
   </notes>
index adfef3146d0a8618980d6fa4cee7ef10dad406d7..58669124d057f412f24aaa99b1426c902f87b654 100644 (file)
@@ -41,6 +41,8 @@ support. Parallel requests are available for PHP 5 and greater.
  <notes><![CDATA[
 + Added "ipresolve" request option
 + Added HTTP_IPRESOLVE_{ANY|V4|V6}, HttpRequest::IPRESOLVE_{ANY|V4|V6} constants
++ Added missing HTTP_SSL_VERSION_{ANY|TLSv1|SSLv2|SSLv3}, HttpRequest::SSL_VERSION_{ANY|TLSv1|SSLv2|SSLv3} constants
+* Fixed aborted PUT request when empty put data was set with HttpRequest::setPutData()
 * Fixed crash when using non-associative arrays as request headers
 * Fixed crash when serializing incomplete HttpMessage objects
 ]]></notes>