Skip to content

Commit

Permalink
Fix Rack::Lint error message for HTTP_CONTENT_TYPE and HTTP_CONTENT_L…
Browse files Browse the repository at this point in the history
…ENGTH (#2007)

Currently it's printing:

```
Rack::Lint::LintError: env contains HTTP_CONTENT_TYPE, must use
```

Which had me puzzled for quite a while.

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
  • Loading branch information
2 people authored and ioquatix committed Jan 16, 2023
1 parent 5dc8c7b commit af9cbb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rack/lint.rb
Expand Up @@ -303,7 +303,7 @@ def check_environment(env)
## (use the versions without <tt>HTTP_</tt>).
%w[HTTP_CONTENT_TYPE HTTP_CONTENT_LENGTH].each { |header|
if env.include? header
raise LintError, "env contains #{header}, must use #{header[5, -1]}"
raise LintError, "env contains #{header}, must use #{header[5..-1]}"
end
}

Expand Down

0 comments on commit af9cbb8

Please sign in to comment.