Skip to content

Commit 90e10a2

Browse files
authored
Merge pull request #480 from SerheyDolgushev/extend_server_uri_parts
Allowed server URI parts are extended: added user and pass
2 parents 7560f30 + 341212a commit 90e10a2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ProxyClient/HttpDispatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ private function setServers(array $servers)
249249
{
250250
$this->servers = [];
251251
foreach ($servers as $server) {
252-
$this->servers[] = $this->filterUri($server, ['scheme', 'host', 'port']);
252+
$this->servers[] = $this->filterUri($server, ['scheme', 'user', 'pass', 'host', 'port']);
253253
}
254254
}
255255

tests/Unit/ProxyClient/HttpDispatcherTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ public function testSetServersThrowsWeirdInvalidUrlException()
265265
public function testSetServersThrowsInvalidServerException()
266266
{
267267
$this->expectException(InvalidUrlException::class);
268-
$this->expectExceptionMessage('Server "http://127.0.0.1:80/some/path" is invalid. Only scheme, host, port URL parts are allowed');
268+
$this->expectExceptionMessage('Server "http://127.0.0.1:80/some/path" is invalid. Only scheme, user, pass, host, port URL parts are allowed');
269269

270270
new HttpDispatcher(['http://127.0.0.1:80/some/path']);
271271
}

0 commit comments

Comments
 (0)