Bug #19597 ยป 19597-ParseMultipartForm-only.patch
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" { |