Changeset 25348
- Timestamp:
- 09/11/2013 08:12:24 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-http.php
r25309 r25348 167 167 WP_Http::buildCookieHeader( $r ); 168 168 169 // Avoid issues where mbstring.func_overload is enabled 170 mbstring_binary_safe_encoding(); 171 169 172 if ( ! isset( $r['headers']['Accept-Encoding'] ) ) { 170 173 if ( $encoding = WP_Http_Encoding::accept_encoding( $url, $r ) ) … … 188 191 189 192 $response = $this->_dispatch_request( $url, $r ); 193 194 reset_mbstring_encoding(); 195 190 196 if ( is_wp_error( $response ) ) 191 197 return $response; … … 1320 1326 */ 1321 1327 private function stream_body( $handle, $data ) { 1322 if ( function_exists( 'ini_get' ) && ( ini_get( 'mbstring.func_overload' ) & 2 ) && function_exists( 'mb_internal_encoding' ) ) {1323 $mb_encoding = mb_internal_encoding();1324 mb_internal_encoding( 'ISO-8859-1' );1325 }1326 1327 1328 $data_length = strlen( $data ); 1328 1329 … … 1336 1337 $bytes_written = $data_length; 1337 1338 } 1338 1339 if ( isset( $mb_encoding ) )1340 mb_internal_encoding( $mb_encoding );1341 1339 1342 1340 // Upon event of this function returning less than strlen( $data ) curl will error with CURLE_WRITE_ERROR
Note: See TracChangeset
for help on using the changeset viewer.