method

_compute_redirect_to_location

_compute_redirect_to_location(request, options)
public

No documentation available.

# File actionpack/lib/action_controller/metal/redirecting.rb, line 206
    def _compute_redirect_to_location(request, options) # :nodoc:
      case options
      # The scheme name consist of a letter followed by any combination of letters,
      # digits, and the plus ("+"), period ("."), or hyphen ("-") characters; and is
      # terminated by a colon (":"). See
      # https://tools.ietf.org/html/rfc3986#section-3.1 The protocol relative scheme
      # starts with a double slash "//".
      when /\A([a-z][a-z\d\-+.]*:|\/\/).*/
        options.to_str
      when String
        if !options.start_with?("/", "?") && !options.empty?
          _handle_path_relative_redirect(options)
        end

        request.protocol + request.host_with_port + options
      when Proc
        _compute_redirect_to_location request, instance_eval(&options)
      else
        url_for(options)
      end.delete("\00\\r\n")
    end