diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-03-30 01:38:59 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-03-30 01:38:59 -0700 |
commit | 12134471a3ba93d9882f225a368bf738844a9d18 (patch) | |
tree | f80141ff0174eb88c45872505bcacb501dfca794 | |
parent | aa2208a0574c395cf91ce7ff82e978895aa8b1b7 (diff) | |
download | unicorn-12134471a3ba93d9882f225a368bf738844a9d18.tar.gz |
REQUEST_METHOD got removed from Unicorn::Const and this module is the only place that currently uses it.
-rw-r--r-- | lib/unicorn/app/old_rails/static.rb | 4 |
1 files 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("/") |