X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fphp_http_client_curl.c;h=156c569ec1393b586a4fc76d8c61e2dfc3570122;hb=d758be5353448f9a72764198a6bf9d86b09daa2a;hp=8c38c6c60f287d634b80f89e50ad69ed3b0fc45c;hpb=7a7c528439652b496bd5c62446566f21ba9283bd;p=m6w6%2Fext-http diff --git a/src/php_http_client_curl.c b/src/php_http_client_curl.c index 8c38c6c..156c569 100644 --- a/src/php_http_client_curl.c +++ b/src/php_http_client_curl.c @@ -313,14 +313,14 @@ static int php_http_curle_raw_callback(CURL *ch, curl_infotype type, char *data, return 0; } -static int php_http_curle_header_callback(char *data, size_t n, size_t l, void *arg) +static size_t php_http_curle_header_callback(char *data, size_t n, size_t l, void *arg) { php_http_client_curl_handler_t *h = arg; return php_http_buffer_append(&h->response.headers, data, n * l); } -static int php_http_curle_body_callback(char *data, size_t n, size_t l, void *arg) +static size_t php_http_curle_body_callback(char *data, size_t n, size_t l, void *arg) { php_http_client_curl_handler_t *h = arg; @@ -1202,8 +1202,10 @@ static ZEND_RESULT_CODE php_http_curle_option_set_ssl_tlsauthtype(php_http_optio if (val && Z_LVAL_P(val)) { switch (Z_LVAL_P(val)) { + case CURL_TLSAUTH_NONE: + break; case CURL_TLSAUTH_SRP: - if (CURLE_OK == curl_easy_setopt(ch, opt->option, PHP_HTTP_LIBCURL_TLSAUTH_SRP)) { + if (CURLE_OK == curl_easy_setopt(ch, opt->option, "SRP")) { return SUCCESS; } /* no break */ @@ -1211,7 +1213,7 @@ static ZEND_RESULT_CODE php_http_curle_option_set_ssl_tlsauthtype(php_http_optio return FAILURE; } } - if (CURLE_OK != curl_easy_setopt(ch, opt->option, PHP_HTTP_LIBCURL_TLSAUTH_DEF)) { + if (CURLE_OK != curl_easy_setopt(ch, opt->option, "NONE")) { return FAILURE; } return SUCCESS;