From ea54f7f91c16aa330de9827624bb50d59239fd9e Mon Sep 17 00:00:00 2001 From: dd32 Date: Fri, 2 Jul 2010 07:52:14 +0000 Subject: [PATCH] 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 --- wp-includes/class-http.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index 785979072e..3d7b6c7b6d 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -241,7 +241,7 @@ class WP_Http { $arrURL = parse_url( $url ); 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 ) ) return new WP_Error( 'http_request_failed', __( 'User has blocked requests through HTTP.' ) ); @@ -260,7 +260,7 @@ class WP_Http { if ( ! is_array( $r['headers'] ) ) { $processedHeaders = WP_Http::processHeaders( $r['headers'] ); - $r['headers'] = $processedHeaders['headers']; + $r['headers'] = $processedHeaders['headers']; } if ( isset( $r['headers']['User-Agent'] ) ) { @@ -296,7 +296,7 @@ class WP_Http { $r['body'] = _http_build_query( $r['body'], null, '&' ); else $r['body'] = http_build_query( $r['body'], null, '&' ); - $r['headers']['Content-Type'] = 'application/x-www-form-urlencoded; charset=' . get_option( 'blog_charset' ); + $r['headers']['Content-Type'] = 'application/x-www-form-urlencoded; charset=' . get_option( 'blog_charset' ); $r['headers']['Content-Length'] = strlen( $r['body'] ); } @@ -453,7 +453,7 @@ class WP_Http { } else { $newheaders[$key] = trim( $value ); } - if ( 'set-cookie' == strtolower( $key ) ) + if ( 'set-cookie' == $key ) $cookies[] = new WP_Http_Cookie( $value ); } } @@ -621,7 +621,7 @@ class WP_Http_Fsockopen { if ( isset($r['headers']['User-Agent']) ) { $r['user-agent'] = $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']; unset($r['headers']['user-agent']); } @@ -973,7 +973,7 @@ class WP_Http_Streams { if ( isset($r['headers']['User-Agent']) ) { $r['user-agent'] = $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']; unset($r['headers']['user-agent']); } @@ -1146,7 +1146,7 @@ class WP_Http_ExtHTTP { if ( isset($r['headers']['User-Agent']) ) { $r['user-agent'] = $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']; unset($r['headers']['user-agent']); } @@ -1296,7 +1296,7 @@ class WP_Http_Curl { if ( isset($r['headers']['User-Agent']) ) { $r['user-agent'] = $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']; unset($r['headers']['user-agent']); }