X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_request_object.c;h=ead0870361dd25e9e278f7a0d658548a3d13c5c7;hp=a9bd3bb12c3a436c92efb4275f4c8f93525dd276;hb=c5eec6611ed1dd1e9e984deb007bc11c92784451;hpb=ab7ffb9d04418a394dec4604f88a3aa5d94b9a08 diff --git a/http_request_object.c b/http_request_object.c index a9bd3bb..ead0870 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -982,6 +982,11 @@ 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; }