The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7974
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Since commit aef8f1928 ("shared/simplestreams: Implement caching support") the index url contains double '/' between the host part and the path part, so the resulting url looks like: https://STREAMSERVER//streams/v1/index.json Certain servers will literaly take '/streams/v1/index.json' as the path, and therefore return 404 or 403. Fix parseStream(), by removing the prepended '/' passed to s.cachedDownload(). Signed-off-by: Shmulik Ladkani <shmulik.ladk...@gmail.com>
From 961a1c019ea700cbbc692686979b20fd2f489b0b Mon Sep 17 00:00:00 2001 From: Shmulik Ladkani <shmulik.ladk...@gmail.com> Date: Thu, 1 Oct 2020 12:51:53 +0300 Subject: [PATCH] shared/simplestreams: Fix stream's index download url Since commit aef8f1928 ("shared/simplestreams: Implement caching support") the index url contains double '/' between the host part and the path part, so the resulting url looks like: https://STREAMSERVER//streams/v1/index.json Certain servers will literaly take '/streams/v1/index.json' as the path, and therefore return 404 or 403. Fix parseStream(), by removing the prepended '/' passed to s.cachedDownload(). Signed-off-by: Shmulik Ladkani <shmulik.ladk...@gmail.com> --- shared/simplestreams/simplestreams.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/simplestreams/simplestreams.go b/shared/simplestreams/simplestreams.go index 59841b419e..fd420326a3 100644 --- a/shared/simplestreams/simplestreams.go +++ b/shared/simplestreams/simplestreams.go @@ -148,7 +148,7 @@ func (s *SimpleStreams) parseStream() (*Stream, error) { return s.cachedStream, nil } - body, err := s.cachedDownload("/streams/v1/index.json") + body, err := s.cachedDownload("streams/v1/index.json") if err != nil { return nil, err }
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel