Class: Klenod::Rack::Response
- Inherits:
-
Data
- Object
- Data
- Klenod::Rack::Response
- Defined in:
- lib/klenod/rack/asset_app.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body
8 9 10 |
# File 'lib/klenod/rack/asset_app.rb', line 8 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers
8 9 10 |
# File 'lib/klenod/rack/asset_app.rb', line 8 def headers @headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status
8 9 10 |
# File 'lib/klenod/rack/asset_app.rb', line 8 def status @status end |
Instance Method Details
#protocol_response ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/klenod/rack/asset_app.rb', line 13 def protocol_response require "protocol/http/response" # Protocol servers derive content-length from the body. Keeping ours # sends it twice, which HTTP/2 clients reject. Protocol::HTTP::Response[status, headers.except("content-length"), [body]] end |
#rack_response ⇒ Object
9 10 11 |
# File 'lib/klenod/rack/asset_app.rb', line 9 def rack_response [status, headers, [body]] end |