Stop rendering after an invalid Accept value

This commit is contained in:
Daan Sprenkels 2020-07-06 18:01:50 +02:00
parent 7a369a1dae
commit af6d762378

View File

@ -104,6 +104,7 @@ func (rl *rushlink) render(w http.ResponseWriter, r *http.Request, status int, t
if err != nil {
w.WriteHeader(http.StatusNotAcceptable)
fmt.Fprintf(w, "error parsing Accept header: %v\n", err)
return
}
// Add the request to the template data