This patch reorganizes the SLO read response handling. The main goal
was to push the response header replacement for both GET/HEAD SLO and
multipart-manifest=get paths all into a common return path. A new
RespAttrs primitive is used to carry around some metadata details from
requests made in SLO. The authors hope these changes make the code more
easily readable and easier to modify.
Drive-By: add new "friendly_close" function in common.utils so we can
drain empty/error responses more confidently (and use it in swob and
request_helpers).
Drive-By: the tests added in the Related-Change discovered a 500 on
If-[Un]Modified-Since conditional GET requests - it probably wasn't
important, but this refactor fixed it on accident as a side effect.
Reviewed: https:/ /review. opendev. org/c/openstack /swift/ +/893578 /opendev. org/openstack/ swift/commit/ 4a37a2976bb0f1f f5c6fd20800887e 1e848c9bea
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 4a37a2976bb0f1f f5c6fd20800887e 1e848c9bea
Author: Clay Gerrard <email address hidden>
Date: Wed Oct 11 09:33:46 2023 -0500
slo: refactor GET/HEAD response handling
This patch reorganizes the SLO read response handling. The main goal manifest= get paths all into a common return path. A new
was to push the response header replacement for both GET/HEAD SLO and
multipart-
RespAttrs primitive is used to carry around some metadata details from
requests made in SLO. The authors hope these changes make the code more
easily readable and easier to modify.
Drive-By: add new "friendly_close" function in common.utils so we can helpers) .
drain empty/error responses more confidently (and use it in swob and
request_
Drive-By: the tests added in the Related-Change discovered a 500 on [Un]Modified- Since conditional GET requests - it probably wasn't
If-
important, but this refactor fixed it on accident as a side effect.
Closes-Bug: #2040178 Change- Id: I54094f3d2098f5 6b755ec19cc9315 d06a6ca8b15 80b6ecb86e2f0da 904baf2c727
Co-Authored-By: Alistair Coles <email address hidden>
Co-Authored-By: Ashwin Nair <email address hidden>
Related-
Change-Id: Idc84e70539fc74