diff options
author | Richard Schneeman <richard.schneeman+no-recruiters@gmail.com> | 2018-07-28 21:58:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-28 21:58:36 -0500 |
commit | f10acfa7b64ac93cbbfc97e3a92d644960198764 (patch) | |
tree | 244ed8c81174abd2ae651f93781425f518688be9 /actionpack/lib/action_dispatch/http/headers.rb | |
parent | 8741052ba25722283ea057f6f022f16b1931ce3e (diff) | |
parent | 27c6c071165342c770ed9c697024aa101dad4049 (diff) | |
download | rails-f10acfa7b64ac93cbbfc97e3a92d644960198764.tar.gz rails-f10acfa7b64ac93cbbfc97e3a92d644960198764.tar.bz2 rails-f10acfa7b64ac93cbbfc97e3a92d644960198764.zip |
Merge pull request #32695 from bdewater/enable-regex-cops
Enable regex cops
Diffstat (limited to 'actionpack/lib/action_dispatch/http/headers.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/http/headers.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/headers.rb b/actionpack/lib/action_dispatch/http/headers.rb index c3c2a9d8c5..6c7d24d2d0 100644 --- a/actionpack/lib/action_dispatch/http/headers.rb +++ b/actionpack/lib/action_dispatch/http/headers.rb @@ -121,7 +121,7 @@ module ActionDispatch # not contained within the headers hash. def env_name(key) key = key.to_s - if key =~ HTTP_HEADER + if HTTP_HEADER.match?(key) key = key.upcase.tr("-", "_") key = "HTTP_" + key unless CGI_VARIABLES.include?(key) end |