public function sOAuthRequest::get_normalized_http_url in jQuery social stream 7
Same name and namespace in other branches
- 7.2 jquery_social_stream.js.inc \sOAuthRequest::get_normalized_http_url()
 
parses the url and rebuilds it to be scheme://host/path
2 calls to sOAuthRequest::get_normalized_http_url()
- sOAuthRequest::get_signature_base_string in ./
jquery_social_stream.js.inc  - Returns the base string of this request
 - sOAuthRequest::to_url in ./
jquery_social_stream.js.inc  - builds a url usable for a GET request
 
File
- ./
jquery_social_stream.js.inc, line 709  - JS callbacks.
 
Class
Code
public function get_normalized_http_url() {
  $parts = parse_url($this->http_url);
  $port = @$parts['port'];
  $scheme = $parts['scheme'];
  $host = $parts['host'];
  $path = @$parts['path'];
  $port or $port = $scheme == 'https' ? '443' : '80';
  if ($scheme == 'https' && $port != '443' || $scheme == 'http' && $port != '80') {
    $host = "{$host}:{$port}";
  }
  return "{$scheme}://{$host}{$path}";
}