Skip to content

Commit

Permalink
Refactor merb redirect following
Browse files Browse the repository at this point in the history
  • Loading branch information
brynary committed Nov 7, 2008
1 parent ff3e869 commit 5766ccf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/webrat/merb.rb
Expand Up @@ -40,8 +40,9 @@ def response_code
def do_request(url, data, headers, method)
@response = request(url,
:params => (data && data.any?) ? data : nil,
:headers => headers, :method => method)
self.get(@response.headers['Location'], nil, @response.headers) if @response.status == 302
:headers => headers,
:method => method)
follow_redirect
end

def follow_redirect
Expand Down

0 comments on commit 5766ccf

Please sign in to comment.