Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Reset response to None when following a redirect. #807

Merged
merged 1 commit into from Jun 11, 2012

Conversation

Projects
None yet
2 participants
Contributor

tpodowd commented Jun 11, 2012

  • if a request which follows a redirect throws a HTTPException
    and we're out of retries, the real exception is hidden because
    the response from the previous redirect is still set. Resetting
    the response to None, allows us to see any real exception.
Reset response to None when following a redirect.
- if a request which follows a redirect throws a HTTPException
  and we're out of retries, the real exception is hidden because
  the response from the previous redirect is still set. Resetting
  the response to None, allows us to see any real exception.
Contributor

tpodowd commented Jun 11, 2012

Shouldn't break anything. Here's an s3 test run.

$ ./test.py -t s3
--- running S3Connection tests ---
--- tests completed ---
.................--- running S3Encryption tests ---
--- tests completed ---

.............

Ran 30 tests in 178.457s

OK

Owner

tpodowd commented on 29f0f24 Jun 11, 2012

Also note that redirects don't count towards a retry so we always do one more request. This is why it's ok to do this here.

Tom.

garnaat added a commit that referenced this pull request Jun 11, 2012

Merge pull request #807 from tpodowd/clear_redirect_response
Reset response to None when following a redirect.

@garnaat garnaat merged commit bc05cb1 into boto:develop Jun 11, 2012

Contributor

tpodowd commented Jun 12, 2012

Thanks Mitch.

Tom.

msabramo pushed a commit to msabramo/boto that referenced this pull request Nov 28, 2012

Merge pull request #807 from tpodowd/clear_redirect_response
Reset response to None when following a redirect.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment