lib/raven/integrations/rack.rb in sentry-raven-2.3.0 vs lib/raven/integrations/rack.rb in sentry-raven-2.3.1

- old
+ new

@@ -99,10 +99,10 @@ # Rack adds in an incorrect HTTP_VERSION key, which causes downstream # to think this is a Version header. Instead, this is mapped to # env['SERVER_PROTOCOL']. But we don't want to ignore a valid header # if the request has legitimately sent a Version header themselves. # See: https://github.com/rack/rack/blob/028438f/lib/rack/handler/cgi.rb#L29 - next if key == 'HTTP_VERSION' && value == ENV['SERVER_PROTOCOL'] + next if key == 'HTTP_VERSION' && value == env_hash['SERVER_PROTOCOL'] next unless key.start_with?('HTTP_') || %w(CONTENT_TYPE CONTENT_LENGTH).include?(key) # Rack stores headers as HTTP_WHAT_EVER, we need What-Ever key = key.gsub("HTTP_", "") key = key.split('_').map(&:capitalize).join('-')