Stop rendering after an invalid Accept value
This commit is contained in:
parent
7a369a1dae
commit
af6d762378
1
views.go
1
views.go
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user