From d80153d063eb14f536abc520935a599690a51bc4 Mon Sep 17 00:00:00 2001 From: hliasa Date: Thu, 13 Jul 2023 12:04:37 +0300 Subject: [PATCH] Include path in HTTP source repository type URI This fix allows HTTP source repository type URL in the form of "https://example.com/updates/subfolder". Before the fix the update URL would become (e.g. for app-v1.2.3.zip) "https://example.com/app-v1.2.3.zip" when it should be "https://example.com/updates/subfolder/app-v1.2.3.zip". --- src/SourceRepositoryTypes/HttpRepositoryType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SourceRepositoryTypes/HttpRepositoryType.php b/src/SourceRepositoryTypes/HttpRepositoryType.php index 03fb9c6..6d07bf8 100644 --- a/src/SourceRepositoryTypes/HttpRepositoryType.php +++ b/src/SourceRepositoryTypes/HttpRepositoryType.php @@ -203,7 +203,7 @@ public function extractFromHtml(string $content): Collection $releaseVersions = array_combine($files[2], $files[1]); $uri = Uri::createFromString($this->config['repository_url']); - $baseUrl = $uri->getScheme().'://'.$uri->getHost(); + $baseUrl = $uri->getScheme().'://'.$uri->getHost().$uri->getPath(); $releases = collect($releaseVersions)->map(function ($item, $key) use ($baseUrl) { $uri = Uri::createFromString($item);