diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-09-23 09:16:59 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-09-23 13:07:56 +0200 |
commit | f3560aa0e170f8bbc1e5ab41f1e54bd819da5cc3 (patch) | |
tree | 9f651cc5b09aca2c479f4407118fd88036c7f272 /commands/server.go | |
parent | edf9038a9279029f6501f715f6579394dc5e770e (diff) |
server: Fix 404 redirects on Windows
Fixes #10314
Diffstat (limited to 'commands/server.go')
-rw-r--r-- | commands/server.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/server.go b/commands/server.go index 06b7612fc..da6313f17 100644 --- a/commands/server.go +++ b/commands/server.go @@ -436,7 +436,7 @@ func (f *fileServer) createEndpoint(i int) (*http.ServeMux, net.Listener, string switch redirect.Status { case 404: w.WriteHeader(404) - file, err := fs.Open(filepath.FromSlash(strings.TrimPrefix(redirect.To, u.Path))) + file, err := fs.Open(strings.TrimPrefix(redirect.To, u.Path)) if err == nil { defer file.Close() io.Copy(w, file) |