Swift sends Content-Type HTTP header even if the response
doesn't contain body. We have this behaviour implemented
until applying some changes in end_header() function.
Unfortunately, lack of Content-Type causes early exits in
many Tempest's tests for Swift API verification.
Fixes: #12157
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
(cherry picked from commit
106aeba206736d4080326f9bc191876bed63370b)
dump_access_control(s, op);
}
+ if (s->prot_flags & RGW_REST_SWIFT) {
+ force_content_type = true;
+ }
+
/* do not send content type if content length is zero
and the content type was not set by the user */
if (force_content_type || (!content_type && s->formatter->get_len() != 0) || s->err.is_err()){