[Issue 14877] std.net.curl needs PATCH http method
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Sep 9 01:44:06 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14877
badlink <andrea.9940 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
CC| |andrea.9940 at gmail.com
Resolution|FIXED |---
--- Comment #5 from badlink <andrea.9940 at gmail.com> ---
The current version in phobos of std.net.curl.patch does not upload any data in
the http request.
Small testcase: http://pastebin.com/UujEqh4K
Expected: the data field in the response should not be empty
---------------------------------
Workaround: change the switch case in std.net.curl.HTTP.perform:
[...]
case Method.patch:
p.curl.set(CurlOption.customrequest, "PATCH");
p.curl.set(CurlOption.upload, 1L); // add this line
opt = CurlOption.customrequest;
break;
[...]
Note: probably this workaround does not leave a clean state.
--
More information about the Digitalmars-d-bugs
mailing list