Make WordPress Core


Ignore:
Timestamp:
05/13/2016 05:10:52 AM (8 years ago)
Author:
rmccue
Message:

HTTP API: Add browser compatibility hook for 3xx redirects.

WordPress erroneously follows browser-style behaviour with 3xx redirects, where a POST to 302 becomes a GET. Requests instead follows the specification and keeps the same method. Requests also exposes a hook to allow changing the behaviour.

[37428] used the wrong method of adding this hook, now corrected.

See #33055.

File:
1 edited

Legend:

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

    r37428 r37429  
    207207add_filter( 'title_save_pre',           'trim'                                );
    208208
    209 add_filter( 'http_request_host_is_external',    'allowed_http_request_hosts',                          10, 2 );
    210 add_action( 'requests-requests.before_redirect', array( 'WP_Http', 'browser_redirect_compatibility' ), 10, 5 );
     209add_filter( 'http_request_host_is_external',    'allowed_http_request_hosts', 10, 2 );
    211210
    212211// REST API filters.
Note: See TracChangeset for help on using the changeset viewer.