提交 7e175111 编写于 作者: P Pratik Naik

Rename RackRequest to Request

上级 408ec6c0
......@@ -38,7 +38,7 @@ module ActionController
# TODO: Review explicit to see if they will automatically be handled by
# the initilizer if they are really needed.
def self.load_all!
[Base, CGIHandler, CgiRequest, RackRequest, RackRequest, Http::Headers, UrlRewriter, UrlWriter]
[Base, CGIHandler, CgiRequest, Request, Response, Http::Headers, UrlRewriter, UrlWriter]
end
autoload :AbstractRequest, 'action_controller/request'
......@@ -59,7 +59,7 @@ def self.load_all!
autoload :MiddlewareStack, 'action_controller/middleware_stack'
autoload :MimeResponds, 'action_controller/mime_responds'
autoload :PolymorphicRoutes, 'action_controller/polymorphic_routes'
autoload :RackRequest, 'action_controller/request'
autoload :Request, 'action_controller/request'
autoload :RecordIdentifier, 'action_controller/record_identifier'
autoload :Response, 'action_controller/response'
autoload :RequestForgeryProtection, 'action_controller/request_forgery_protection'
......
......@@ -83,7 +83,7 @@ def call(env)
end
def _call(env)
@request = RackRequest.new(env)
@request = Request.new(env)
@response = Response.new
dispatch
end
......
......@@ -371,7 +371,7 @@ def generic_url_rewriter
"SERVER_PORT" => https? ? "443" : "80",
"HTTPS" => https? ? "on" : "off"
}
UrlRewriter.new(RackRequest.new(env), {})
UrlRewriter.new(Request.new(env), {})
end
def name_with_prefix(prefix, name)
......
......@@ -862,7 +862,7 @@ class UploadedTempfile < Tempfile
include UploadedFile
end
class RackRequest < AbstractRequest #:nodoc:
class Request < AbstractRequest #:nodoc:
attr_accessor :session_options
class SessionFixationAttempt < StandardError #:nodoc:
......
......@@ -43,10 +43,10 @@ def setup
"REDIRECT_STATUS" => "200",
"REQUEST_METHOD" => "GET"
}
@request = ActionController::RackRequest.new(@env)
@request = ActionController::Request.new(@env)
# some Nokia phone browsers omit the space after the semicolon separator.
# some developers have grown accustomed to using comma in cookie values.
@alt_cookie_fmt_request = ActionController::RackRequest.new(@env.merge({"HTTP_COOKIE"=>"_session_id=c84ace847,96670c052c6ceb2451fb0f2;is_admin=yes"}))
@alt_cookie_fmt_request = ActionController::Request.new(@env.merge({"HTTP_COOKIE"=>"_session_id=c84ace847,96670c052c6ceb2451fb0f2;is_admin=yes"}))
end
def default_test; end
......@@ -218,7 +218,7 @@ def test_body_should_be_rewound
@env['CONTENT_TYPE'] = 'application/x-www-form-urlencoded; charset=utf-8'
# Read the request body by parsing params.
request = ActionController::RackRequest.new(@env)
request = ActionController::Request.new(@env)
request.request_parameters
# Should have rewound the body.
......
......@@ -856,7 +856,7 @@ def parse_body(body)
env = { 'rack.input' => StringIO.new(body),
'CONTENT_TYPE' => 'application/xml',
'CONTENT_LENGTH' => body.size.to_s }
ActionController::RackRequest.new(env).request_parameters
ActionController::Request.new(env).request_parameters
end
end
......@@ -866,7 +866,7 @@ def parse_body(body)
env = { 'rack.input' => StringIO.new(body),
'HTTP_X_POST_DATA_FORMAT' => 'xml',
'CONTENT_LENGTH' => body.size.to_s }
ActionController::RackRequest.new(env).request_parameters
ActionController::Request.new(env).request_parameters
end
end
......@@ -888,6 +888,6 @@ def parse_body(body,content_type)
env = { 'rack.input' => StringIO.new(body),
'CONTENT_TYPE' => content_type,
'CONTENT_LENGTH' => body.size.to_s }
ActionController::RackRequest.new(env).request_parameters
ActionController::Request.new(env).request_parameters
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册