[wp-trac] [WordPress Trac] #37869: wp-comments-post server protocol change
WordPress Trac
noreply at wordpress.org
Mon Aug 29 21:14:10 UTC 2016
#37869: wp-comments-post server protocol change
------------------------------+-----------------------------
Reporter: kobashicomputing | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 4.6
Severity: normal | Keywords:
Focuses: |
------------------------------+-----------------------------
Hardcoded HTTP 1.1 is no longer valid anymore. Could be HTTP/2.
Change from this:
{{{#!php
<?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
<?php
if ('POST' != $_SERVER['REQUEST_METHOD']) {
header('Allow: POST');
header($_SERVER['SERVER_PROTOCOL'] . ' 405 Method Not Allowed');
header('Content-Type: text/plain');
exit;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37869>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list