Module: Lotus::Action::Head
- Defined in:
- lib/lotus/action/head.rb
Overview
Ensures to not send body or headers for HEAD requests and/or for status codes that doesn’t allow them.
Constant Summary collapse
- HTTP_STATUSES_WITHOUT_BODY =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Status codes that by RFC must not include a message body
Set.new((100..199).to_a << 204 << 205 << 304).freeze
Instance Method Summary collapse
-
#finish ⇒ Object
private
Ensures to not send body or headers for HEAD requests and/or for status codes that doesn’t allow them.
Instance Method Details
#finish ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Ensures to not send body or headers for HEAD requests and/or for status codes that doesn’t allow them.
24 25 26 27 28 29 30 |
# File 'lib/lotus/action/head.rb', line 24 def finish super if _requires_no_body? @_body = nil end end |