Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#37869 closed defect (bug) (duplicate)

wp-comments-post server protocol change

Reported by: kobashicomputing's profile kobashicomputing Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.6
Component: Comments Keywords:
Focuses: Cc:

Description

Hardcoded HTTP 1.1 is no longer valid anymore. Could be HTTP/2.

Change from this:

<?php
if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) {
        header('Allow: POST');
        header('HTTP/1.1 405 Method Not Allowed');
        header('Content-Type: text/plain');
        exit;
}

To this:

<?php
if ('POST' != $_SERVER['REQUEST_METHOD']) {
  header('Allow: POST');
  header($_SERVER['SERVER_PROTOCOL'] . ' 405 Method Not Allowed');
  header('Content-Type: text/plain');
  exit;
}

Change History (1)

#1 @johnbillion
8 years ago

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

Duplicate of #37863.

Note: See TracTickets for help on using tickets.