1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-05-01 12:23:56 +02:00

Fixing URL calculation

This commit is contained in:
Harold Asbridge 2011-11-18 14:08:10 -06:00
parent 31cf95ab47
commit 85dae7d413

View File

@ -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
*/
@ -178,9 +173,7 @@ class Client extends AbstractSubject implements ClientInterface
// 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(
@ -350,7 +343,6 @@ class Client extends AbstractSubject implements ClientInterface
public function setBaseUrl($url)
{
$this->baseUrl = $url;
$this->injectedBaseUrl = Url::factory($this->inject($url));
return $this;
}