lib/raven/integrations/rack.rb in sentry-raven-2.7.1 vs lib/raven/integrations/rack.rb in sentry-raven-2.7.2

- old
+ new

@@ -72,13 +72,14 @@ self.url = req.scheme && req.url.split('?').first self.method = req.request_method self.query_string = req.query_string self.data = read_data_from(req) + self.cookies = req.cookies self.headers = format_headers_for_sentry(env_hash) - self.env = format_env_for_sentry(env_hash) + self.env = format_env_for_sentry(env_hash) end private # See Sentry server default limits at @@ -106,9 +107,10 @@ # 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_hash['SERVER_PROTOCOL'] + next if key == 'HTTP_COOKIE' # Cookies don't go here, they go somewhere else 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('-')