lib/raven/integrations/rack.rb in sentry-raven-2.13.0 vs lib/raven/integrations/rack.rb in sentry-raven-3.0.0

- old
+ new

@@ -111,10 +111,10 @@ 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.sub(/^HTTP_/, "") key = key.split('_').map(&:capitalize).join('-') memo[key] = value rescue StandardError => e # Rails adds objects to the Rack env that can sometimes raise exceptions # when `to_s` is called.