Canonical: Apply redirects to HEAD requests too. Adjusts [28958].

props SergeyBiryukov.
fixes #27498.


git-svn-id: https://develop.svn.wordpress.org/trunk@29663 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2014-09-02 04:47:14 +00:00
parent 2f71d7d8e4
commit 7c09b36829
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@
function redirect_canonical( $requested_url = null, $do_redirect = true ) {
global $wp_rewrite, $is_IIS, $wp_query, $wpdb;
if ( isset( $_SERVER['REQUEST_METHOD'] ) && 'GET' !== $_SERVER['REQUEST_METHOD'] ) {
if ( isset( $_SERVER['REQUEST_METHOD'] ) && ! in_array( strtoupper( $_SERVER['REQUEST_METHOD'] ), array( 'GET', 'HEAD' ) ) ) {
return;
}