]> git.apps.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)
committerMatt Benjamin <mbenjamin@redhat.com>
Thu, 18 Jul 2019 20:01:50 +0000 (16:01 -0400)
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>
src/rgw/rgw_lc.cc

index 5175c87383981bd51848dda304efb2bd6a732aab..de3715f3fc3007c3472aef7caca62ebe966f7ed4 100644 (file)
@@ -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 {