forked from kevadesu/forgejo
Fix go-get URL generation (#5905)
This commit is contained in:
parent
57a69ef277
commit
80098bd752
3 changed files with 5 additions and 3 deletions
|
@ -8,6 +8,7 @@ package context
|
|||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/url"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
|
@ -171,7 +172,7 @@ func RetrieveBaseRepo(ctx *Context, repo *models.Repository) {
|
|||
|
||||
// ComposeGoGetImport returns go-get-import meta content.
|
||||
func ComposeGoGetImport(owner, repo string) string {
|
||||
return path.Join(setting.Domain, setting.AppSubURL, owner, repo)
|
||||
return path.Join(setting.Domain, setting.AppSubURL, url.QueryEscape(owner), url.QueryEscape(repo))
|
||||
}
|
||||
|
||||
// EarlyResponseForGoGetMeta responses appropriate go-get meta with status 200
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue