Sha256: 174357ee4d7510dfcbdbad3096ad5993425f8d6372fedf7ae5660a5b9e0d1229
Contents?: true
Size: 634 Bytes
Versions: 54
Compression:
Stored size: 634 Bytes
Contents
module Rack::App::RequestConfigurator extend self def configure(env) set_path_info(env) set_extname(env) end protected EXTNAME = ::Rack::App::Constants::ENV::EXTNAME PATH_INFO = ::Rack::App::Constants::ENV::PATH_INFO ORIGINAL_PATH_INFO = ::Rack::App::Constants::ENV::ORIGINAL_PATH_INFO def set_path_info(env) path_info = env[PATH_INFO] env[ORIGINAL_PATH_INFO]= path_info.dup env[PATH_INFO]= Rack::App::Utils.normalize_path(path_info) end def set_extname(env) path_info = env[PATH_INFO] basename = path_info.split("/").last.to_s env[EXTNAME]= File.extname(basename) end end
Version data entries
54 entries across 54 versions & 2 rubygems