-
Notifications
You must be signed in to change notification settings - Fork 191
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
Have webob define a URLDecodeError (a subclass of UnicodeDecodeError): #115
Comments
I have a branch which does something similar which I've been using in production a while:
However, it raises the error in more situations than just decoding the URL. For example when decoding a JSON body. It also calls the exception RequestDecodeError as opposed to URLDecodeError. Would it make sense to have URLDecodeError be a sub-class of RequestDecodeError? |
Due to a bug in WebOb accessing request.path (or request.path_info etc) will raise UnicodeDecodeError if the requested path doesn't decode with UTF-8, and this will result in a 500 Server Error from our app. Add a tween to detect this situation and send a 400 Bad Request instead. See Pylons/webob#115 Fixes #4915
One possible workaround for this in Pyramid apps: hypothesis/h#4916 |
Due to a bug in WebOb accessing request.path (or request.path_info etc) will raise UnicodeDecodeError if the requested path doesn't decode with UTF-8, and this will result in a 500 Server Error from our app. Add a tween to detect this situation and send a 400 Bad Request instead. See Pylons/webob#115 Fixes #4915
See issue #114.
The text was updated successfully, but these errors were encountered: