]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: fix bucket location s3 compatible issue
authorJiaying Ren <jiaying.ren@umcloud.com>
Thu, 25 May 2017 10:50:37 +0000 (18:50 +0800)
committerJiaying Ren <jiaying.ren@umcloud.com>
Sun, 18 Jun 2017 03:24:43 +0000 (11:24 +0800)
commitdb13592398ed5872dbb4d1b44b821926ffa5397c
tree9b8ad68fcddc4fae71f588c095aca47be594f166
parentc994071bac57982bef5e5e5c8657b1500d0d1839
rgw: fix bucket location s3 compatible issue

create bucket with location constraint doesn't exist in AWS S3
will response like the following:

{'data': '<?xml version="1.0" encoding="UTF-8"?>\n
<Error><Code>InvalidLocationConstraint</Code>
<Message>The specified location-constraint is not valid</Message>
<LocationConstraint>ap-southeast-4</LocationConstraint>
<RequestId>15D886DFEF49765A</RequestId>
<HostId>IroSlmBZq7iSluYIgea7y+72OXbOSmjX2eVYING0tUuGR8BAHLcYPOgUWUIJUuG1z/1FhfaxJUo=</HostId></Error>',
 'headers': {'connection': 'close',
             'content-type': 'application/xml',
             'date': 'Thu, 25 May 2017 03:45:49 GMT',
             'server': 'AmazonS3',
             'transfer-encoding': 'chunked',
             'x-amz-id-2': 'IroSlmBZq7iSluYIgea7y+72OXbOSmjX2eVYING0tUuGR8BAHLcYPOgUWUIJUuG1z/1FhfaxJUo=',
             'x-amz-request-id': '15D886DFEF49765A'},
 'reason': 'Bad Request',
 'status': 400}

Signed-off-by: Jiaying Ren <jiaying.ren@umcloud.com>
src/rgw/rgw_common.cc
src/rgw/rgw_common.h
src/rgw/rgw_op.cc