Skip to content

Commit

Permalink
Refactoring default host
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Libanori committed Mar 3, 2011
1 parent ef084a7 commit 55c9a99
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/webrat/core/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,15 @@ def response_location
end

def current_host
URI.parse(current_url).host || @custom_headers["Host"] || adapter.session.rack_mock_session.default_host
URI.parse(current_url).host || @custom_headers["Host"] || default_current_host
end

def response_location_host
URI.parse(response_location).host || adapter.session.rack_mock_session.default_host
URI.parse(response_location).host || default_current_host
end

def default_current_host
adapter.session.rack_mock_session.default_host
end

def reset
Expand Down

0 comments on commit 55c9a99

Please sign in to comment.