instance method _process_options

Ruby on Rails 6.1.7.10

Since v5.2.8.1 Last seen in v7.2.3 Private

Available in: v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3

Signature

_process_options(options)

Set proper cache control and transfer encoding when streaming

Parameters

options req
Source
# File actionpack/lib/action_controller/metal/streaming.rb, line 200
      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 200 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionController::Streaming

Type at least 2 characters to search.

↑↓ navigate · open · esc close