object storage: fix and cleanup header checks
As explained in [1] it is not legitimate to require a Transfer-Encoding
header in Swift responses. That prevents running some tests
successfully in the case where Swift is behind a proxy/load-balancer
that does not use any Transfer-Encoding in its responses.
This change hence removes the checks for the presence of a
"Transfer-Encoding" header, and replaces them by the use
of the existing check methods, after modifying the
custom_matcher checks on which these methods rely on to accept
either a Content-Length or a Transfer-Encoding header.
Some adaptation was also required to avoid trying to process 'etag'
for DELETE requests.
A side-effect of this change is a code simplification and
cleanup since the specific header checks in the corresponding
tests are replaced by the generic check methods.
[1] https://bugs.launchpad.net/tempest/+bug/1819851/comments/3
Closes-Bug: 1819851
Change-Id: Iaccea41640a53b564f72cee73981e2e61d3e80ae
3 files changed