Project

General

Profile

Bug #19597 ยป 19597-ParseMultipartForm-only.patch

Brett Smith, 01/10/2023 11:41 PM

View differences:

lib/controller/router/request.go
61 61
// If the request has a parameter whose name is attrsKey (e.g.,
62 62
// "collection"), it is renamed to "attrs".
63 63
func (rtr *router) loadRequestParams(req *http.Request, attrsKey string) (map[string]interface{}, error) {
64
	err := req.ParseForm()
65
	if err == nil {
66
		err = req.ParseMultipartForm(int64(rtr.config.MaxRequestSize))
67
		if err == http.ErrNotMultipart {
68
			err = nil
69
		}
64
	err := req.ParseMultipartForm(int64(rtr.config.MaxRequestSize))
65
	if err == http.ErrNotMultipart {
66
		err = nil
70 67
	}
71 68
	if err != nil {
72 69
		if err.Error() == "http: request body too large" {
    (1-1/1)