From e8dd3e13b9a9f548a3138debd09e87fbb69e3998 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 7 Dec 2009 02:20:18 +0000 Subject: http: PATH_INFO/REQUEST_PATH includes semi-colons This is allowed according to RFC 2396, section 3.3 and matches the behavior of URI.parse, as well. --- lib/unicorn/app/old_rails/static.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib/unicorn/app/old_rails/static.rb') diff --git a/lib/unicorn/app/old_rails/static.rb b/lib/unicorn/app/old_rails/static.rb index 82f8aa5..13a435e 100644 --- a/lib/unicorn/app/old_rails/static.rb +++ b/lib/unicorn/app/old_rails/static.rb @@ -46,11 +46,7 @@ class Unicorn::App::OldRails::Static < Struct.new(:app, :root, :file_server) end # then try the cached version: - - # grab the semi-colon REST operator used by old versions of Rails - # this is the reason we didn't just copy the new Rails::Rack::Static - env[REQUEST_URI] =~ /^#{Regexp.escape(path_info)}(;[^\?]+)/ - path_info << "#$1#{ActionController::Base.page_cache_extension}" + path_info << ActionController::Base.page_cache_extension if File.file?("#{root}/#{::Rack::Utils.unescape(path_info)}") env[PATH_INFO] = path_info -- cgit v1.2.3-24-ge0c7