Permalink
Browse files

Remove rack_process.rb

  • Loading branch information...
lifo committed Dec 22, 2008
1 parent 900aad6 commit 408ec6c0dcb901b2432c72bd3253fa691c5aede0
@@ -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/rack_process'
+ autoload :RackRequest, 'action_controller/request'
autoload :RecordIdentifier, 'action_controller/record_identifier'
autoload :Response, 'action_controller/response'
autoload :RequestForgeryProtection, 'action_controller/request_forgery_protection'
@@ -1,73 +0,0 @@
-require 'action_controller/cgi_ext'
-
-module ActionController #:nodoc:
- class RackRequest < AbstractRequest #:nodoc:
- attr_accessor :session_options
-
- class SessionFixationAttempt < StandardError #:nodoc:
- end
-
- def initialize(env)
- @env = env
- super()
- end
-
- %w[ AUTH_TYPE GATEWAY_INTERFACE PATH_INFO
- PATH_TRANSLATED REMOTE_HOST
- REMOTE_IDENT REMOTE_USER SCRIPT_NAME
- SERVER_NAME SERVER_PROTOCOL
-
- HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ACCEPT_ENCODING
- HTTP_ACCEPT_LANGUAGE HTTP_CACHE_CONTROL HTTP_FROM
- HTTP_NEGOTIATE HTTP_PRAGMA HTTP_REFERER HTTP_USER_AGENT ].each do |env|
- define_method(env.sub(/^HTTP_/n, '').downcase) do
- @env[env]
- end
- end
-
- def query_string
- qs = super
- if !qs.blank?
- qs
- else
- @env['QUERY_STRING']
- end
- end
-
- def body_stream #:nodoc:
- @env['rack.input']
- end
-
- def key?(key)
- @env.key?(key)
- end
-
- def cookies
- Rack::Request.new(@env).cookies
- end
-
- def server_port
- @env['SERVER_PORT'].to_i
- end
-
- def server_software
- @env['SERVER_SOFTWARE'].split("/").first
- end
-
- def session_options
- @env['rack.session.options'] ||= {}
- end
-
- def session_options=(options)
- @env['rack.session.options'] = options
- end
-
- def session
- @env['rack.session'] ||= {}
- end
-
- def reset_session
- @env['rack.session'] = {}
- end
- end
-end
@@ -3,6 +3,7 @@
require 'strscan'
require 'active_support/memoizable'
+require 'action_controller/cgi_ext'
module ActionController
# CgiRequest and TestRequest provide concrete implementations.
@@ -860,4 +861,75 @@ class UploadedStringIO < StringIO
class UploadedTempfile < Tempfile
include UploadedFile
end
+
+ class RackRequest < AbstractRequest #:nodoc:
+ attr_accessor :session_options
+
+ class SessionFixationAttempt < StandardError #:nodoc:
+ end
+
+ def initialize(env)
+ @env = env
+ super()
+ end
+
+ %w[ AUTH_TYPE GATEWAY_INTERFACE PATH_INFO
+ PATH_TRANSLATED REMOTE_HOST
+ REMOTE_IDENT REMOTE_USER SCRIPT_NAME
+ SERVER_NAME SERVER_PROTOCOL
+
+ HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ACCEPT_ENCODING
+ HTTP_ACCEPT_LANGUAGE HTTP_CACHE_CONTROL HTTP_FROM
+ HTTP_NEGOTIATE HTTP_PRAGMA HTTP_REFERER HTTP_USER_AGENT ].each do |env|
+ define_method(env.sub(/^HTTP_/n, '').downcase) do
+ @env[env]
+ end
+ end
+
+ def query_string
+ qs = super
+ if !qs.blank?
+ qs
+ else
+ @env['QUERY_STRING']
+ end
+ end
+
+ def body_stream #:nodoc:
+ @env['rack.input']
+ end
+
+ def key?(key)
+ @env.key?(key)
+ end
+
+ def cookies
+ Rack::Request.new(@env).cookies
+ end
+
+ def server_port
+ @env['SERVER_PORT'].to_i
+ end
+
+ def server_software
+ @env['SERVER_SOFTWARE'].split("/").first
+ end
+
+ def session_options
+ @env['rack.session.options'] ||= {}
+ end
+
+ def session_options=(options)
+ @env['rack.session.options'] = options
+ end
+
+ def session
+ @env['rack.session'] ||= {}
+ end
+
+ def reset_session
+ @env['rack.session'] = {}
+ end
+ end
+
end

0 comments on commit 408ec6c

Please sign in to comment.