Make WordPress Core

Changeset 17811


Ignore:
Timestamp:
05/05/2011 06:57:29 PM (14 years ago)
Author:
ryan
Message:

Properly handle https in ixr client. Props mdawaffe. fixes #16402

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-http-ixr-client.php

    r17771 r17811  
    99class WP_HTTP_IXR_Client extends IXR_Client {
    1010
    11     function __construct($server, $path = false, $port = 80, $timeout = 15) {
     11    function __construct($server, $path = false, $port = false, $timeout = 15) {
    1212        if ( ! $path ) {
    1313            // Assume we have been given a URL instead
     
    1515            $this->scheme = $bits['scheme'];
    1616            $this->server = $bits['host'];
    17             $this->port = isset($bits['port']) ? $bits['port'] : 80;
     17            $this->port = isset($bits['port']) ? $bits['port'] : $port;
    1818            $this->path = !empty($bits['path']) ? $bits['path'] : '/';
    1919
     
    3737        $xml = $request->getXml();
    3838
    39         $url = $this->scheme . '://' . $this->server . ':' . $this->port . $this->path;
     39        $port = $this->port ? ":$this->port" : '';
     40        $url = $this->scheme . '://' . $this->server . $port . $this->path;
    4041        $args = array(
    4142            'headers'    => array('Content-Type' => 'text/xml'),
Note: See TracChangeset for help on using the changeset viewer.