def rackify_headers(headers)
      results = {}
      headers.each do |k,v|
        rack_key = 'HTTP_' + k.gsub('-','_').upcase
        results[rack_key] = v
      end
      results
    end
def rackify_headers(headers)
      results = {}
      headers.each do |k,v|
        rack_key = 'HTTP_' + k.gsub('-','_').upcase
        results[rack_key] = v
      end
      results
    end
Takes headers and adds HTTP_ to front of the keys because that is what rack
 does to the headers passed from a request. This seems to be the standard
 when testing with curl and inspecting the headers in a Rack app.  Example:
 https://gist.github.com/tongueroo/94f22f6c261c8999e4f4f776547e2ee3

 This is useful for:

   ActionController::Base.renderer.new(renderer_options)

 renderer_options are rack normalized headers.

 Example input (from api gateway)

   {"host"=>"localhost:8888",
   "user-agent"=>"curl/7.53.1",
   "accept"=>"*/*",
   "version"=>"HTTP/1.1",
   "x-amzn-trace-id"=>"Root=1-5bde5b19-61d0d4ab4659144f8f69e38f"}

 Example output:

   {"HTTP_HOST"=>"localhost:8888",
   "HTTP_USER_AGENT"=>"curl/7.53.1",
   "HTTP_ACCEPT"=>"*/*",
   "HTTP_VERSION"=>"HTTP/1.1",
   "HTTP_X_AMZN_TRACE_ID"=>"Root=1-5bde5b19-61d0d4ab4659144f8f69e38f"}