From ba2173a10d6578c40f85dcca3bb0314ad7b84963 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 21 Aug 2015 16:43:01 -0700 Subject: use `set_header` rather than []= This allows us to avoid calling `env_name` twice. --- actionpack/lib/action_dispatch/http/headers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch/http/headers.rb') diff --git a/actionpack/lib/action_dispatch/http/headers.rb b/actionpack/lib/action_dispatch/http/headers.rb index 05191ff2fd..ca6cf339ed 100644 --- a/actionpack/lib/action_dispatch/http/headers.rb +++ b/actionpack/lib/action_dispatch/http/headers.rb @@ -82,7 +82,7 @@ module ActionDispatch # headers_or_env. def merge!(headers_or_env) headers_or_env.each do |key, value| - self[env_name(key)] = value + @req.set_header env_name(key), value end end -- cgit v1.2.3