swift/test/unit/proxy
Alistair Coles 8061dfb1c3 proxy-server: de-duplicate _get_next_response_part method
Both GetOrHeadHandler (used for replicated policy GETs) and
ECFragGetter (used for EC policy GETs) have _get_next_response_part
methods that are very similar. This patch replaces them with a single
method in the common GetterBase superclass.

Both classes are modified to use *only* the Request instance passed to
their constructors. Previously their entry methods
(GetOrHeadHandler.get_working_response and
ECFragGetter.response_parts_iter) accepted a Request instance as an
arg and the class then variably referred to that or the Request
instance passed to the constructor. Both instances must be the same
and it is therefore safer to only allow the Request to be passed to
the constructor.

The 'newest' keyword arg is dropped from the GetOrHeadHandler
constructor because it is never used.

This refactoring patch makes no intentional behavioral changes, apart
from the text of some error log messages which have been changed to
differentiate replicated object GETs from EC fragment GETs.

Change-Id: I148e158ab046929d188289796abfbbce97dc8d90
2024-02-26 09:50:22 +00:00
..
controllers proxy-server: de-duplicate _get_next_response_part method 2024-02-26 09:50:22 +00:00
__init__.py Initial commit of Swift code 2010-07-12 17:03:45 -05:00
test_mem_server.py Fix socket leak on object-server death 2019-01-31 18:38:35 +00:00
test_server.py proxy: don't send multi-part terminator when no parts sent 2024-02-05 10:28:40 +00:00
test_sysmeta.py Cleanup tests' import of debug_logger 2021-04-27 12:04:41 +01:00