summary refs log tree commit
path: root/lib/rack/directory.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rack/directory.rb')
-rw-r--r--lib/rack/directory.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/rack/directory.rb b/lib/rack/directory.rb
index 602f2d44..98d66e02 100644
--- a/lib/rack/directory.rb
+++ b/lib/rack/directory.rb
@@ -55,8 +55,8 @@ table { width:100%%; }
 
     def _call(env)
       @env = env
-      @script_name = env['SCRIPT_NAME']
-      @path_info = Utils.unescape(env['PATH_INFO'])
+      @script_name = env[SCRIPT_NAME]
+      @path_info = Utils.unescape(env[PATH_INFO])
 
       if forbidden = check_forbidden
         forbidden
@@ -72,7 +72,7 @@ table { width:100%%; }
       body = "Forbidden\n"
       size = Rack::Utils.bytesize(body)
       return [403, {"Content-Type" => "text/plain",
-        "Content-Length" => size.to_s,
+        CONTENT_LENGTH => size.to_s,
         "X-Cascade" => "pass"}, [body]]
     end
 
@@ -101,7 +101,7 @@ table { width:100%%; }
         @files << [ url, basename, size, type, mtime ]
       end
 
-      return [ 200, {'Content-Type'=>'text/html; charset=utf-8'}, self ]
+      return [ 200, { CONTENT_TYPE =>'text/html; charset=utf-8'}, self ]
     end
 
     def stat(node, max = 10)
@@ -130,7 +130,7 @@ table { width:100%%; }
       body = "Entity not found: #{@path_info}\n"
       size = Rack::Utils.bytesize(body)
       return [404, {"Content-Type" => "text/plain",
-        "Content-Length" => size.to_s,
+        CONTENT_LENGTH => size.to_s,
         "X-Cascade" => "pass"}, [body]]
     end