Changeset 25046 for trunk/src/wp-includes/class-http.php
- Timestamp:
- 08/17/2013 01:19:04 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-http.php
r25044 r25046 196 196 } 197 197 198 return $this->_dispatch_request($url, $r); 198 $response = $this->_dispatch_request($url, $r); 199 200 // Append cookies that were used in this request to the response 201 if ( ! empty( $r['cookies'] ) ) { 202 $cookies_set = wp_list_pluck( $response['cookies'], 'name' ); 203 foreach ( $r['cookies'] as $cookie ) { 204 if ( ! in_array( $cookie->name, $cookies_set ) && $cookie->test( $url ) ) { 205 $response['cookies'][] = $cookie; 206 } 207 } 208 } 209 210 return $response; 199 211 } 200 212 … … 638 650 if ( in_array( $response['response']['code'], array( 302, 303 ) ) ) 639 651 $args['method'] = 'GET'; 652 } 653 654 // Include valid cookies in the redirect process 655 if ( ! empty( $response['cookies'] ) ) { 656 foreach ( $response['cookies'] as $cookie ) { 657 if ( $cookie->test( $redirect_location ) ) 658 $args['cookies'][] = $cookie; 659 } 640 660 } 641 661
Note: See TracChangeset
for help on using the changeset viewer.