WordPress.org

Make WordPress Core

Ticket #20219: class-http.php.diff

File class-http.php.diff, 716 bytes (added by Workshopshed, 6 years ago)

dif with one possible fix for this issue

  • .../wp-includes/class-http.php

     
    11151115                        if ( $curl_error = curl_error($handle) )
    11161116                                return new WP_Error('http_request_failed', $curl_error);
    11171117                        if ( in_array( curl_getinfo( $handle, CURLINFO_HTTP_CODE ), array(301, 302) ) )
    1118                     return new WP_Error('http_request_failed', __('Too many redirects.'));
     1118                                 if ( $r['redirection']-- > 0 ) {
     1119                                        return $this->request( $theHeaders['headers']['location'], $r );
     1120                                } else {
     1121                                        return new WP_Error( 'http_request_failed', __( 'Too many redirects3.' ) );
     1122                                }
    11191123                }
    11201124
    11211125                $this->headers = '';