diff options
Diffstat (limited to 'lib/unicorn/app/old_rails')
-rw-r--r-- | lib/unicorn/app/old_rails/static.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/unicorn/app/old_rails/static.rb b/lib/unicorn/app/old_rails/static.rb index 1a78a23..82f8aa5 100644 --- a/lib/unicorn/app/old_rails/static.rb +++ b/lib/unicorn/app/old_rails/static.rb @@ -21,9 +21,11 @@ # fast as if you use a static server like nginx). class Unicorn::App::OldRails::Static < Struct.new(:app, :root, :file_server) FILE_METHODS = { 'GET' => true, 'HEAD' => true } - REQUEST_METHOD = 'REQUEST_METHOD'.freeze - REQUEST_URI = 'REQUEST_URI'.freeze - PATH_INFO = 'PATH_INFO'.freeze + + # avoid allocating new strings for hash lookups + REQUEST_METHOD = 'REQUEST_METHOD' + REQUEST_URI = 'REQUEST_URI' + PATH_INFO = 'PATH_INFO' def initialize(app) self.app = app |