UnicodeDecodeError when mixing Unicode and string

Bug #1465525 reported by Charles Hsu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
keystonemiddleware
New
Undecided
Unassigned

Bug Description

Environment: Swift3 + Keystone + Keystone Middleware

Upload a single file that includes unicode likes "中文", "한국의" or "好ましい", and proxy get 500 Internal server error.

vagrant@dev21:/usr/lib/pymodules/python2.7/keystonemiddleware$ ls -al /usr/lib/pymodules/python2.7/keystonemiddleware
keystonemiddleware/ keystonemiddleware-1.5.0.3.egg-info/

Jun 16 06:58:12 localhost proxy-server: - - 16/Jun/2015/06/58/11 HEAD /v1/%25E5%25A4%25A9%25E5%259C%25B0%25E4%25BA%25BA.txt HTTP/1.0 204 - Swift - - - - txc83f727de259429a838ad-00557fc903 - 0.1757 GET_INFO - 1434437891.822571993 1434437891.998249054
Jun 16 06:58:12 localhost proxy-server: 'ascii' codec can't decode byte 0xe5 in position 42: ordinal not in range(128): #012Traceback (most recent call last):#012 File "/usr/lib/python2.7/dist-packages/swift3/middleware.py", line 82, in __call__#012 resp = self.handle_request(req)#012 File "/usr/lib/python2.7/dist-packages/swift3/middleware.py", line 106, in handle_request#012 res = getattr(controller, req.method)(req)#012 File "/usr/lib/python2.7/dist-packages/swift3/controllers/obj.py", line 83, in PUT#012 resp = req.get_response(self.app)#012 File "/usr/lib/python2.7/dist-packages/swift3/request.py", line 691, in get_response#012 headers, body, query)#012 File "/usr/lib/python2.7/dist-packages/swift3/request.py", line 604, in _get_response#012 sw_resp = sw_req.get_response(app)#012 File "/usr/lib/pymodules/python2.7/swift/common/swob.py", line 995, in get_response#012 status, headers, app_iter = self.call_application(application)#012 File "/usr/lib/pymodules/python2.7/swift/common/swob.py", line 981, in call_application#012 app_iter = application(self.environ, start_response)#012 File "/usr/lib/pymodules/python2.7/keystonemiddleware/s3_token.py", line 256, in __call__#012 new_tenant_name)#012UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 42: ordinal not in range(128) (txn: txc83f727de259429a838ad-00557fc903)
Jun 16 06:58:12 localhost proxy-server: 192.168.200.100 192.168.200.100 16/Jun/2015/06/58/12 PUT /test/%25E5%25A4%25A9%25E5%259C%25B0%25E4%25BA%25BA.txt HTTP/1.0 500 - Cyberduck/4.6.5%20%28Mac%20OS%20X/10.10.2%29%20%28x86_64%29 - - 302 - txc83f727de259429a838ad-00557fc903 - 0.4212 - - 1434437891.820493937 1434437892.241671085

Revision history for this message
Charles Hsu (charles0126) wrote :
Revision history for this message
Charles Hsu (charles0126) wrote :
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.