Opened 11 years ago
Closed 11 years ago
#34837 closed defect (bug) (fixed)
Fix handling of HEAD requests in WP_REST_Server
| Reported by: | danielbachhuber | Owned by: | markjaquith |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | REST API | Version: | 4.4 |
| Severity: | normal | Keywords: | has-patch has-unit-tests commit |
| Cc: | Focuses: |
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)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Looks good. Asking for secondary review.