projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
| inline |
side by side
Don't forget to reset CUSTOMREQUEST on method change and defaults restore.
[m6w6/ext-http]
/
http_request_object.c
diff --git
a/http_request_object.c
b/http_request_object.c
index a9bd3bb12c3a436c92efb4275f4c8f93525dd276..ead0870361dd25e9e278f7a0d658548a3d13c5c7 100644
(file)
--- 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;
}