private function prepare_url() {
    $parts = parse_url($this->request_settings['url']);

    $port   = isset($parts['port']) ? $parts['port'] : false;
    $scheme = $parts['scheme'];
    $host   = $parts['host'];
    $path   = isset($parts['path']) ? $parts['path'] : false;

    $port or $port = ($scheme == 'https') ? '443' : '80';

    if (($scheme == 'https' && $port != '443') || ($scheme == 'http' && $port != '80')) {
      $host = "$host:$port";
    }

    // the scheme and host MUST be lowercase
    $this->request_settings['url'] = strtolower("$scheme://$host");
    // but not the path
    $this->request_settings['url'] .= $path;
  }
private function prepare_url() {
    $parts = parse_url($this->request_settings['url']);

    $port   = isset($parts['port']) ? $parts['port'] : false;
    $scheme = $parts['scheme'];
    $host   = $parts['host'];
    $path   = isset($parts['path']) ? $parts['path'] : false;

    $port or $port = ($scheme == 'https') ? '443' : '80';

    if (($scheme == 'https' && $port != '443') || ($scheme == 'http' && $port != '80')) {
      $host = "$host:$port";
    }

    // the scheme and host MUST be lowercase
    $this->request_settings['url'] = strtolower("$scheme://$host");
    // but not the path
    $this->request_settings['url'] .= $path;
  }
private function prepare_url ( ) { $ parts = parse_url ( $ this -> request_settings [ 'url' ] ) ; $ port = isset ( $ parts [ 'port' ] ) ? $ parts [ 'port' ] : false ; $ scheme = $ parts [ 'scheme' ] ; $ host = $ parts [ 'host' ] ; $ path = isset ( $ parts [ 'path' ] ) ? $ parts [ 'path' ] : false ; $ port or $ port = ( $ scheme == 'https' ) ? '443' : '80' ; if ( ( $ scheme == 'https' && $ port != '443' ) || ( $ scheme == 'http' && $ port != '80' ) ) { $ host = "$host:$port" ; } // the scheme and host MUST be lowercase $ this -> request_settings [ 'url' ] = strtolower ( "$scheme://$host" ) ; // but not the path $ this -> request_settings [ 'url' ] .= $ path ; }
Prepares the URL for use in the base string by ripping it apart and
reconstructing it.

Ref: 3.4.1.2

@return void value is stored to the class array variable '$this->request_settings['url']'
Prepares the URL for use in the base string by ripping it apart and reconstructing it .