Skip to content

Commit

Permalink
Merge pull request #295 from httprb/fix/redirector-with-persistor
Browse files Browse the repository at this point in the history
Flush response before following redirect
  • Loading branch information
ixti committed Jan 15, 2016
2 parents 485cc5c + 6e4cc86 commit 4ef2a60
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/http/redirector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def perform(request, response)
fail TooManyRedirectsError if too_many_hops?
fail EndlessRedirectError if endless_loop?

@response.flush

@request = redirect_to @response.headers[Headers::LOCATION]
@response = yield @request
end
Expand Down

0 comments on commit 4ef2a60

Please sign in to comment.