equal
deleted
inserted
replaced
27 basePath string |
27 basePath string |
28 fs HttpFs |
28 fs HttpFs |
29 } |
29 } |
30 |
30 |
31 func (d httpDir) Open(name string) (http.File, error) { |
31 func (d httpDir) Open(name string) (http.File, error) { |
32 if filepath.Separator != '/' && strings.IndexRune(name, filepath.Separator) >= 0 || |
32 if filepath.Separator != '/' && strings.ContainsRune(name, filepath.Separator) || |
33 strings.Contains(name, "\x00") { |
33 strings.Contains(name, "\x00") { |
34 return nil, errors.New("http: invalid character in file path") |
34 return nil, errors.New("http: invalid character in file path") |
35 } |
35 } |
36 dir := string(d.basePath) |
36 dir := string(d.basePath) |
37 if dir == "" { |
37 if dir == "" { |