Compatible issue with amazon s3 go sdk

Bug #1642217 reported by Charles Hsu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Swift3
Invalid
Undecided
Unassigned

Bug Description

It seems like go SDK not works well with swift3 because it includes protocol and fqdn in request path.

Request:

HEAD http://swift.chhsu.com/test/test.zip HTTP/1.1
Host: swift.chhsu.com
User-Agent: aws-sdk-go/1.5.5 (go1.7.3; darwin; amd64)
Authorization: AWS4-HMAC-SHA256 Credential=demo/20161116/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=8597a1900784b56b31e41f8af88b9ca848c53f3c4d7d929a80264af12e817f23
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
X-Amz-Date: 20161116T100714Z

Response:

HTTP/1.1 500 Internal Server Error
x-amz-id-2: tx501a7476ba484aab87472-00582c2ee9
x-amz-request-id: tx501a7476ba484aab87472-00582c2ee9
Content-Type: application/xml
Content-Length: 0
X-Trans-Id: tx501a7476ba484aab87472-00582c2ee9
Date: Wed, 16 Nov 2016 10:03:21 GMT

Logs:
~$ sudo grep tx501a7476ba484aab87472 /var/log/swift/all.log
Nov 16 10:03:21 dev21 proxy-server: Invalid path: http%3A//swift.chhsu.com/test/test.zip: #012Traceback (most recent call last):#012 File "/usr/lib/python2.7/dist-packages/swift3/middleware.py", line 110, in __call__#012 req = req_class(env, self.app, self.slo_enabled)#012 File "/usr/lib/python2.7/dist-packages/swift3/request.py", line 368, in __init__#012 self.container_name, self.object_name = self._parse_uri()#012 File "/usr/lib/python2.7/dist-packages/swift3/request.py", line 457, in _parse_uri#012 bucket, obj = self.split_path(0, 2, True)#012 File "/usr/lib/pymodules/python2.7/swift/common/swob.py", line 1032, in split_path#012 minsegs, maxsegs, rest_with_last)#012 File "/usr/lib/pymodules/python2.7/swift/common/utils.py", line 1168, in split_path#012 raise ValueError('Invalid path: %s' % quote(path))#012ValueError: Invalid path: http%3A//swift.chhsu.com/test/test.zip (txn: tx501a7476ba484aab87472-00582c2ee9)
Nov 16 10:03:21 dev21 proxy-server: 192.168.190.100 192.168.190.100 16/Nov/2016/10/03/21 HEAD http://swift.chhsu.com/test/test.zip HTTP/1.0 500 - aws-sdk-go/1.5.5%20%28go1.7.3%3B%20darwin%3B%20amd64%29 - - - - tx501a7476ba484aab87472-00582c2ee9 - 0.0009 - - 1479290601.478821993 1479290601.479682922 -

Revision history for this message
Charles Hsu (charles0126) wrote :
Revision history for this message
Charles Hsu (charles0126) wrote :

Okay, I think it's a bug in python wsgi module.

https://bugs.python.org/issue21472

Changed in swift3:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.