Ticket #42186: 42186.diff
File 42186.diff, 4.9 KB (added by , 7 years ago) |
---|
-
wp-includes/class-http.php
152 152 * 153 153 * @since 2.7.0 154 154 * 155 * @param int $timeout_value Time in seconds until a request times out. 156 * Default 5.155 * @param int $timeout_value Time in seconds until a request times out. Default 5. 156 * @param string $url The request URL. 157 157 */ 158 'timeout' => apply_filters( 'http_request_timeout', 5 ),158 'timeout' => apply_filters( 'http_request_timeout', 5, $url ), 159 159 /** 160 160 * Filters the number of redirects allowed during an HTTP request. 161 161 * … … 162 162 * @since 2.7.0 163 163 * 164 164 * @param int $redirect_count Number of redirects allowed. Default 5. 165 * @param string $url The request URL. 165 166 */ 166 'redirection' => apply_filters( 'http_request_redirection_count', 5 ),167 'redirection' => apply_filters( 'http_request_redirection_count', 5, $url ), 167 168 /** 168 169 * Filters the version of the HTTP protocol used in a request. 169 170 * 170 171 * @since 2.7.0 171 172 * 172 * @param string $version Version of HTTP used. Accepts '1.0' and '1.1'. 173 * Default '1.0'.173 * @param string $version Version of HTTP used. Accepts '1.0' and '1.1'. Default '1.0'. 174 * @param string $url The request URL. 174 175 */ 175 'httpversion' => apply_filters( 'http_request_version', '1.0' ),176 'httpversion' => apply_filters( 'http_request_version', '1.0', $url ), 176 177 /** 177 178 * Filters the user agent value sent with an HTTP request. 178 179 * … … 179 180 * @since 2.7.0 180 181 * 181 182 * @param string $user_agent WordPress user agent string. 183 * @param string $url The request URL. 182 184 */ 183 'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ) ),185 'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ), $url ), 184 186 /** 185 187 * Filters whether to pass URLs through wp_http_validate_url() in an HTTP request. 186 188 * 187 189 * @since 3.6.0 188 190 * 189 * @param bool $pass_url Whether to pass URLs through wp_http_validate_url(). 190 * Default false.191 * @param bool $pass_url Whether to pass URLs through wp_http_validate_url(). Default false. 192 * @param string $url The request URL. 191 193 */ 192 'reject_unsafe_urls' => apply_filters( 'http_request_reject_unsafe_urls', false ),194 'reject_unsafe_urls' => apply_filters( 'http_request_reject_unsafe_urls', false, $url ), 193 195 'blocking' => true, 194 196 'headers' => array(), 195 197 'cookies' => array(), … … 348 350 * @since 2.8.0 349 351 * 350 352 * @param bool $ssl_verify Whether to verify the SSL connection. Default true. 353 * @param string $url The request URL. 351 354 */ 352 $options['verify'] = apply_filters( 'https_ssl_verify', $options['verify'] );355 $options['verify'] = apply_filters( 'https_ssl_verify', $options['verify'], $url ); 353 356 354 357 // Check for proxies. 355 358 $proxy = new WP_HTTP_Proxy(); -
wp-includes/class-wp-http-curl.php
109 109 $ssl_verify = isset($r['sslverify']) && $r['sslverify']; 110 110 if ( $is_local ) { 111 111 /** This filter is documented in wp-includes/class-wp-http-streams.php */ 112 $ssl_verify = apply_filters( 'https_local_ssl_verify', $ssl_verify );112 $ssl_verify = apply_filters( 'https_local_ssl_verify', $ssl_verify, $url ); 113 113 } elseif ( ! $is_local ) { 114 114 /** This filter is documented in wp-includes/class-wp-http-streams.php */ 115 $ssl_verify = apply_filters( 'https_ssl_verify', $ssl_verify );115 $ssl_verify = apply_filters( 'https_ssl_verify', $ssl_verify, $url ); 116 116 } 117 117 118 118 /* -
wp-includes/class-wp-http-streams.php
93 93 * @since 2.8.0 94 94 * 95 95 * @param bool $ssl_verify Whether to verify the SSL connection. Default true. 96 * @param string $url The request URL. 96 97 */ 97 $ssl_verify = apply_filters( 'https_local_ssl_verify', $ssl_verify );98 $ssl_verify = apply_filters( 'https_local_ssl_verify', $ssl_verify, $url ); 98 99 } elseif ( ! $is_local ) { 99 100 /** 100 101 * Filters whether SSL should be verified for non-local requests. … … 102 103 * @since 2.8.0 103 104 * 104 105 * @param bool $ssl_verify Whether to verify the SSL connection. Default true. 106 * @param string $url The request URL. 105 107 */ 106 $ssl_verify = apply_filters( 'https_ssl_verify', $ssl_verify );108 $ssl_verify = apply_filters( 'https_ssl_verify', $ssl_verify, $url ); 107 109 } 108 110 109 111 $proxy = new WP_HTTP_Proxy();