Skip to content

Commit

Permalink
rgw: fix header timestamp
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mattbenjamin committed Jul 18, 2019
1 parent 8981c5e commit 6da5be5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rgw/rgw_lc.cc
Expand Up @@ -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 {
Expand Down

0 comments on commit 6da5be5

Please sign in to comment.