Class: Rack::Async::Lint
- Inherits:
-
Original::Lint
- Object
- Original::Lint
- Rack::Async::Lint
- Defined in:
- lib/rack/async/lint.rb
Instance Method Summary collapse
- #_call(env) ⇒ Object
- #check_content_length(status, headers) ⇒ Object
- #check_content_type(status, headers) ⇒ Object
- #check_status(status) ⇒ Object
Instance Method Details
#_call(env) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/rack/async/lint.rb', line 10 def _call(env) status, *rest = catch(:async) { super } || ASYNC_RESPONSE assert "async response detected without the handler supporting async.callback" do status.to_i < 0 and not env.include?('async.callback') end [status, *rest] end |
#check_content_length(status, headers) ⇒ Object
8 |
# File 'lib/rack/async/lint.rb', line 8 def check_content_length(status, headers) super unless status.to_i < 0 end |
#check_content_type(status, headers) ⇒ Object
7 |
# File 'lib/rack/async/lint.rb', line 7 def check_content_type(status, headers) super unless status.to_i < 0 end |
#check_status(status) ⇒ Object
6 |
# File 'lib/rack/async/lint.rb', line 6 def check_status(status) super unless status.to_i < 0 end |