Implement flag type 'text': this is like keys, but on multiple lines

This commit is contained in:
nemunaire 2020-01-16 15:33:28 +01:00
commit 47ba134b55
9 changed files with 30 additions and 14 deletions

View file

@ -35,7 +35,7 @@ func (c submissionChecker) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if r.Method != "POST" {
http.Error(w, "{\"errmsg\":\"Requête invalide.\"}", http.StatusBadRequest)
return
} else if r.ContentLength < 0 || r.ContentLength > 1023 {
} else if r.ContentLength < 0 || r.ContentLength > 2047 {
http.Error(w, "{\"errmsg\":\"Requête trop longue ou de taille inconnue\"}", http.StatusRequestEntityTooLarge)
return
}