X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http.c;h=6efdedd309afdf410bd18966a3a606d63b8a2fe4;hp=e0f61fc893f027a1525a185a5e81444e5180da1b;hb=bec583518dd611eb52d0969b4cf07abfc30eae97;hpb=af674f03c32f0f56b7f8c67e61c7e86b3ea23be5 diff --git a/http.c b/http.c index e0f61fc..6efdedd 100644 --- a/http.c +++ b/http.c @@ -38,9 +38,17 @@ #include "SAPI.h" #include "php_http.h" +#include "php_http_std_defs.h" #include "php_http_api.h" +#include "php_http_auth_api.h" #include "php_http_curl_api.h" -#include "php_http_std_defs.h" +#include "php_http_cache_api.h" +#include "php_http_curl_api.h" +#include "php_http_date_api.h" +#include "php_http_headers_api.h" +#include "php_http_message_api.h" +#include "php_http_send_api.h" +#include "php_http_url_api.h" #include "phpstr/phpstr.h" @@ -308,9 +316,16 @@ zend_function_entry http_request_class_methods[] = { PHP_ME(HttpRequest, setOptions, NULL, ZEND_ACC_PUBLIC) PHP_ME(HttpRequest, getOptions, NULL, ZEND_ACC_PUBLIC) PHP_ME(HttpRequest, unsetOptions, NULL, ZEND_ACC_PUBLIC) + PHP_ME(HttpRequest, setSslOptions, NULL, ZEND_ACC_PUBLIC) + PHP_ME(HttpRequest, getSslOptions, NULL, ZEND_ACC_PUBLIC) + PHP_ME(HttpRequest, unsetSslOptions, NULL, ZEND_ACC_PUBLIC) - PHP_ME(HttpRequest, addHeader, NULL, ZEND_ACC_PUBLIC) - PHP_ME(HttpRequest, addCookie, NULL, ZEND_ACC_PUBLIC) + PHP_ME(HttpRequest, addHeaders, NULL, ZEND_ACC_PUBLIC) + PHP_ME(HttpRequest, getHeaders, NULL, ZEND_ACC_PUBLIC) + PHP_ME(HttpRequest, unsetHeaders, NULL, ZEND_ACC_PUBLIC) + PHP_ME(HttpRequest, addCookies, NULL, ZEND_ACC_PUBLIC) + PHP_ME(HttpRequest, getCookies, NULL, ZEND_ACC_PUBLIC) + PHP_ME(HttpRequest, unsetCookies, NULL, ZEND_ACC_PUBLIC) PHP_ME(HttpRequest, setMethod, NULL, ZEND_ACC_PUBLIC) PHP_ME(HttpRequest, getMethod, NULL, ZEND_ACC_PUBLIC) @@ -339,6 +354,7 @@ zend_function_entry http_request_class_methods[] = { PHP_ME(HttpRequest, getResponseData, NULL, ZEND_ACC_PUBLIC) PHP_ME(HttpRequest, getResponseHeader, NULL, ZEND_ACC_PUBLIC) + PHP_ME(HttpRequest, getResponseCookie, NULL, ZEND_ACC_PUBLIC) PHP_ME(HttpRequest, getResponseCode, NULL, ZEND_ACC_PUBLIC) PHP_ME(HttpRequest, getResponseBody, NULL, ZEND_ACC_PUBLIC) PHP_ME(HttpRequest, getResponseInfo, NULL, ZEND_ACC_PUBLIC) @@ -385,6 +401,9 @@ static void php_http_init_globals(zend_http_globals *http_globals) http_globals->lmod = 0; #ifdef HTTP_HAVE_CURL phpstr_init_ex(&http_globals->curlbuf, HTTP_CURLBUF_SIZE, 0); +# if LIBCURL_VERSION_NUM < 0x070c00 + memset(&http_globals->curlerr, 0, sizeof(http_globals->curlerr)); +# endif zend_llist_init(&http_globals->to_free, sizeof(char *), free_to_free, 0); #endif http_globals->allowed_methods = NULL; @@ -518,6 +537,9 @@ PHP_RSHUTDOWN_FUNCTION(http) } #ifdef HTTP_HAVE_CURL +# if LIBCURL_VERSION_NUM < 0x070c00 + memset(&HTTP_G(curlerr), 0, sizeof(HTTP_G(curlerr))); +# endif phpstr_dtor(&HTTP_G(curlbuf)); #endif