You are here

public function OAuthRequest::get_normalized_http_url in OAuth 1.0 6

Same name and namespace in other branches
  1. 6.3 lib/OAuth.php \OAuthRequest::get_normalized_http_url()
  2. 7.3 lib/OAuth.php \OAuthRequest::get_normalized_http_url()

parses the url and rebuilds it to be scheme://host/path

2 calls to OAuthRequest::get_normalized_http_url()
OAuthRequest::get_signature_base_string in ./OAuth.php
Returns the base string of this request
OAuthRequest::to_url in ./OAuth.php
builds a url usable for a GET request

File

./OAuth.php, line 325

Class

OAuthRequest

Code

public function get_normalized_http_url() {

  /*{{{*/
  $parts = parse_url($this->http_url);

  // FIXME: port should handle according to http://groups.google.com/group/oauth/browse_thread/thread/1b203a51d9590226
  $port = isset($parts['port']) && $parts['port'] != '80' ? ':' . $parts['port'] : '';
  $path = isset($parts['path']) ? $parts['path'] : '';
  return $parts['scheme'] . '://' . $parts['host'] . $port . $path;
}