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
This commit is contained in:
Andrew Nacin 2014-03-15 05:01:14 +00:00
parent eb19a09f5b
commit d86ff4adc4
2 changed files with 10 additions and 1 deletions

View File

@ -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;

View File

@ -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;