Ticket #26010: 26010.diff
| File 26010.diff, 1.2 KB (added by , 13 years ago) |
|---|
-
wp-includes/class-http.php
1108 1108 function request($url, $args = array()) { 1109 1109 $defaults = array( 1110 1110 'method' => 'GET', 'timeout' => 5, 1111 'redirection' => 5, 'httpversion' => '1.0',1111 'redirection' => 5, 'httpversion' => null, 1112 1112 'blocking' => true, 1113 1113 'headers' => array(), 'body' => null, 'cookies' => array() 1114 1114 ); … … 1220 1220 curl_setopt( $handle, CURLOPT_HTTPHEADER, $headers ); 1221 1221 } 1222 1222 1223 if ( $r['httpversion'] == '1.0' ) 1224 curl_setopt( $handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0 ); 1225 else 1226 curl_setopt( $handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1 ); 1223 // If the version is not set explicitly, let cURL figure things out 1224 if ( !empty( $r['httpversion'] ) ) { 1225 if ( $r['httpversion'] == '1.0' ) 1226 curl_setopt( $handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0 ); 1227 else 1228 curl_setopt( $handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1 ); 1229 } 1227 1230 1228 1231 // Cookies are not handled by the HTTP API currently. Allow for plugin authors to handle it 1229 1232 // themselves... Although, it is somewhat pointless without some reference.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)