File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
src/Symfony/Component/BrowserKit Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -676,7 +676,7 @@ protected function getAbsoluteUri($uri)
676
676
}
677
677
678
678
// protocol relative URL
679
- if (str_starts_with ($ uri , '// ' )) {
679
+ if (' // ' !== $ uri && str_starts_with ($ uri , '// ' )) {
680
680
return parse_url ($ currentUri , \PHP_URL_SCHEME ).': ' .$ uri ;
681
681
}
682
682
Original file line number Diff line number Diff line change @@ -172,6 +172,18 @@ public function testMultiPartRequestWithAdditionalParametersOfTheSameName()
172
172
]);
173
173
}
174
174
175
+ public function testDoubleForwardSlashRequestPath ()
176
+ {
177
+ $ client = $ this ->createMock (HttpClientInterface::class);
178
+ $ client
179
+ ->expects ($ this ->once ())
180
+ ->method ('request ' )
181
+ ->with ('GET ' , 'http://localhost// ' )
182
+ ->willReturn ($ this ->createMock (ResponseInterface::class));
183
+ $ browser = new HttpBrowser ($ client );
184
+ $ browser ->request ('GET ' , '// ' );
185
+ }
186
+
175
187
private function uploadFile (string $ data ): string
176
188
{
177
189
$ path = tempnam (sys_get_temp_dir (), 'http ' );
You can’t perform that action at this time.
0 commit comments