Skip to content

Commit 0778924

Browse files
committed
Revert "Drop double / between base path and relative URL's."
We discussed and this should be done with a library. This reverts commit f4e0004.
1 parent c4dd7a6 commit 0778924

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

webapp/src/Service/ExternalContestSourceService.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,10 +1445,6 @@ protected function importSubmission(Event $event, EventData $data): void
14451445
$zipUrl = $data->files[0]->href;
14461446
if (preg_match('/^https?:\/\//', $zipUrl) === 0) {
14471447
// Relative URL, prepend the base URL.
1448-
// If both the base path ends with a / and the zip URL starts with one, drop one of them
1449-
if (str_ends_with($this->basePath, '/') && str_starts_with($zipUrl, '/')) {
1450-
$zipUrl = substr($zipUrl, 1);
1451-
}
14521448
$zipUrl = ($this->basePath ?? '') . $zipUrl;
14531449
}
14541450

0 commit comments

Comments
 (0)