Make WordPress Core

Ticket #27498: 27498.2.patch

File 27498.2.patch, 589 bytes (added by SergeyBiryukov, 10 years ago)
  • src/wp-includes/canonical.php

     
    3939function redirect_canonical( $requested_url = null, $do_redirect = true ) {
    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        }
    4545