From d86ff4adc40af1ca3fa170119d6f435074dc61a4 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sat, 15 Mar 2014 05:01:14 +0000 Subject: [PATCH] Allow query strings for servers in IXR_Client and WP_HTTP_IXR_Client. props cfinke. fixes #26947. Built from https://develop.svn.wordpress.org/trunk@27552 git-svn-id: http://core.svn.wordpress.org/trunk@27395 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-IXR.php | 4 ++++ wp-includes/class-wp-http-ixr-client.php | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-IXR.php b/wp-includes/class-IXR.php index 5a2893de6a..7264db6efb 100644 --- a/wp-includes/class-IXR.php +++ b/wp-includes/class-IXR.php @@ -629,6 +629,10 @@ class IXR_Client if (!$this->path) { $this->path = '/'; } + + if ( ! empty( $bits['query'] ) ) { + $this->path .= '?' . $bits['query']; + } } else { $this->server = $server; $this->path = $path; diff --git a/wp-includes/class-wp-http-ixr-client.php b/wp-includes/class-wp-http-ixr-client.php index 736fc5a223..b412e2a2f8 100644 --- a/wp-includes/class-wp-http-ixr-client.php +++ b/wp-includes/class-wp-http-ixr-client.php @@ -18,8 +18,13 @@ class WP_HTTP_IXR_Client extends IXR_Client { $this->path = !empty($bits['path']) ? $bits['path'] : '/'; // Make absolutely sure we have a path - if ( ! $this->path ) + if ( ! $this->path ) { $this->path = '/'; + } + + if ( ! empty( $bits['query'] ) ) { + $this->path .= '?' . $bits['query']; + } } else { $this->scheme = 'http'; $this->server = $server;