instance method
_process_options
Ruby on Rails 7.1.6
Since v5.2.8.1 Last seen in v7.2.3 PrivateSignature
_process_options(options)
Set proper cache control and transfer encoding when streaming
Parameters
-
optionsreq
Source
# File actionpack/lib/action_controller/metal/streaming.rb, line 238
def _process_options(options)
super
if options[:stream]
if request.version == "HTTP/1.0"
options.delete(:stream)
else
headers["Cache-Control"] ||= "no-cache"
headers["Transfer-Encoding"] = "chunked"
headers.delete("Content-Length")
end
end
end
Defined in actionpack/lib/action_controller/metal/streaming.rb line 238
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::Streaming