Ticket #37843: 37843.patch
File 37843.patch, 1.3 KB (added by , 8 years ago) |
---|
-
src/wp-includes/class-http.php
140 140 * @type string $filename Filename of the file to write to when streaming. $stream must be 141 141 * set to true. Default null. 142 142 * @type int $limit_response_size Size in bytes to limit the response to. Default null. 143 * @type Requests_Hooks $request_hooks Hooks for Requests. 143 144 * 144 145 * } 145 146 * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. … … 202 203 'stream' => false, 203 204 'filename' => null, 204 205 'limit_response_size' => null, 206 'request_hooks' => null, 205 207 ); 206 208 207 209 // Pre-parse for the HEAD checks. … … 296 298 $headers = $r['headers']; 297 299 $data = $r['body']; 298 300 $type = $r['method']; 301 $hooks = $r['request_hooks']; 302 if ( ! ( $hooks instanceof Requests_Hooks ) ) { 303 $hooks = new Requests_Hooks(); 304 } 299 305 $options = array( 300 306 'timeout' => $r['timeout'], 301 307 'useragent' => $r['user-agent'], 302 308 'blocking' => $r['blocking'], 303 'hooks' => new Requests_Hooks(),309 'hooks' => $hooks, 304 310 ); 305 311 306 312 // Ensure redirects follow browser behaviour.