Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No error logged if parsing large file in multipart/form-data fails #1247

Closed
archerwq opened this issue Feb 9, 2018 · 2 comments
Closed

No error logged if parsing large file in multipart/form-data fails #1247

archerwq opened this issue Feb 9, 2018 · 2 comments

Comments

@archerwq
Copy link

archerwq commented Feb 9, 2018

func (r *Request) ParseMultipartForm(maxMemory int64) error might return an error like this:
write /tmp/multipart-296085692: no space left on device. In such case, func (c *Context) GetPostForm(key string) (string, bool) will return '', nil if we try to get parts other than file, without any information logged regarding the actual error.
I think the error should not be ignored when req.ParseMultipartForm(32 << 20) is called.

@archerwq archerwq changed the title No error logged if parsing large file in multipart/form-data failed No error logged if parsing large file in multipart/form-data fails Feb 9, 2018
@thinkerou
Copy link
Member

IMO, throw the error better.

@thinkerou
Copy link
Member

#1739 merged! thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants