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

Accessing request.POST can trigger a ValueError #1258

Closed
wichert opened this issue Mar 5, 2014 · 2 comments
Closed

Accessing request.POST can trigger a ValueError #1258

wichert opened this issue Mar 5, 2014 · 2 comments

Comments

@wichert
Copy link
Member

wichert commented Mar 5, 2014

I just found this in an error log:

File myapp/image.py, line 38  in image_upload
    image = request.POST.get('image')
File uild/bdist.linux-x86_64/egg/webob/request.py, line 806  in POST
    keep_blank_values=True)
File python2.7/cgi.py, line 507  in __init__
    self.read_multi(environ, keep_blank_values, strict_parsing)
File python2.7/cgi.py, line 621  in read_multi
    raise ValueError, 'Invalid boundary in multipart form: %r' % (ib,)
ValueError: Invalid boundary in multipart form: ''

I'm not entirely sure what should happen in this kind of scenario, but a dictionary raising a ValueError on get is very weird.

@mmerickel
Copy link
Member

This belongs in the webob issue tracker, but I'm also not sure what you'd expect to see.. A subclass of ValueError called MalformedRequestBody or something?

@wichert
Copy link
Member Author

wichert commented Mar 5, 2014

I think I would expect to see None here. Having a dictionary-style interface raise an exception for get() feels very wrong.

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