Make WordPress Core

Ticket #24598: 24598.2.diff

File 24598.2.diff, 1.2 KB (added by ericmann, 9 years ago)

Updated patch file.

  • src/wp-includes/class-wp-http-ixr-client.php

     
    6464                );
    6565
    6666                // Merge Custom headers ala #8145
    67                 foreach ( $this->headers as $header => $value )
     67                foreach ( $this->headers as $header => $value ) {
    6868                        $args['headers'][$header] = $value;
     69                }
    6970
    70                 if ( $this->timeout !== false )
     71                // Filter headers for other custom data
     72                $args['headers'] = apply_filters( 'wp_http_ixr_client_headers', $args['headers'] );
     73
     74                if ( $this->timeout !== false ) {
    7175                        $args['timeout'] = $this->timeout;
     76                }
    7277
    7378                // Now send the request
    74                 if ( $this->debug )
     79                if ( $this->debug ) {
    7580                        echo '<pre class="ixr_request">' . htmlspecialchars($xml) . "\n</pre>\n\n";
     81                }
    7682
    7783                $response = wp_remote_post($url, $args);
    7884
     
    8894                        return false;
    8995                }
    9096
    91                 if ( $this->debug )
     97                if ( $this->debug ) {
    9298                        echo '<pre class="ixr_response">' . htmlspecialchars( wp_remote_retrieve_body( $response ) ) . "\n</pre>\n\n";
     99                }
    93100
    94101                // Now parse what we've got back
    95102                $this->message = new IXR_Message( wp_remote_retrieve_body( $response ) );