From a0b353aee79cf73b632d81d3426697c5413da280 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 6 Nov 2006 10:31:24 +0000 Subject: [PATCH] - added missing ssl version constants --- http_request_api.c | 9 ++++++++- http_request_object.c | 14 ++++++++++++-- package.xml | 4 +++- package2.xml | 2 ++ 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/http_request_api.c b/http_request_api.c index ea63dfa..4fddd30 100644 --- a/http_request_api.c +++ b/http_request_api.c @@ -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); diff --git a/http_request_object.c b/http_request_object.c index f158ceb..3b40bd2 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -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); diff --git a/package.xml b/package.xml index 13f2f73..ce57cf9 100644 --- a/package.xml +++ b/package.xml @@ -24,11 +24,13 @@ support. Parallel requests are available for PHP 5 and greater. 1.4.0dev - 2006-11-05 + 2006-11-06 BSD, revised stable + 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 diff --git a/package2.xml b/package2.xml index adfef31..5866912 100644 --- a/package2.xml +++ b/package2.xml @@ -41,6 +41,8 @@ support. Parallel requests are available for PHP 5 and greater. -- 2.30.2