Merge remote-tracking branch 'upstream/master'

This commit is contained in:
thinkerou 2021-06-22 14:39:23 +08:00
commit e348bcb58c
2 changed files with 4 additions and 8 deletions

View File

@ -22,11 +22,9 @@ func (formBinding) Bind(req *http.Request, obj interface{}) error {
if err := req.ParseForm(); err != nil {
return err
}
if err := req.ParseMultipartForm(defaultMemory); err != nil {
if err != http.ErrNotMultipart {
if err := req.ParseMultipartForm(defaultMemory); err != nil && err != http.ErrNotMultipart {
return err
}
}
if err := mapForm(obj, req.Form); err != nil {
return err
}

View File

@ -95,9 +95,7 @@ at initialization. ie. before any route is registered or the router is listening
}
func debugPrintError(err error) {
if err != nil {
if IsDebugging() {
if err != nil && IsDebugging() {
fmt.Fprintf(DefaultErrorWriter, "[GIN-debug] [ERROR] %v\n", err)
}
}
}