mirror of
https://codeberg.org/git-pages/git-pages.git
synced 2026-08-17 17:36:04 +00:00
Provide Accept-Encoding: in 406 Not Acceptable responses.
This commit is contained in:
@@ -377,6 +377,7 @@ func getPage(w http.ResponseWriter, r *http.Request) error {
|
||||
return fmt.Errorf("unexpected transform")
|
||||
}
|
||||
if !negotiatedEncoding {
|
||||
w.Header().Set("Accept-Encoding", strings.Join(offeredEncodings, ", "))
|
||||
w.WriteHeader(http.StatusNotAcceptable)
|
||||
return fmt.Errorf("no supported content encodings (Accept-Encoding: %q)",
|
||||
r.Header.Get("Accept-Encoding"))
|
||||
|
||||
Reference in New Issue
Block a user