-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
Description
In Go's net/http ParseForm() method, the following checks are done:
https://github.com/golang/go/blob/700e969d5b23732179ea86cfe67e8d1a0a1cc10a/src/net/http/request.go#L1176
// For other HTTP methods, or when the Content-Type is not
// application/x-www-form-urlencoded, the request Body is not read, and
// r.PostForm is initialized to a non-nil, empty value.
//
// If the request Body's size has not already been limited by MaxBytesReader,
// the size is capped at 10MB.
Should the similar checks in Request body be done in Json() method, too?
- Check that request body content type is application/json ?
- Limit request body size to 10MB ?