Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Commits on Sep 26, 2012
@josh josh Revert "Merge pull request #7 from bartt/master"
This reverts commit 6a6c15d, reversing
changes made to 239e2d4.
e07a9de
Showing with 0 additions and 16 deletions.
  1. +0 −2  lib/rack/ssl.rb
  2. +0 −14 test/test_ssl.rb
View
2  lib/rack/ssl.rb
@@ -18,7 +18,6 @@ def initialize(app, options = {})
@exclude = options[:exclude]
@host = options[:host]
- @port = options[:port]
end
def call(env)
@@ -51,7 +50,6 @@ def redirect_to_https(env)
url = URI(req.url)
url.scheme = "https"
url.host = @host if @host
- url.port = @port if @port
headers = hsts_headers.merge('Content-Type' => 'text/html',
'Location' => url.to_s)
View
14 test/test_ssl.rb
@@ -124,20 +124,6 @@ def test_redirect_to_host
last_response.headers['Location']
end
- def test_redirect_to_port
- self.app = Rack::SSL.new(default_app, :port => 8443)
- get "http://example.org/path?key=value"
- assert_equal "https://example.org:8443/path?key=value",
- last_response.headers['Location']
- end
-
- def test_redirect_to_host_and_port
- self.app = Rack::SSL.new(default_app, :host => "ssl.example.org", :port => 8443)
- get "http://example.org/path?key=value"
- assert_equal "https://ssl.example.org:8443/path?key=value",
- last_response.headers['Location']
- end
-
def test_redirect_to_secure_host_when_on_subdomain
self.app = Rack::SSL.new(default_app, :host => "ssl.example.org")
get "http://ssl.example.org/path?key=value"

No commit comments for this range

Something went wrong with that request. Please try again.