Sha256: b5e4dd4f1a661abed1f30b60f82875d76321720020e4574c15db2f03a1fbdf9c
Contents?: true
Size: 750 Bytes
Versions: 1
Compression:
Stored size: 750 Bytes
Contents
module M2R class Response # Handles the logic of having response with proper # http version and 'Connection' header in relation to # given request # # @api public module ToRequest # params [Request] request Request that response handles # params [true, false] identical Whether http version in response should be identical # to the received one. # @return [self] Response object # @api public def to(request, identical = false) # http://www.ietf.org/rfc/rfc2145.txt # 2.3 Which version number to send in a message http_version(request.http_version) if identical headers['Connection'] = 'close' if request.close? self end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
m2r-2.1.0 | lib/m2r/response/to_request.rb |