Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only set auth_path once, fixes signing errors #372

Merged
merged 2 commits into from
Nov 7, 2014

Conversation

jamesls
Copy link
Member

@jamesls jamesls commented Nov 7, 2014

Fixes aws/aws-cli#986

The bug was that the fix_s3_host always sets the auth_path
to the current path of the request.url. However, in the case
of a retried request, we call fix_s3_host again which changes
the auth_path to the (already modified) request path. This
generates an auth error.

The fix now is to check if auth_path is set, and if it is, then
we can immediately return.

cc @kyleknap @danielgtaylor

Fixes aws/aws-cli#986

The bug was that the fix_s3_host always sets the auth_path
to the current path of the request.url.  However, in the case
of a retried request, we call fix_s3_host again which changes
the auth_path to the (already modified) request path.  This
generates an auth error.

The fix now is to check if auth_path is set, and if it is, then
we can immediately return.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.0%) when pulling 12b8553 on jamesls:fix-retry-auth-error into 82ad3a0 on boto:develop.

from botocore.hooks import first_non_none_response
from botocore.auth import BaseSigner
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BaseSigner is not used in this file.

@kyleknap
Copy link
Contributor

kyleknap commented Nov 7, 2014

Looks good. Had that one comment about an unused import. 🚢

@jamesls
Copy link
Member Author

jamesls commented Nov 7, 2014

Ok. I'll go ahead and remove the unused import and merge the change.

@jamesls jamesls merged commit 631a0fc into boto:develop Nov 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intermittent SignatureDoesNotMatch errors using s3 cp
3 participants