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

Serve HTTP 400 instead of throwing on badly encoded request URI #85

Merged
merged 1 commit into from Apr 28, 2019
Merged

Serve HTTP 400 instead of throwing on badly encoded request URI #85

merged 1 commit into from Apr 28, 2019

Conversation

rjoonas
Copy link
Contributor

@rjoonas rjoonas commented Aug 22, 2018

Wraps decodeURIComponent calls in a try-catch to avoid throwing to Express error handler when the request URI is not properly encoded.

Includes a test case: HEAD /%E4 is HTTP 500 in master, this makes it HTTP 400.

@rjoonas
Copy link
Contributor Author

rjoonas commented Sep 10, 2018

@dougwilson no rush but this one is pretty easy to review. :)

@dougwilson dougwilson added the pr label Sep 10, 2018
@dougwilson dougwilson self-assigned this Sep 10, 2018
index.js Outdated Show resolved Hide resolved
@dougwilson dougwilson merged commit d3ee7d8 into expressjs:master Apr 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants