WordPress.org

Make WordPress Core

Opened 3 months ago

Last modified 2 months ago

#43605 new enhancement

Add HTTP/1.0 emulation to apiRequest()

Reported by: pento Owned by:
Milestone: 5.0 Priority: normal
Severity: normal Version:
Component: REST API Keywords: needs-patch
Focuses: rest-api Cc:

Description

HTTP/1.1 is nice, but the verbs are fairly strictly filtered by a bunch of web application firewalls.

For wider compatibility, we should default to HTTP/1.0, making use of the X-HTTP-Method-Override header.

See https://github.com/WordPress/gutenberg/pull/5741 for an example shim, and examples of broken sites.

Change History (1)

#1 @pento
2 months ago

It looks like modsec has some interesting rules that block form encoded strings, but don't block JSON encoded strings. So, we should send things as JSON.

See: https://github.com/WordPress/gutenberg/pull/5971

Note: See TracTickets for help on using tickets.