mirror of
https://github.com/guzzle/guzzle.git
synced 2025-05-01 20:28:41 +02:00
Fixing URL calculation
This commit is contained in:
parent
31cf95ab47
commit
85dae7d413
@ -57,11 +57,6 @@ class Client extends AbstractSubject implements ClientInterface
|
|||||||
*/
|
*/
|
||||||
private $baseUrl;
|
private $baseUrl;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var Url Cached injected base URL
|
|
||||||
*/
|
|
||||||
private $injectedBaseUrl;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var PoolInterface Pool used internally
|
* @var PoolInterface Pool used internally
|
||||||
*/
|
*/
|
||||||
@ -178,9 +173,7 @@ class Client extends AbstractSubject implements ClientInterface
|
|||||||
// Use absolute URLs as-is
|
// Use absolute URLs as-is
|
||||||
$url = $this->inject($uri);
|
$url = $this->inject($uri);
|
||||||
} else {
|
} else {
|
||||||
$this->getBaseUrl();
|
$url = (string) Url::factory($this->getBaseUrl())->combine($this->inject($uri));
|
||||||
$url = clone $this->injectedBaseUrl;
|
|
||||||
$url = (string) $url->combine($this->inject($uri));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->prepareRequest(
|
return $this->prepareRequest(
|
||||||
@ -350,7 +343,6 @@ class Client extends AbstractSubject implements ClientInterface
|
|||||||
public function setBaseUrl($url)
|
public function setBaseUrl($url)
|
||||||
{
|
{
|
||||||
$this->baseUrl = $url;
|
$this->baseUrl = $url;
|
||||||
$this->injectedBaseUrl = Url::factory($this->inject($url));
|
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user