From: Matt Benjamin Date: Fri, 3 May 2019 17:48:31 +0000 (-0400) Subject: rgw: fix header timestamp X-Git-Tag: v14.2.10~211^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=39bbfc1f5a16ebf5602eafb8b905c50a26e917c1;p=ceph.git rgw: fix header timestamp The AWS example of this header intends to be RFC822-compliant. Found by Tyler Brekke . Signed-off-by: Matt Benjamin (cherry picked from commit 6da5be5aba0820dc91aa44d4b63cd490b39371db) Signed-off-by: Yuval Lifshitz --- diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 1bb9330bb243..e6ce0e8ea999 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -1651,7 +1651,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 {