Use request_page to handle sinatra redirects

This should make current_url and keeping the referrer work as expected
This commit is contained in:
Nicolas Sanguinetti 2008-12-29 03:37:37 -02:00
parent 6704d487bc
commit 422c6aea89
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ module Webrat
path, data, headers = *args
params = data.merge(:env => headers || {})
self.__send__("#{verb}_it", path, params)
get_it(@response.location, params) while @response.redirect?
request_page(@response.location, :get, {}) while @response.redirect?
end
end
end