6772312ea7
The primary license of the project is changing to: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later with some specific files to be licensed under the one of two licenses: CC0-1.0 LGPL-3.0-or-later This commit is one of the many steps to relicense the entire codebase. Documentation granting permission for this relicensing (from all past contributors who hold copyrights) is on file with Software Freedom Conservancy, Inc.
16 lines
581 B
Ruby
16 lines
581 B
Ruby
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
|
require 'rails_helper'
|
|
require "rack/ssl"
|
|
describe Rack::SSL do
|
|
describe '.call' do
|
|
it "invalid uri returns 404" do
|
|
def test_invalid_uri_returns_404
|
|
# Can't test this with Rack::Test because it fails on the URI before it
|
|
# even gets to Rack::SSL. Other webservers will pass this URI through.
|
|
ssl = Rack::SSL.new(nil)
|
|
resp = ssl.call('PATH_INFO' => "https://example.org/path/<script>")
|
|
expect(resp[0]).to eq 404
|
|
end
|
|
end
|
|
end
|
|
end
|