mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Implemented index.txt check
This commit is contained in:
parent
30789e60d5
commit
57f8f06257
3 changed files with 87 additions and 28 deletions
|
|
@ -36,11 +36,14 @@ func basePath(p string) (string, error) {
|
|||
}
|
||||
ep := u.EscapedPath()
|
||||
if idx := strings.LastIndexByte(ep, '/'); idx != -1 {
|
||||
ep = ep[:idx]
|
||||
ep = ep[:idx+1]
|
||||
}
|
||||
user := u.User.String()
|
||||
if user != "" {
|
||||
user += "@"
|
||||
}
|
||||
return u.Scheme + "://" + user + u.Host + "/" + ep, nil
|
||||
if !strings.HasPrefix(ep, "/") {
|
||||
ep = "/" + ep
|
||||
}
|
||||
return u.Scheme + "://" + user + u.Host + ep, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue