Ticket #24598: 24598.2.diff
File 24598.2.diff, 1.2 KB (added by , 9 years ago) |
---|
-
src/wp-includes/class-wp-http-ixr-client.php
64 64 ); 65 65 66 66 // Merge Custom headers ala #8145 67 foreach ( $this->headers as $header => $value ) 67 foreach ( $this->headers as $header => $value ) { 68 68 $args['headers'][$header] = $value; 69 } 69 70 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 ) { 71 75 $args['timeout'] = $this->timeout; 76 } 72 77 73 78 // Now send the request 74 if ( $this->debug ) 79 if ( $this->debug ) { 75 80 echo '<pre class="ixr_request">' . htmlspecialchars($xml) . "\n</pre>\n\n"; 81 } 76 82 77 83 $response = wp_remote_post($url, $args); 78 84 … … 88 94 return false; 89 95 } 90 96 91 if ( $this->debug ) 97 if ( $this->debug ) { 92 98 echo '<pre class="ixr_response">' . htmlspecialchars( wp_remote_retrieve_body( $response ) ) . "\n</pre>\n\n"; 99 } 93 100 94 101 // Now parse what we've got back 95 102 $this->message = new IXR_Message( wp_remote_retrieve_body( $response ) );