WordPress.org

Make WordPress Core

Ticket #16402: class-IXR.php.diff

File class-IXR.php.diff, 1013 bytes (added by bryanmaupin, 5 years ago)

patch for r17369

  • trunk/wp-includes/class-IXR.php

     
    622622            if (!$this->path) { 
    623623                $this->path = '/'; 
    624624            } 
     625            // Use port 443 for https URLs 
     626            if ($bits['scheme'] == 'https') { 
     627                $this->port = 443; 
     628            } 
    625629        } else { 
    626630            $this->server = $server; 
    627631            $this->path = $path; 
     
    659663            echo '<pre class="ixr_request">'.htmlspecialchars($request)."\n</pre>\n\n"; 
    660664        } 
    661665 
     666        // Create an SSL connection if the port is 443 
     667        if ($this->port == 443 && in_array('ssl', stream_get_transports())) { 
     668            $this->server = 'ssl://' . $this->server; 
     669        } 
    662670        if ($this->timeout) { 
    663671            $fp = @fsockopen($this->server, $this->port, $errno, $errstr, $this->timeout); 
    664672        } else {