Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#18727 closed defect (bug) (duplicate)

wp_remote_request with HTTP Curl Class Does Not Support Custom HTTP Methods

Reported by: zx2c4's profile zx2c4 Owned by:
Milestone: Priority: normal
Severity: major Version: 3.2.1
Component: HTTP API Keywords: has-patch
Focuses: Cc:


Many plugins, such as W3 Super Cache's Varnish integration, require calling custom HTTP methods. For example, the aforementioned integration will call something like "PURGE /url HTTP/1.1" via wp_remote_request to purge cache. While prior versions of Wordpress supported custom methods, the HTTP Curl class notably does not support custom methods.

The fix is simple. The attached patch adds support for custom HTTP methods.

It should be noted that users of W3 Super Cache + Varnish have broken sites as a consequence of this bug.

Attachments (1)

wordpress-curl-http-custom-method-fix.patch (522 bytes) - added by zx2c4 13 years ago.
A simple patch to add custom method support to HTTP Curl class.

Download all attachments as: .zip

Change History (3)

13 years ago

A simple patch to add custom method support to HTTP Curl class.

#1 @dd32
13 years ago

See also: #18589 - Add DELETE/OPTIONS/TRACE to the curl handler.

this looks like a better approach, however, as commented on the above ticket, I'll want to check that all the classes handle the return values in the same way.

#2 @dd32
13 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Actually, closing this as a duplicate of #18589, feel free to post that patch over there

Note: See TracTickets for help on using tickets.