Opened 10 years ago
Closed 10 years ago
#34837 closed defect (bug) (fixed)
Fix handling of HEAD requests in WP_REST_Server
| Reported by: | | Owned by: | |
|---|---|---|---|
| Milestone: | 4.4 | Priority: | normal |
| Severity: | normal | Version: | 4.4 |
| Component: | REST API | Keywords: | has-patch has-unit-tests commit |
| Focuses: | Cc: |
Description
HEAD request handling has been broken in all of the 2.x betas because, surprise, there was no test coverage for it.
The intended behavior for a HEAD request is to use the GET callback method. See how this is handled in 1.2.4
public function dispatch() { switch ( $this->method ) { case 'HEAD': case 'GET': $method = self::METHOD_GET; break; We should do equivalent in the REST server infrastructure.
Attachments (1)
Change History (5)
This ticket was mentioned in Slack in #core by mark. View the logs.
10 years ago
Note: See TracTickets for help on using tickets.
Looks good. Asking for secondary review.