Changeset 47808 for trunk/src/wp-includes/class-http.php
- Timestamp:
- 05/16/2020 06:40:52 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-http.php
r47617 r47808 217 217 218 218 // By default, HEAD requests do not cause redirections. 219 if ( isset( $args['method'] ) && 'HEAD' == $args['method'] ) {219 if ( isset( $args['method'] ) && 'HEAD' === $args['method'] ) { 220 220 $defaults['redirection'] = 0; 221 221 } … … 740 740 $newheaders[ $key ] = $value; 741 741 } 742 if ( 'set-cookie' == $key ) {742 if ( 'set-cookie' === $key ) { 743 743 $cookies[] = new WP_Http_Cookie( $value, $url ); 744 744 } … … 871 871 872 872 // Don't block requests back to ourselves by default. 873 if ( 'localhost' == $check['host'] || ( isset( $home['host'] ) && $home['host'] == $check['host'] ) ) {873 if ( 'localhost' === $check['host'] || ( isset( $home['host'] ) && $home['host'] == $check['host'] ) ) { 874 874 /** 875 875 * Filters whether to block local HTTP API requests. … … 976 976 977 977 // If it's a root-relative path, then great. 978 if ( ! empty( $relative_url_parts['path'] ) && '/' == $relative_url_parts['path'][0] ) {978 if ( ! empty( $relative_url_parts['path'] ) && '/' === $relative_url_parts['path'][0] ) { 979 979 $path = $relative_url_parts['path']; 980 980 … … 1041 1041 1042 1042 // POST requests should not POST to a redirected location. 1043 if ( 'POST' == $args['method'] ) {1043 if ( 'POST' === $args['method'] ) { 1044 1044 if ( in_array( $response['response']['code'], array( 302, 303 ), true ) ) { 1045 1045 $args['method'] = 'GET';
Note: See TracChangeset
for help on using the changeset viewer.