From 422c6aea89310899bceda5d8797d311acafafa84 Mon Sep 17 00:00:00 2001 From: Nicolas Sanguinetti Date: Mon, 29 Dec 2008 03:37:37 -0200 Subject: [PATCH] Use request_page to handle sinatra redirects This should make current_url and keeping the referrer work as expected --- lib/webrat/sinatra.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/webrat/sinatra.rb b/lib/webrat/sinatra.rb index 276d028..fe14817 100644 --- a/lib/webrat/sinatra.rb +++ b/lib/webrat/sinatra.rb @@ -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