From b8bc0b796a66fc51b902f212957f1ea4bcbc91fb Mon Sep 17 00:00:00 2001 From: westi Date: Thu, 7 May 2009 21:49:10 +0000 Subject: [PATCH] Minor tidy up from merge of changes to BackPress. git-svn-id: http://svn.automattic.com/wordpress/trunk@11237 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/http.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/wp-includes/http.php b/wp-includes/http.php index eb17055c11..387c569595 100644 --- a/wp-includes/http.php +++ b/wp-includes/http.php @@ -418,12 +418,11 @@ class WP_Http { if ( !empty( $value ) ) { $key = strtolower( $key ); - - if ( isset( $newheaders[$key] ) ) + if ( isset( $newheaders[$key] ) ) { $newheaders[$key] = array( $newheaders[$key], trim( $value ) ); - else + } else { $newheaders[$key] = trim( $value ); - + } if ( 'set-cookie' == strtolower( $key ) ) $cookies[] = new WP_Http_Cookie( $value ); } @@ -448,8 +447,9 @@ class WP_Http { function buildCookieHeader( &$r ) { if ( ! empty($r['cookies']) ) { $cookies_header = ''; - foreach ( (array) $r['cookies'] as $cookie ) + foreach ( (array) $r['cookies'] as $cookie ) { $cookies_header .= $cookie->getHeaderValue() . '; '; + } $cookies_header = substr( $cookies_header, 0, -2 ); $r['headers']['cookie'] = $cookies_header; } @@ -1292,8 +1292,9 @@ class WP_Http_Curl { if ( !empty( $r['headers'] ) ) { // cURL expects full header strings in each element $headers = array(); - foreach ( $r['headers'] as $name => $value ) + foreach ( $r['headers'] as $name => $value ) { $headers[] = "{$name}: $value"; + } curl_setopt( $handle, CURLOPT_HTTPHEADER, $headers ); }