diff --git a/builder/dockerfile/copy_test.go b/builder/dockerfile/copy_test.go index 5fce0bd4eb..e837ce07ad 100644 --- a/builder/dockerfile/copy_test.go +++ b/builder/dockerfile/copy_test.go @@ -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", }, } diff --git a/builder/dockerfile/copy_windows.go b/builder/dockerfile/copy_windows.go index 1a3a488516..bca088da6e 100644 --- a/builder/dockerfile/copy_windows.go +++ b/builder/dockerfile/copy_windows.go @@ -15,8 +15,8 @@ import ( ) var pathDenyList = map[string]bool{ - "c:\\": true, - "c:\\windows": true, + `c:\`: true, + `c:\windows`: true, } func init() {