Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 975a69ad41
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (15 sloc) 0.534 kb
require 'test/spec'
require 'rack/mock'
require 'rack/contrib/lighttpd_script_name_fix'
context "Rack::LighttpdScriptNameFix" do
specify "corrects SCRIPT_NAME and PATH_INFO set by lighttpd " do
env = {
"PATH_INFO" => "/foo/bar/baz",
"SCRIPT_NAME" => "/hello"
}
app = lambda { |_| [200, {'Content-Type' => 'text/plain'}, ["Hello, World!"]] }
response = Rack::LighttpdScriptNameFix.new(app).call(env)
env['SCRIPT_NAME'].should.be.empty
env['PATH_INFO'].should.equal '/hello/foo/bar/baz'
end
end
Jump to Line
Something went wrong with that request. Please try again.