$78 GRAYBYTE WORDPRESS FILE MANAGER $47

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.23
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/ruby34/share/gems/gems/rack-3.0.8/lib/rack/

HOME
Current File : /opt/alt/ruby34/share/gems/gems/rack-3.0.8/lib/rack//recursive.rb
# frozen_string_literal: true

require 'uri'

require_relative 'constants'

module Rack
  # Rack::ForwardRequest gets caught by Rack::Recursive and redirects
  # the current request to the app at +url+.
  #
  #   raise ForwardRequest.new("/not-found")
  #

  class ForwardRequest < Exception
    attr_reader :url, :env

    def initialize(url, env = {})
      @url = URI(url)
      @env = env

      @env[PATH_INFO]       = @url.path
      @env[QUERY_STRING]    = @url.query  if @url.query
      @env[HTTP_HOST]       = @url.host   if @url.host
      @env[HTTP_PORT]       = @url.port   if @url.port
      @env[RACK_URL_SCHEME] = @url.scheme if @url.scheme

      super "forwarding to #{url}"
    end
  end

  # Rack::Recursive allows applications called down the chain to
  # include data from other applications (by using
  # <tt>rack['rack.recursive.include'][...]</tt> or raise a
  # ForwardRequest to redirect internally.

  class Recursive
    def initialize(app)
      @app = app
    end

    def call(env)
      dup._call(env)
    end

    def _call(env)
      @script_name = env[SCRIPT_NAME]
      @app.call(env.merge(RACK_RECURSIVE_INCLUDE => method(:include)))
    rescue ForwardRequest => req
      call(env.merge(req.env))
    end

    def include(env, path)
      unless path.index(@script_name) == 0 && (path[@script_name.size] == ?/ ||
                                               path[@script_name.size].nil?)
        raise ArgumentError, "can only include below #{@script_name}, not #{path}"
      end

      env = env.merge(PATH_INFO => path,
                      SCRIPT_NAME => @script_name,
                      REQUEST_METHOD => GET,
                      "CONTENT_LENGTH" => "0", "CONTENT_TYPE" => "",
                      RACK_INPUT => StringIO.new(""))
      @app.call(env)
    end
  end
end


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
1 Jan 1970 12.00 AM
root / root
0
auth
--
29 Mar 2025 8.41 AM
root / root
0755
multipart
--
29 Mar 2025 8.41 AM
root / root
0755
body_proxy.rb
1.3 KB
3 Feb 2025 3.02 PM
root / root
0644
builder.rb
8.562 KB
3 Feb 2025 3.02 PM
root / root
0644
cascade.rb
2.251 KB
3 Feb 2025 3.02 PM
root / root
0644
chunked.rb
3.301 KB
3 Feb 2025 3.02 PM
root / root
0644
common_logger.rb
3.117 KB
3 Feb 2025 3.02 PM
root / root
0644
conditional_get.rb
2.989 KB
3 Feb 2025 3.02 PM
root / root
0644
config.rb
0.4 KB
3 Feb 2025 3.02 PM
root / root
0644
constants.rb
2.474 KB
3 Feb 2025 3.02 PM
root / root
0644
content_length.rb
0.787 KB
3 Feb 2025 3.02 PM
root / root
0644
content_type.rb
0.679 KB
3 Feb 2025 3.02 PM
root / root
0644
deflater.rb
5.506 KB
3 Feb 2025 3.02 PM
root / root
0644
directory.rb
6.023 KB
3 Feb 2025 3.02 PM
root / root
0644
etag.rb
1.866 KB
3 Feb 2025 3.02 PM
root / root
0644
events.rb
4.801 KB
3 Feb 2025 3.02 PM
root / root
0644
file.rb
0.163 KB
3 Feb 2025 3.02 PM
root / root
0644
files.rb
5.661 KB
3 Feb 2025 3.02 PM
root / root
0644
head.rb
0.512 KB
3 Feb 2025 3.02 PM
root / root
0644
headers.rb
2.957 KB
3 Feb 2025 3.02 PM
root / root
0644
lint.rb
36.089 KB
3 Feb 2025 3.02 PM
root / root
0755
lock.rb
0.56 KB
3 Feb 2025 3.02 PM
root / root
0644
logger.rb
0.404 KB
3 Feb 2025 3.02 PM
root / root
0644
media_type.rb
1.399 KB
3 Feb 2025 3.02 PM
root / root
0644
method_override.rb
1.445 KB
3 Feb 2025 3.02 PM
root / root
0644
mime.rb
32.688 KB
3 Feb 2025 3.02 PM
root / root
0644
mock.rb
0.062 KB
3 Feb 2025 3.02 PM
root / root
0644
mock_request.rb
5.37 KB
3 Feb 2025 3.02 PM
root / root
0644
mock_response.rb
3.276 KB
3 Feb 2025 3.02 PM
root / root
0644
multipart.rb
1.166 KB
3 Feb 2025 3.02 PM
root / root
0644
null_logger.rb
1.185 KB
3 Feb 2025 3.02 PM
root / root
0644
query_parser.rb
8.37 KB
3 Feb 2025 3.02 PM
root / root
0644
recursive.rb
1.779 KB
3 Feb 2025 3.02 PM
root / root
0644
reloader.rb
3.022 KB
3 Feb 2025 3.02 PM
root / root
0644
request.rb
24.569 KB
3 Feb 2025 3.02 PM
root / root
0644
response.rb
10.724 KB
3 Feb 2025 3.02 PM
root / root
0644
rewindable_input.rb
3.123 KB
3 Feb 2025 3.02 PM
root / root
0644
runtime.rb
0.85 KB
3 Feb 2025 3.02 PM
root / root
0644
sendfile.rb
5.555 KB
3 Feb 2025 3.02 PM
root / root
0644
show_exceptions.rb
13.734 KB
3 Feb 2025 3.02 PM
root / root
0644
show_status.rb
3.576 KB
3 Feb 2025 3.02 PM
root / root
0644
static.rb
5.999 KB
3 Feb 2025 3.02 PM
root / root
0644
tempfile_reaper.rb
0.76 KB
3 Feb 2025 3.02 PM
root / root
0644
urlmap.rb
2.81 KB
3 Feb 2025 3.02 PM
root / root
0644
utils.rb
21.097 KB
3 Feb 2025 3.02 PM
root / root
0644
version.rb
0.936 KB
3 Feb 2025 3.02 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF