Commit 787ef979 authored by Mike Greiling's avatar Mike Greiling

fix bracket styling

parent 8a0455f2
...@@ -49,17 +49,17 @@ module Gitlab ...@@ -49,17 +49,17 @@ module Gitlab
private private
def env_http_headers(env) def env_http_headers(env)
Hash[*env.select {|k, v| k.start_with? 'HTTP_'} Hash[*env.select { |k, v| k.start_with? 'HTTP_' }
.collect {|k, v| [k.sub(/^HTTP_/, ''), v]} .collect { |k, v| [k.sub(/^HTTP_/, ''), v] }
.collect {|k, v| [k.split('_').collect(&:capitalize).join('-'), v]} .collect { |k, v| [k.split('_').collect(&:capitalize).join('-'), v] }
.sort .sort
.flatten] .flatten]
end end
def http_headers_env(headers) def http_headers_env(headers)
Hash[*headers Hash[*headers
.collect {|k, v| [k.split('-').collect(&:upcase).join('_'), v]} .collect { |k, v| [k.split('-').collect(&:upcase).join('_'), v] }
.collect {|k, v| [k.prepend('HTTP_'), v]} .collect { |k, v| [k.prepend('HTTP_'), v] }
.flatten] .flatten]
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment