-
-
Notifications
You must be signed in to change notification settings - Fork 909
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
Bug/region endpoints #440
Bug/region endpoints #440
Conversation
With the new v4 signature code, we have to send requests to the proper region. The default region (US, s3.amazonaws.com) will redirect to the proper region, but we have to take a redirect to get there. When --region is specified, and we know that region's endpoint, simply send the request straight there without being redirected.
Just as we handle --region on the command line, S3 may forward us to a different region after a request is made. If so, change our host_bucket value because S3 told us to. This moves the set_host_bucket() function out of s3cmd and into S3/S3.py.
Not just s3.amazonaws.com (US1 default), but for all regions. If you don't specify --region, it was working, because the initial request would go to s3.amazonaws.com, and we would then globally disable hsotname checking. But if you specify --region eu-central-1, it would fail because hostname checking would remain on. This patch checks for presence of 'amazonaws.com' in the hostname, and disables hostname checking.
Ugh. s3cmd cp between buckets in different regions blows up after receiving a HTTP 301 redirect from the source bucket region, saying to use the destination bucket region's endpoint. But that doesn't work either. This happens whenever you have multiple buckets, in multiple regions, being operated on, not just on the cp operation. rb s3://bucket-region-1 s3://bucket-region/2 also fails, because we're rewriting the host_base now for all buckets, not just for the one being operated on at the moment. really, endpoint should be tracked on a per-bucket basis, not globally. |
this isn't ready for merge. Need to figure out how to handle the redirects correctly, to endpoints when DNS hasn't caught up such that . DNS works yet. |
Hi, I put an eye on it ASAP |
Also me. Many people wait for the patch. Thank you. |
this really is a show stopper. |
why is it a showstopper? s3cmd works with all regions right now, it's not On Fri, Jan 23, 2015 at 2:20 PM, glaszig notifications@github.com wrote:
|
with |
@glaszig If you don't issue a create bucket command then your output is expected. Could you post the command you are trying? |
the issue went away after commenting here. quite weird. i assume it was my fault. sorry and thanks.= |
Obsolete PR. Issue is now already fixed in MASTER. |
Help for #402