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

- old
+ new

@@ -90,12 +90,12 @@ elsif request.body # JSON requests, etc data = request.body.read(4096 * 4) # Sentry server limit request.body.rewind data end - rescue IOError => ex - ex.message + rescue IOError => e + e.message end def format_headers_for_sentry(env_hash) env_hash.each_with_object({}) do |(key, value), memo| begin @@ -110,9 +110,10 @@ # 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.sub(/^HTTP_/, "") key = key.split('_').map(&:capitalize).join('-') memo[key] = value rescue StandardError => e