From 12134471a3ba93d9882f225a368bf738844a9d18 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 30 Mar 2009 01:38:59 -0700 Subject: app/old_rails/static: define missing constant REQUEST_METHOD got removed from Unicorn::Const and this module is the only place that currently uses it. --- lib/unicorn/app/old_rails/static.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/unicorn/app/old_rails/static.rb b/lib/unicorn/app/old_rails/static.rb index c9366d2..7ec6b6d 100644 --- a/lib/unicorn/app/old_rails/static.rb +++ b/lib/unicorn/app/old_rails/static.rb @@ -21,6 +21,7 @@ require 'rack/file' # fast as if you use a static server like nginx). class Unicorn::App::OldRails::Static FILE_METHODS = { 'GET' => true, 'HEAD' => true }.freeze + REQUEST_METHOD = 'REQUEST_METHOD'.freeze def initialize(app) @app = app @@ -30,8 +31,7 @@ class Unicorn::App::OldRails::Static def call(env) # short circuit this ASAP if serving non-file methods - FILE_METHODS.include?(env[Unicorn::Const::REQUEST_METHOD]) or - return @app.call(env) + FILE_METHODS.include?(env[REQUEST_METHOD]) or return @app.call(env) # first try the path as-is path_info = env[Unicorn::Const::PATH_INFO].chomp("/") -- cgit v1.2.3-24-ge0c7