Skip to content

Commit e9a9fd6

Browse files
Merge branch '6.4' into 7.3
* 6.4: [HttpClient] Reject 3xx pushed responses [ProxyManagerBridge] Remove comment that reference github discussion [Routing] Fix matching the "0" URL The BrowserKit history with parameter separator without slash.
2 parents f0b889b + 067e301 commit e9a9fd6

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

AbstractBrowser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ protected function getAbsoluteUri(string $uri): string
661661
$uri = $path.$uri;
662662
}
663663

664-
return preg_replace('#^(.*?//[^/]+)\/.*$#', '$1', $currentUri).$uri;
664+
return preg_replace('#^(.*?//[^/?]+)[/?].*$#', '$1', $currentUri).$uri;
665665
}
666666

667667
/**

Tests/AbstractBrowserTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,15 @@ public function testInternalRequestNull()
891891
$client->getInternalRequest();
892892
}
893893

894+
public function testHistoryWithParametersAndNoSlash()
895+
{
896+
$client = $this->getBrowser();
897+
$client->request('GET', 'https://www.example.com?the=value');
898+
$client->request('GET', '/path/?parameter=value');
899+
900+
$this->assertSame('https://www.example.com/path/?parameter=value', $client->getRequest()->getUri(), '->request() history provides proper base.');
901+
}
902+
894903
public function testFollowRedirectWithoutRequest()
895904
{
896905
$browser = $this->getBrowser();

0 commit comments

Comments
 (0)