Changeset 9188
- Timestamp:
- 10/15/2008 08:36:23 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/http.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/http.php
r9185 r9188 184 184 185 185 $defaults = array( 186 'method' => 'GET', 'timeout' => apply_filters('http_request_timeout', 3), 187 'redirection' => 5, 'httpversion' => '1.0', 188 'user-agent' => apply_filters('http_headers_useragent', 'WordPress/' . $wp_version ), 186 'method' => 'GET', 187 'timeout' => apply_filters( 'http_request_timeout', 5), 188 'redirection' => apply_filters( 'http_request_redirection_count', 5), 189 'httpversion' => apply_filters( 'http_request_version', '1.0'), 190 'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . $wp_version ), 189 191 'blocking' => true, 190 192 'headers' => array(), 'body' => null … … 192 194 193 195 $r = wp_parse_args( $args, $defaults ); 194 196 $r = apply_filters( 'http_request_args', $r ); 197 195 198 if ( is_null( $r['headers'] ) ) 196 199 $r['headers'] = array(); … … 424 427 function request($url, $args = array()) { 425 428 $defaults = array( 426 'method' => 'GET', 'timeout' => 3,429 'method' => 'GET', 'timeout' => 5, 427 430 'redirection' => 5, 'httpversion' => '1.0', 428 431 'blocking' => true, … … 598 601 599 602 $defaults = array( 600 'method' => 'GET', 'timeout' => 3,603 'method' => 'GET', 'timeout' => 5, 601 604 'redirection' => 5, 'httpversion' => '1.0', 602 605 'blocking' => true, … … 692 695 function request($url, $args = array()) { 693 696 $defaults = array( 694 'method' => 'GET', 'timeout' => 3,697 'method' => 'GET', 'timeout' => 5, 695 698 'redirection' => 5, 'httpversion' => '1.0', 696 699 'blocking' => true, … … 816 819 function request($url, $args = array()) { 817 820 $defaults = array( 818 'method' => 'GET', 'timeout' => 3,821 'method' => 'GET', 'timeout' => 5, 819 822 'redirection' => 5, 'httpversion' => '1.0', 820 823 'blocking' => true, … … 833 836 834 837 switch ( $r['method'] ) { 835 case 'GET':836 $r['method'] = HTTP_METH_GET;837 break;838 838 case 'POST': 839 839 $r['method'] = HTTP_METH_POST; … … 842 842 $r['method'] = HTTP_METH_HEAD; 843 843 break; 844 case 'GET': 844 845 default: 845 846 $r['method'] = HTTP_METH_GET; … … 925 926 function request($url, $args = array()) { 926 927 $defaults = array( 927 'method' => 'GET', 'timeout' => 3,928 'method' => 'GET', 'timeout' => 5, 928 929 'redirection' => 5, 'httpversion' => '1.0', 929 930 'blocking' => true,
Note: See TracChangeset
for help on using the changeset viewer.