]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix header timestamp
authorMatt Benjamin <mbenjamin@redhat.com>
Fri, 3 May 2019 17:48:31 +0000 (13:48 -0400)
committerYuval Lifshitz <yuvalif@yahoo.com>
Tue, 3 Mar 2020 11:19:42 +0000 (13:19 +0200)
The AWS example of this header intends to be RFC822-compliant.
Found by Tyler Brekke <tbrekke@redhat.com>.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit 6da5be5aba0820dc91aa44d4b63cd490b39371db)
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
src/rgw/rgw_lc.cc

index 1bb9330bb243a7ddbe35f7589e90c4a0f55ea3ca..e6ce0e8ea999e1a90952690982d59111a0087455 100644 (file)
@@ -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 {