git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@233 830e0280-6d2a-0410-9c65-932aecc39d9d
Michal Ludvig authored on 2008/09/15 11:52:31... | ... |
@@ -1,3 +1,9 @@ |
1 |
+2008-09-15 Michal Ludvig <michal@logix.cz> |
|
2 |
+ |
|
3 |
+ * S3/S3.py: "s3cmd mb" can create upper-case buckets again |
|
4 |
+ in US. Non-US (e.g. EU) bucket names must conform strict |
|
5 |
+ DNS-rules. |
|
6 |
+ |
|
1 | 7 |
2008-09-10 Michal Ludvig <michal@logix.cz> |
2 | 8 |
|
3 | 9 |
* testsuite, run-tests.py: Added testsuite with first few tests. |
... | ... |
@@ -126,7 +126,6 @@ class S3(object): |
126 | 126 |
return response |
127 | 127 |
|
128 | 128 |
def bucket_create(self, bucket, bucket_location = None): |
129 |
- self.check_bucket_name(bucket) |
|
130 | 129 |
headers = SortedDict() |
131 | 130 |
body = "" |
132 | 131 |
if bucket_location and bucket_location.strip().upper() != "US": |
... | ... |
@@ -134,6 +133,9 @@ class S3(object): |
134 | 134 |
body += bucket_location.strip().upper() |
135 | 135 |
body += "</LocationConstraint></CreateBucketConfiguration>" |
136 | 136 |
debug("bucket_location: " + body) |
137 |
+ self.check_bucket_name(bucket, dns_strict = True) |
|
138 |
+ else: |
|
139 |
+ self.check_bucket_name(bucket, dns_strict = False) |
|
137 | 140 |
headers["content-length"] = len(body) |
138 | 141 |
if self.config.acl_public: |
139 | 142 |
headers["x-amz-acl"] = "public-read" |