mirror of
https://github.com/status-im/consul.git
synced 2025-01-22 11:40:06 +00:00
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…
x
Reference in New Issue
Block a user