Class: Rack::StreamingProxy::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/conjur/webserver/api_proxy.rb

Overview

Rack::StreamingProxy by default doesn’t handle closing, which leads to stale (but still running) connections. Handle the close by quitting the child (it will close connection with upstream automatically).

Instance Method Summary collapse

Constructor Details

#initialize(piper) ⇒ Response

Returns a new instance of Response.



85
86
87
88
89
# File 'lib/conjur/webserver/api_proxy.rb', line 85

def initialize piper
  @piper = piper
  @client_http_version = '1.0'
  receive
end

Instance Method Details

#closeObject



91
92
93
# File 'lib/conjur/webserver/api_proxy.rb', line 91

def close
  @piper.signal :QUIT
end