swift3 middlware errors if content has unicode text

Bug #704196 reported by Chuck Thier
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
High
Unassigned

Bug Description

I found this error when I had a container name that had unicode text. We should also check for objects with unicde names as well.

Example traceback:
Jan 17 23:01:10 storage1 proxy-server Error: You cannot set Response.body to a unicode object (use Response.unicode_body): #012Traceback (most recent call last):#012 File "/home/cthier/swift/devauth-fix-id-2/swift/common/middleware/catch_errors.py", line 37, in __call__#012 return self.app(env, start_response)#012 File "/home/cthier/swift/devauth-fix-id-2/swift/common/middleware/healthcheck.py", line 38, in __call__#012 return self.app(env, start_response)#012 File "/home/cthier/swift/devauth-fix-id-2/swift/common/middleware/memcache.py", line 32, in __call__#012 return self.app(env, start_response)#012 File "/home/cthier/swift/devauth-fix-id-2/swift/common/middleware/swift3.py", line 425, in __call__#012 res = getattr(controller, req.method)(env, start_response)#012 File "/home/cthier/swift/devauth-fix-id-2/swift/common/middleware/swift3.py", line 153, in GET#012 xml_escape(i['name']) for i in containers]))#012 File "/usr/local/lib/python2.6/dist-packages/WebOb-1.0-py2.6.egg/webob/response.py", line 309, in _body__set#012 "You cannot set Response.body to a unicode object (use Response.unicode_body)")#012TypeError: You cannot set Response.body to a unicode object (use Response.unicode_body) (txn: txa6661713-cc10-4cab-8143-ec0b03a52b0b)

Related branches

Chuck Thier (cthier)
Changed in swift:
assignee: nobody → FUJITA Tomonori (fujita-tomonori)
importance: Undecided → Medium
importance: Medium → High
status: New → Triaged
Revision history for this message
FUJITA Tomonori (fujita-tomonori-deactivatedaccount) wrote :

Seems that I can list the unicode name buckets and objects with this fix.

https://code.launchpad.net/~fujita-tomonori/swift/s3api-unicode-fix-1

Revision history for this message
Chuck Thier (cthier) wrote :

Great! Can you propose it for merging?

Changed in swift:
status: Triaged → Fix Committed
Chuck Thier (cthier)
Changed in swift:
milestone: none → 1.2.0
Chuck Thier (cthier)
Changed in swift:
status: Fix Committed → Fix Released
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.