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

fix bracket styling

parent 8a0455f2
......@@ -49,17 +49,17 @@ module Gitlab
private
def env_http_headers(env)
Hash[*env.select {|k, v| k.start_with? 'HTTP_'}
.collect {|k, v| [k.sub(/^HTTP_/, ''), v]}
.collect {|k, v| [k.split('_').collect(&:capitalize).join('-'), v]}
Hash[*env.select { |k, v| k.start_with? 'HTTP_' }
.collect { |k, v| [k.sub(/^HTTP_/, ''), v] }
.collect { |k, v| [k.split('_').collect(&:capitalize).join('-'), v] }
.sort
.flatten]
end
def http_headers_env(headers)
Hash[*headers
.collect {|k, v| [k.split('-').collect(&:upcase).join('_'), v]}
.collect {|k, v| [k.prepend('HTTP_'), v]}
.collect { |k, v| [k.split('-').collect(&:upcase).join('_'), v] }
.collect { |k, v| [k.prepend('HTTP_'), v] }
.flatten]
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