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:
parent
31cf95ab47
commit
85dae7d413
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user