6873fc8026
Upgraded to Rails 2.0.2, except that we maintain vendor/rails/actionpack/lib/action_controller/routing.rb from Rail 1.2.6 (at least for now), so that Routes don't change. We still get to enjoy Rails's many new features. Also fixed a bug in Chunk-handling: disable WikiWord processing in tags (for real this time).
23 lines
683 B
Ruby
23 lines
683 B
Ruby
require 'cgi'
|
|
|
|
class CGI #:nodoc:
|
|
module QueryExtension
|
|
# Remove the old initialize_query method before redefining it.
|
|
remove_method :initialize_query
|
|
|
|
# Neuter CGI parameter parsing.
|
|
def initialize_query
|
|
# Fix some strange request environments.
|
|
env_table['REQUEST_METHOD'] ||= 'GET'
|
|
|
|
# POST assumes missing Content-Type is application/x-www-form-urlencoded.
|
|
if env_table['CONTENT_TYPE'].blank? && env_table['REQUEST_METHOD'] == 'POST'
|
|
env_table['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'
|
|
end
|
|
|
|
@cookies = CGI::Cookie::parse(env_table['HTTP_COOKIE'] || env_table['COOKIE'])
|
|
@params = {}
|
|
end
|
|
end
|
|
end
|