From 6da5be5aba0820dc91aa44d4b63cd490b39371db Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Fri, 3 May 2019 13:48:31 -0400 Subject: [PATCH] rgw: fix header timestamp The AWS example of this header intends to be RFC822-compliant. Found by Tyler Brekke . Signed-off-by: Matt Benjamin --- src/rgw/rgw_lc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 5175c8738398..de3715f3fc30 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -1643,7 +1643,7 @@ std::string s3_expiration_header( char exp_buf[100]; time_t exp = ceph::real_clock::to_time_t(*expiration_date); if (std::strftime(exp_buf, sizeof(exp_buf), - "%c", std::gmtime(&exp))) { + "%a, %d %b %Y %T %Z", std::gmtime(&exp))) { hdr = fmt::format("expiry-date=\"{0}\", rule-id=\"{1}\"", exp_buf, *rule_id); } else { -- 2.47.3