builder/dockerfile: use string-literals for easier grep'ing

Use string-literal for reduce escaped quotes, which makes for easier grepping.
While at it, also changed http -> https to keep some linters at bay.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-07-05 12:09:41 +02:00
parent 4ee0cf6878
commit 202907b14c
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
2 changed files with 14 additions and 14 deletions

View file

@ -53,31 +53,31 @@ func TestGetFilenameForDownload(t *testing.T) {
expected string
}{
{
path: "http://www.example.com/",
path: "https://www.example.com/",
expected: "",
},
{
path: "http://www.example.com/xyz",
path: "https://www.example.com/xyz",
expected: "xyz",
},
{
path: "http://www.example.com/xyz.html",
path: "https://www.example.com/xyz.html",
expected: "xyz.html",
},
{
path: "http://www.example.com/xyz/",
path: "https://www.example.com/xyz/",
expected: "",
},
{
path: "http://www.example.com/xyz/uvw",
path: "https://www.example.com/xyz/uvw",
expected: "uvw",
},
{
path: "http://www.example.com/xyz/uvw.html",
path: "https://www.example.com/xyz/uvw.html",
expected: "uvw.html",
},
{
path: "http://www.example.com/xyz/uvw/",
path: "https://www.example.com/xyz/uvw/",
expected: "",
},
{
@ -114,23 +114,23 @@ func TestGetFilenameForDownload(t *testing.T) {
expected: "xyz.html",
},
{
disposition: "attachment; filename=\"xyz\"",
disposition: `attachment; filename="xyz"`,
expected: "xyz",
},
{
disposition: "attachment; filename=\"xyz.html\"",
disposition: `attachment; filename="xyz.html"`,
expected: "xyz.html",
},
{
disposition: "attachment; filename=\"/xyz.html\"",
disposition: `attachment; filename="/xyz.html"`,
expected: "xyz.html",
},
{
disposition: "attachment; filename=\"/xyz/uvw\"",
disposition: `attachment; filename="/xyz/uvw"`,
expected: "uvw",
},
{
disposition: "attachment; filename=\"Naïve file.txt\"",
disposition: `attachment; filename="Naïve file.txt"`,
expected: "Naïve file.txt",
},
}

View file

@ -15,8 +15,8 @@ import (
)
var pathDenyList = map[string]bool{
"c:\\": true,
"c:\\windows": true,
`c:\`: true,
`c:\windows`: true,
}
func init() {