Opened 16 years ago
Closed 16 years ago
#10855 closed defect (bug) (fixed)
Some WP_HTTP methods support HTTP PUT, but WP doesn't expose that capability
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.9 | Priority: | normal |
Severity: | normal | Version: | 2.8.4 |
Component: | HTTP API | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
The attached adds HTTP PUT support for WP_Http_ExtHTTP and WP_Http_Curl.
WP_Http_Curl tests out OK. WP_Http_ExtHTTP untested.
Attachments (1)
Change History (5)
#2
in reply to:
↑ 1
;
follow-up:
↓ 3
@
16 years ago
Replying to dd32:
Does the ::test() methods check for PUT ability? Would be best to return a not-available error rather than attempting a PUT request with a transport that cant do it..
::test() doesn't check. But as I understand it, all the methods we have that support POST can also support PUT.
This patch is the bare minimum necessary to support PUT requests in these two methods. Other methods supported PUT already.
With this patch:
- WP_Http_Fsockopen: GET, HEAD, POST, PUT, (any)
- WP_Http_Fopen: GET
- WP_Http_Streams: GET, HEAD, POST, PUT, (any)
- WP_Http_ExtHTTP: GET, HEAD, POST, PUT, (could support more: would need more hardcoding)
- WP_Http_Curl: GET, HEAD, POST, PUT, (could support any: would need a default case in the switch)
Note: See
TracTickets for help on using
tickets.
Does the ::test() methods check for PUT ability? Would be best to return a not-available error rather than attempting a PUT request with a transport that cant do it..