summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean byroot Boussier <jean.boussier+github@shopify.com>2023-01-11 22:01:41 +0100
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2023-01-17 11:29:01 +1300
commitaf9cbb88a3d873c6dabe08554cbb78b9eeb2b8b1 (patch)
treef947ab70be686e796de34a957a05a66226b17217
parent5dc8c7bc039a39a3f2e52afb4cc9bf100e65965b (diff)
downloadrack-af9cbb88a3d873c6dabe08554cbb78b9eeb2b8b1.tar.gz
Fix Rack::Lint error message for HTTP_CONTENT_TYPE and HTTP_CONTENT_LENGTH (#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>
-rwxr-xr-xlib/rack/lint.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rack/lint.rb b/lib/rack/lint.rb
index ed3c7f42..ee3ec716 100755
--- a/lib/rack/lint.rb
+++ b/lib/rack/lint.rb
@@ -303,7 +303,7 @@ module Rack
## (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
}