Ticket #34796: class-http.diff
| File class-http.diff, 799 bytes (added by , 10 years ago) |
|---|
-
class-http.php
900 900 */ 901 901 public function request($url, $args = array()) { 902 902 $defaults = array( 903 'method' => 'GET', 'timeout' => 5, 903 'method' => 'GET', 'timeout' => 5, 'usleep' => 0, 904 904 'redirection' => 5, 'httpversion' => '1.0', 905 905 'blocking' => true, 906 906 'headers' => array(), 'body' => null, 'cookies' => array() … … 1077 1077 fwrite($handle, $strHeaders); 1078 1078 1079 1079 if ( ! $r['blocking'] ) { 1080 usleep( $r['usleep'] ); 1080 1081 stream_set_blocking( $handle, 0 ); 1081 1082 fclose( $handle ); 1082 1083 return array( 'headers' => array(), 'body' => '', 'response' => array('code' => false, 'message' => false), 'cookies' => array() );