Methods
Public Instance methods
Neuter CGI parameter parsing.
[ show source ]
# File actionpack/lib/action_controller/cgi_ext/query_extension.rb, line 9
9: def initialize_query
10: # Fix some strange request environments.
11: env_table['REQUEST_METHOD'] ||= 'GET'
12:
13: # POST assumes missing Content-Type is application/x-www-form-urlencoded.
14: if env_table['CONTENT_TYPE'].blank? && env_table['REQUEST_METHOD'] == 'POST'
15: env_table['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'
16: end
17:
18: @cookies = CGI::Cookie::parse(env_table['HTTP_COOKIE'] || env_table['COOKIE'])
19: @params = {}
20: end