Permalink
Browse files

Set SCRIPT_NAME in the rack env to an empty string

  • Loading branch information...
1 parent 406be4f commit d40d00f3a95b6eb46f0c7c150263f3f2583beb5f @carllerche carllerche committed Feb 24, 2011
Showing with 4 additions and 2 deletions.
  1. +2 −1 lib/kirk/server/handler.rb
  2. +2 −1 spec/kirk/rack_spec.rb
@@ -63,8 +63,9 @@ def self.new(app)
def handle(target, base_request, request, response)
begin
env = DEFAULT_RACK_ENV.merge(
- REQUEST_URI => request.getRequestURI,
+ SCRIPT_NAME => "",
PATH_INFO => request.get_path_info,
+ REQUEST_URI => request.getRequestURI,
REQUEST_METHOD => request.get_method || "GET",
RACK_URL_SCHEME => request.get_scheme || "http",
QUERY_STRING => request.get_query_string || "",
@@ -19,8 +19,9 @@
'rack.url_scheme' => 'http',
# Request specific
- 'REQUEST_URI' => '/',
+ 'SCRIPT_NAME' => '',
'PATH_INFO' => '/',
+ 'REQUEST_URI' => '/',
'REQUEST_METHOD' => 'GET',
'QUERY_STRING' => '',
'SERVER_NAME' => 'example.org',

0 comments on commit d40d00f

Please sign in to comment.