WordPress.org

Make WordPress Core

Changeset 29663


Ignore:
Timestamp:
09/02/2014 04:47:14 AM (5 years ago)
Author:
nacin
Message:

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

props SergeyBiryukov.
fixes #27498.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/canonical.php

    r28958 r29663  
    4040    global $wp_rewrite, $is_IIS, $wp_query, $wpdb;
    4141
    42     if ( isset( $_SERVER['REQUEST_METHOD'] ) && 'GET' !== $_SERVER['REQUEST_METHOD'] ) {
     42    if ( isset( $_SERVER['REQUEST_METHOD'] ) && ! in_array( strtoupper( $_SERVER['REQUEST_METHOD'] ), array( 'GET', 'HEAD' ) ) ) {
    4343        return;
    4444    }
Note: See TracChangeset for help on using the changeset viewer.