swift/test/unit/proxy/controllers
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
..
__init__.py re-use headers_to_container_info on container GET 2012-11-01 18:46:47 -07:00
test_account.py Client should retry when there's just one 404 and a bunch of errors 2020-09-08 14:33:09 -07:00
test_base.py proxy-server: de-duplicate _get_next_response_part method 2024-02-26 09:50:22 +00:00
test_container.py proxy: only use listing shards cache for 'auto' listings 2024-01-31 11:02:54 +00:00
test_info.py formpost: deprecate sha1 signatures 2022-07-26 10:39:58 +10:00
test_obj.py proxy-server: de-duplicate _get_next_response_part method 2024-02-26 09:50:22 +00:00