From 133f8045f3fe05da4934843655427aad9bbc8051 Mon Sep 17 00:00:00 2001 From: Xiaolin Zhang Date: Fri, 27 Dec 2024 14:47:24 +0800 Subject: [PATCH] Fixing the url escape for name of the package URL --- pkg/apk/apk/repository.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/apk/apk/repository.go b/pkg/apk/apk/repository.go index 4810cf037..022a6a715 100644 --- a/pkg/apk/apk/repository.go +++ b/pkg/apk/apk/repository.go @@ -2,6 +2,7 @@ package apk import ( "fmt" + "net/url" "strings" ) @@ -85,7 +86,7 @@ func NewRepositoryPackage(pkg *Package, repo *RepositoryWithIndex) *RepositoryPa } func (rp *RepositoryPackage) URL() string { - return fmt.Sprintf("%s/%s", rp.repository.URI, rp.Filename()) + return fmt.Sprintf("%s/%s", rp.repository.URI, url.QueryEscape(rp.Filename())) } func (rp *RepositoryPackage) Repository() *RepositoryWithIndex {