AttributeError when a header contains only non-printable chars
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
New
|
Undecided
|
Unassigned | ||
Swift3 |
In Progress
|
Undecided
|
Yuxin Wang |
Bug Description
When we tested using ceph/s3-tests, for some test cases, the request headers contain only non-printable chars and it would raise 'NoneType' object has no attribute 'split' error.
Cases include:
s3tests.
s3tests.
s3tests.
s3tests.
s3tests.
s3tests.
Versions we are using:
swift3: 1.12
ceph/s3-tests: f318716c6
Debug info and traceback:
boto: DEBUG: path=/testbucket/
boto: DEBUG: auth_path=
boto: DEBUG: Method: PUT
boto: DEBUG: Path: /testbucket/
boto: DEBUG: Data:
boto: DEBUG: Headers: {}
boto: DEBUG: Host: s3.US.test.com
boto: DEBUG: Port: 80
boto: DEBUG: Params: {}
boto: DEBUG: Token: None
boto: DEBUG: Final headers: {'x-amz-
boto: DEBUG: Response headers: [('x-amz-id-2', 'txc580336b3298
boto: DEBUG: Received 500 response. Retrying in 0.7 seconds
Apr 16 16:25:20 test_161 swift3: 'NoneType' object has no attribute 'split':
Traceback (most recent call last):
File "/usr/lib/
req = req_class(env, self.app, self.slo_enabled)
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
for (k, v) in six.iteritems(
File "/usr/lib/
for (k, v) in six.iteritems(
AttributeError: 'NoneType' object has no attribute 'split' (txn: tx8427a7a863e04
Changed in swift3: | |
assignee: | nobody → Yuxin Wang (chhyx2008) |
Changed in swift3: | |
status: | New → In Progress |
After _header_strip the header contains only non-printable, it returns None, and None can't split.
https:/ /github. com/openstack/ swift3/ blob/1. 12/swift3/ request. py#L280