swift/test/unit/proxy
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
..
controllers Fix unicode errors in object controller logging 2016-07-07 13:50:17 +01:00
__init__.py Initial commit of Swift code 2010-07-12 17:03:45 -05:00
test_mem_server.py Per-policy DiskFile classes 2015-04-14 00:52:16 -07:00
test_server.py Fix unicode errors in object controller logging 2016-07-07 13:50:17 +01:00
test_sysmeta.py Enable middleware to set metadata on object POST 2016-06-28 11:00:33 +01:00