mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
REST API: WP_REST_Request::remove_header() should canonicalize header names.
When headers are stored in WP_REST_Request internally they are canonicalized. This step already happens on setting / getting headers in any way, but was missed when implementing remove_header(). Props TimothyBlynJacobs. Fixes #40347. Built from https://develop.svn.wordpress.org/trunk@40577 git-svn-id: http://core.svn.wordpress.org/trunk@40447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7fd55738be
commit
b0a327cf3c
@ -286,6 +286,7 @@ class WP_REST_Request implements ArrayAccess {
|
||||
* @param string $key Header name.
|
||||
*/
|
||||
public function remove_header( $key ) {
|
||||
$key = $this->canonicalize_header_name( $key );
|
||||
unset( $this->headers[ $key ] );
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.8-alpha-40576';
|
||||
$wp_version = '4.8-alpha-40577';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user