class Falcon::Adapters::Rack
def unwrap_headers(headers, env)
@parameter headers [Protocol::HTTP::Headers] The raw HTTP request headers.
Rack separates multiple headers with the same key, into a single field with multiple lines.
Unwrap raw HTTP headers into the CGI-style expected by Rack middleware.
def unwrap_headers(headers, env) headers.each do |key, value| http_key = "HTTP_#{key.upcase.tr('-', '_')}" if current_value = env[http_key] env[http_key] = "#{current_value};#{value}" else env[http_key] = value end end end