commands: Fix server url rewrites (http status 200) - hugo - [fork] hugo port for 9front
HTML git clone git@git.drkhsh.at/hugo.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit 1477d0ba90acd3aa464556d95edab396a518016e
DIR parent dd37163f5a73b7bda81227244b1a942751026242
HTML Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date: Tue, 31 Jan 2023 11:16:00 +0100
commands: Fix server url rewrites (http status 200)
Broken by me in Hugo 0.103.0 it seems. A little bit mysterious as it has worked for me after that, but started to fail just
recently.
Closes #10668
Diffstat:
M commands/server.go | 1 -
1 file changed, 0 insertions(+), 1 deletion(-)
---
DIR diff --git a/commands/server.go b/commands/server.go
@@ -449,7 +449,6 @@ func (f *fileServer) createEndpoint(i int) (*http.ServeMux, net.Listener, string
requestURI = redirect.To
r = r2
}
- fallthrough
default:
w.Header().Set("Content-Type", "")
http.Redirect(w, r, redirect.To, redirect.Status)