Skip to content

Commit 753536c

Browse files
nicholascusDavertMik
authored andcommitted
do not add leading slash when there is one already fix #5473 (#5474)
1 parent 5cc325d commit 753536c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Codeception/Module/REST.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ protected function execute($method, $url, $parameters = [], $files = [])
577577
// allow full url to be requested
578578
if (strpos($url, '://') === false) {
579579
$url = $this->config['url'] . $url;
580-
if ($this->config['url'] && strpos($url, '://') === false && $this->config['url'][0] !== '/') {
580+
if ($this->config['url'] && strpos($url, '://') === false && strpos($url, '/') !== 0 && $this->config['url'][0] !== '/') {
581581
$url = '/' . $url;
582582
}
583583
}

0 commit comments

Comments
 (0)