swift/test/unit/proxy/controllers
Alistair Coles ca2f6d13b6 Fix unicode errors in object controller logging
Change swift.proxy.server.Application.error_occurred()
to decode message as utf-8 in same way that the
exception_occurred() method was changed in [1].

This prevents a unicode error when logging error responses
in swift.proxy.controllers.base.Controller._make_request()
for paths that have non-ascii characters. Although the unicode
error is currently caught by a surrounding except clause, the
logging and error limiting treatment is different for ascii
vs non-ascii paths. This patch makes them consistent.

Fix the server type reported in _make_request() to be
the correct server type, not always 'Container Server'.

Fix path arg passed to _get_conn_response in
swift.proxy.controllers.obj.BaseObjectController to be req.path
rather than req.

Add unit tests for error_occurred() being called with non-ascii
paths and extend tests for exception_occurred() (see Related-Bug).

[1] Change-Id: Icb7284eb5abc9869c1620ee6366817112d8e5587

Related-Bug: #1597210
Change-Id: I285499d164bff94835bdddb25d2af6d73114c281
2016-07-07 13:50:17 +01:00
..
__init__.py re-use headers_to_container_info on container GET 2012-11-01 18:46:47 -07:00
test_account.py Use the same key for memcache and env['swift.infocache'] 2016-05-16 18:43:32 -07:00
test_base.py Enable middleware to set metadata on object POST 2016-06-28 11:00:33 +01:00
test_container.py Use the same key for memcache and env['swift.infocache'] 2016-05-16 18:43:32 -07:00
test_info.py Remove simplejson from tests 2015-05-28 16:05:57 -07:00
test_obj.py Fix unicode errors in object controller logging 2016-07-07 13:50:17 +01:00