Module: M2R::HTTP::Close

Included in:
Request, Response
Defined in:
lib/m2r/http/close.rb

Overview

Detect that whether connection should be closed based on http protocol version and ‘Connection’ header We do not support persistent connections for HTTP 1.0

Instance Method Summary collapse

Instance Method Details

#close?true, false

Returns Information whether HTTP Connection should be closed after processing the request. Happens when HTTP/1.0 or request has Connection=close header.

Returns:

  • (true, false)

    Information whether HTTP Connection should be closed after processing the request. Happens when HTTP/1.0 or request has Connection=close header.



12
13
14
# File 'lib/m2r/http/close.rb', line 12

def close?
  unsupported_version? || connection_close?
end