summary refs log tree commit
path: root/lib/rack/recursive.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rack/recursive.rb')
-rw-r--r--lib/rack/recursive.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/rack/recursive.rb b/lib/rack/recursive.rb
index b431d4dd..17d17dfd 100644
--- a/lib/rack/recursive.rb
+++ b/lib/rack/recursive.rb
@@ -14,8 +14,8 @@ module Rack
       @url = URI(url)
       @env = env
 
-      @env["PATH_INFO"] =       @url.path
-      @env["QUERY_STRING"] =    @url.query  if @url.query
+      @env[PATH_INFO] =         @url.path
+      @env[QUERY_STRING] =      @url.query  if @url.query
       @env["HTTP_HOST"] =       @url.host   if @url.host
       @env["HTTP_PORT"] =       @url.port   if @url.port
       @env["rack.url_scheme"] = @url.scheme if @url.scheme
@@ -39,7 +39,7 @@ module Rack
     end
 
     def _call(env)
-      @script_name = env["SCRIPT_NAME"]
+      @script_name = env[SCRIPT_NAME]
       @app.call(env.merge('rack.recursive.include' => method(:include)))
     rescue ForwardRequest => req
       call(env.merge(req.env))
@@ -51,8 +51,9 @@ module Rack
         raise ArgumentError, "can only include below #{@script_name}, not #{path}"
       end
 
-      env = env.merge("PATH_INFO" => path, "SCRIPT_NAME" => @script_name,
-                      "REQUEST_METHOD" => "GET",
+      env = env.merge(PATH_INFO => path,
+                      SCRIPT_NAME => @script_name,
+                      REQUEST_METHOD => "GET",
                       "CONTENT_LENGTH" => "0", "CONTENT_TYPE" => "",
                       "rack.input" => StringIO.new(""))
       @app.call(env)