Class: Appsignal::Rack::Events::EventedBodyProxy

Inherits:
Rack::BodyProxy
  • Object
show all
Defined in:
lib/appsignal/rack/event_middleware.rb

Overview

A stub for Rack::Events::EventedBodyProxy. It allows the same initialization arguments, but otherwise behaves identically to Rack::BodyProxy.

It does not implement ‘#each`, fixing an issue where the evented body proxy would break streaming responses by always responding to `#each` even if the proxied body did not implement it.

Because it ignores the handlers passed to it and behaves like a normal body proxy, the ‘on_send` event on the handlers is never called.

Instance Method Summary collapse

Constructor Details

#initialize(body, _request, _response, _handlers, &block) ⇒ EventedBodyProxy

Returns a new instance of EventedBodyProxy.



44
45
46
# File 'lib/appsignal/rack/event_middleware.rb', line 44

def initialize(body, _request, _response, _handlers, &block)
  super(body, &block)
end