Skip to content

Commit 6857030

Browse files
committed
Fix for ruby 1.8
1 parent ceb78cc commit 6857030

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/rack/reverse_proxy.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,10 @@ def reverse_proxy(matcher, url=nil, opts={})
140140
end
141141

142142
def format_headers(headers)
143-
headers.each_with_object({}).each do |(key, val), acc|
143+
headers.reduce({}) do |acc, (key, val)|
144144
formated_key = key.split('-').map(&:capitalize).join('-')
145145
acc[formated_key] = Array(val)
146+
acc
146147
end
147148
end
148149
end

0 commit comments

Comments
 (0)