// ParseForm ensures the request form is parsed even with invalid content types.
// If we don't do this, POST method without Content-type (even with empty body) will fail.
ParseForm ensures the request form is parsed even with invalid content types.
If we don't do this, POST method without Content-type (even with empty body) will fail.
// ParseForm ensures the request form is parsed even with invalid content types . // If we don ' t do this POST method without Content - type ( even with empty body ) will fail .
func ParseForm(r *http.Request) error {
	if r == nil {
		return nil
	}
	if err := r.ParseForm(); err != nil && !strings.HasPrefix(err.Error(), "mime:") {
		return validationError{err}
	}
	return nil
}
func ParseForm ( r * http . Request ) error { if r == nil { return nil } if err := r . ParseForm ( ) ; err != nil && ! strings . HasPrefix ( err . Error ( ) , " " ) { return validationError { err } } return nil }
ParseForm ensures the request form is parsed even with invalid content types.
ParseForm ensures the request form is parsed even with invalid content types .