From: Michael Wallner Date: Fri, 13 Jan 2006 14:30:46 +0000 (+0000) Subject: - reset CURLOPT_CUSTOMREQUEST at the correct places X-Git-Tag: RELEASE_1_0_4~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=890a33b0f67eceab9885db7a2a9f46de0ea961f5;p=m6w6%2Fext-http - reset CURLOPT_CUSTOMREQUEST at the correct places --- diff --git a/http_request_api.c b/http_request_api.c index e949bf4..1da4e33 100644 --- a/http_request_api.c +++ b/http_request_api.c @@ -643,6 +643,7 @@ PHP_HTTP_API STATUS _http_request_prepare(http_request *request, HashTable *opti switch (request->meth) { case HTTP_GET: + HTTP_CURL_OPT(CUSTOMREQUEST, NULL); HTTP_CURL_OPT(NOBODY, 0); HTTP_CURL_OPT(POST, 0); HTTP_CURL_OPT(UPLOAD, 0); @@ -650,6 +651,7 @@ PHP_HTTP_API STATUS _http_request_prepare(http_request *request, HashTable *opti break; case HTTP_HEAD: + HTTP_CURL_OPT(CUSTOMREQUEST, NULL); HTTP_CURL_OPT(POST, 0); HTTP_CURL_OPT(UPLOAD, 0); HTTP_CURL_OPT(HTTPGET, 0); @@ -657,6 +659,7 @@ PHP_HTTP_API STATUS _http_request_prepare(http_request *request, HashTable *opti break; case HTTP_POST: + HTTP_CURL_OPT(CUSTOMREQUEST, NULL); HTTP_CURL_OPT(UPLOAD, 0); HTTP_CURL_OPT(HTTPGET, 0); HTTP_CURL_OPT(NOBODY, 0); @@ -664,6 +667,7 @@ PHP_HTTP_API STATUS _http_request_prepare(http_request *request, HashTable *opti break; case HTTP_PUT: + HTTP_CURL_OPT(CUSTOMREQUEST, NULL); HTTP_CURL_OPT(HTTPGET, 0); HTTP_CURL_OPT(NOBODY, 0); HTTP_CURL_OPT(POST, 0); diff --git a/http_request_object.c b/http_request_object.c index ead0870..a9bd3bb 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -982,11 +982,6 @@ PHP_METHOD(HttpRequest, setMethod) RETURN_FALSE; } - if (meth >= HTTP_GET && meth <= HTTP_PUT) { - getObject(http_request_object, obj); - curl_easy_setopt(obj->request->ch, CURLOPT_CUSTOMREQUEST, NULL); - } - UPD_PROP(long, method, meth); RETURN_TRUE; }