Skip to content

Conversation

@jacksonrayhamilton
Copy link
Contributor

In this unit test, sending a request like "GET http://example.dev:20557/ HTTP/1.1" would cause "Rack::Lint::LintError: env variable QUERY_STRING has non-string value nil" and eventually "Read error: #<NoMethodError: undefined method `empty?' for nil:NilClass>", due to there being no query string in the "dumbass full host request header."

In my application, sending a request like "GET http://example.dev:20557/
HTTP/1.1" would cause "Rack::Lint::LintError: env variable QUERY_STRING has
non-string value nil" and eventually "Read error: #<NoMethodError: undefined
method `empty?' for nil:NilClass>", due to there being no query string in the
"dumbass full host request header."
@nateberkopec
Copy link
Member

Can you just add a comment here explaining that it's bad to set Rack env keys to nil?

@jacksonrayhamilton
Copy link
Contributor Author

Added a comment.

@nateberkopec nateberkopec merged commit de87059 into puma:master Apr 7, 2017
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.

2 participants