mirror of https://github.com/status-im/consul.git
agent: use http.StatusRequestEntityTooLarge instead of 413
This commit is contained in:
parent
bc5dc32c1d
commit
f09a8bb1b6
|
@ -184,7 +184,7 @@ func (s *HTTPServer) KVSPut(resp http.ResponseWriter, req *http.Request, args *s
|
|||
|
||||
// Check the content-length
|
||||
if req.ContentLength > maxKVSize {
|
||||
resp.WriteHeader(413)
|
||||
resp.WriteHeader(http.StatusRequestEntityTooLarge) // 413
|
||||
fmt.Fprintf(resp, "Value exceeds %d byte limit", maxKVSize)
|
||||
return nil, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue