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

Don't crash when given a non-standard HTTP code #305

Merged
merged 1 commit into from Jul 6, 2013
Merged

Don't crash when given a non-standard HTTP code #305

merged 1 commit into from Jul 6, 2013

Conversation

darkhelmet
Copy link
Contributor

We are using 449 in an app, because it's actually appropriate for the situation. The Rack codes don't include that because it's non-standard (MSFT extension).

This was crashing puma and returning a 500 because turning nil into a String is super hard for ruby. The error message was bizarre so took a while to track down. We ended up adding the 449 k/v pair to the Rack::Utils hash, and that solves the problem.

Going forward, there is this solution, or the call to fetch should just raise a more appropriate error and suggest a way to fix the problem (use a different code, or register a new code, which would need supporting code).

evanphx added a commit that referenced this pull request Jul 6, 2013
Don't crash when given a non-standard HTTP code
@evanphx evanphx merged commit 858917a into puma:master Jul 6, 2013
MSP-Greg added a commit to MSP-Greg/puma that referenced this pull request Aug 5, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants