Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#37869 closed defect (bug) (duplicate)

wp-comments-post server protocol change

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

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
10 years ago

  • Milestone Awaiting Review
  • Resolution → duplicate
  • Status new → closed

Duplicate of #37863.

Note: See TracTickets for help on using tickets.