mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-10 02:18:58 +01:00
Remove redundant strtolower() in WP_HTTP. Props rmccue. Fixes #14168
git-svn-id: http://svn.automattic.com/wordpress/trunk@15362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
68849c1bd5
commit
ea54f7f91c
@ -241,7 +241,7 @@ class WP_Http {
|
|||||||
$arrURL = parse_url( $url );
|
$arrURL = parse_url( $url );
|
||||||
|
|
||||||
if ( empty( $url ) || empty( $arrURL['scheme'] ) )
|
if ( empty( $url ) || empty( $arrURL['scheme'] ) )
|
||||||
return new WP_Error( 'http_request_failed', __( 'A valid URL was not provided.' ) );
|
return new WP_Error('http_request_failed', __('A valid URL was not provided.'));
|
||||||
|
|
||||||
if ( $this->block_request( $url ) )
|
if ( $this->block_request( $url ) )
|
||||||
return new WP_Error( 'http_request_failed', __( 'User has blocked requests through HTTP.' ) );
|
return new WP_Error( 'http_request_failed', __( 'User has blocked requests through HTTP.' ) );
|
||||||
@ -453,7 +453,7 @@ class WP_Http {
|
|||||||
} else {
|
} else {
|
||||||
$newheaders[$key] = trim( $value );
|
$newheaders[$key] = trim( $value );
|
||||||
}
|
}
|
||||||
if ( 'set-cookie' == strtolower( $key ) )
|
if ( 'set-cookie' == $key )
|
||||||
$cookies[] = new WP_Http_Cookie( $value );
|
$cookies[] = new WP_Http_Cookie( $value );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -621,7 +621,7 @@ class WP_Http_Fsockopen {
|
|||||||
if ( isset($r['headers']['User-Agent']) ) {
|
if ( isset($r['headers']['User-Agent']) ) {
|
||||||
$r['user-agent'] = $r['headers']['User-Agent'];
|
$r['user-agent'] = $r['headers']['User-Agent'];
|
||||||
unset($r['headers']['User-Agent']);
|
unset($r['headers']['User-Agent']);
|
||||||
} else if( isset($r['headers']['user-agent']) ) {
|
} else if ( isset($r['headers']['user-agent']) ) {
|
||||||
$r['user-agent'] = $r['headers']['user-agent'];
|
$r['user-agent'] = $r['headers']['user-agent'];
|
||||||
unset($r['headers']['user-agent']);
|
unset($r['headers']['user-agent']);
|
||||||
}
|
}
|
||||||
@ -973,7 +973,7 @@ class WP_Http_Streams {
|
|||||||
if ( isset($r['headers']['User-Agent']) ) {
|
if ( isset($r['headers']['User-Agent']) ) {
|
||||||
$r['user-agent'] = $r['headers']['User-Agent'];
|
$r['user-agent'] = $r['headers']['User-Agent'];
|
||||||
unset($r['headers']['User-Agent']);
|
unset($r['headers']['User-Agent']);
|
||||||
} else if( isset($r['headers']['user-agent']) ) {
|
} else if ( isset($r['headers']['user-agent']) ) {
|
||||||
$r['user-agent'] = $r['headers']['user-agent'];
|
$r['user-agent'] = $r['headers']['user-agent'];
|
||||||
unset($r['headers']['user-agent']);
|
unset($r['headers']['user-agent']);
|
||||||
}
|
}
|
||||||
@ -1146,7 +1146,7 @@ class WP_Http_ExtHTTP {
|
|||||||
if ( isset($r['headers']['User-Agent']) ) {
|
if ( isset($r['headers']['User-Agent']) ) {
|
||||||
$r['user-agent'] = $r['headers']['User-Agent'];
|
$r['user-agent'] = $r['headers']['User-Agent'];
|
||||||
unset($r['headers']['User-Agent']);
|
unset($r['headers']['User-Agent']);
|
||||||
} else if( isset($r['headers']['user-agent']) ) {
|
} else if ( isset($r['headers']['user-agent']) ) {
|
||||||
$r['user-agent'] = $r['headers']['user-agent'];
|
$r['user-agent'] = $r['headers']['user-agent'];
|
||||||
unset($r['headers']['user-agent']);
|
unset($r['headers']['user-agent']);
|
||||||
}
|
}
|
||||||
@ -1296,7 +1296,7 @@ class WP_Http_Curl {
|
|||||||
if ( isset($r['headers']['User-Agent']) ) {
|
if ( isset($r['headers']['User-Agent']) ) {
|
||||||
$r['user-agent'] = $r['headers']['User-Agent'];
|
$r['user-agent'] = $r['headers']['User-Agent'];
|
||||||
unset($r['headers']['User-Agent']);
|
unset($r['headers']['User-Agent']);
|
||||||
} else if( isset($r['headers']['user-agent']) ) {
|
} else if ( isset($r['headers']['user-agent']) ) {
|
||||||
$r['user-agent'] = $r['headers']['user-agent'];
|
$r['user-agent'] = $r['headers']['user-agent'];
|
||||||
unset($r['headers']['user-agent']);
|
unset($r['headers']['user-agent']);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user