Skip to content

Commit

Permalink
Fixing URL calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
hasbridge committed Nov 18, 2011
1 parent 31cf95a commit 85dae7d
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/Guzzle/Service/Client.php
Expand Up @@ -57,11 +57,6 @@ class Client extends AbstractSubject implements ClientInterface
*/
private $baseUrl;

/**
* @var Url Cached injected base URL
*/
private $injectedBaseUrl;

/**
* @var PoolInterface Pool used internally
*/
Expand Down Expand Up @@ -178,9 +173,7 @@ public function createRequest($method = RequestInterface::GET, $uri = null, $hea
// Use absolute URLs as-is
$url = $this->inject($uri);
} else {
$this->getBaseUrl();
$url = clone $this->injectedBaseUrl;
$url = (string) $url->combine($this->inject($uri));
$url = (string) Url::factory($this->getBaseUrl())->combine($this->inject($uri));
}

return $this->prepareRequest(
Expand Down Expand Up @@ -350,7 +343,6 @@ public function getBaseUrl($inject = true)
public function setBaseUrl($url)
{
$this->baseUrl = $url;
$this->injectedBaseUrl = Url::factory($this->inject($url));

return $this;
}
Expand Down

0 comments on commit 85dae7d

Please sign in to comment.