From: Yehuda Sadeh Date: Mon, 29 Aug 2011 17:57:19 +0000 (-0700) Subject: rgw: don't check for time skew when Expires was set X-Git-Tag: v0.35~197 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=68d1ba84a725f8c44c2912b0c0197ca9bf9451a1;p=ceph.git rgw: don't check for time skew when Expires was set --- diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 6ff974b5c318..e74e7b3ccee2 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -691,8 +691,8 @@ int RGWHandler_REST_S3::authorize() RGW_LOG(10) << "auth_hdr:\n" << auth_hdr << dendl; time_t req_sec = s->header_time.sec(); - if (req_sec < now - RGW_AUTH_GRACE_MINS * 60 || - req_sec > now + RGW_AUTH_GRACE_MINS * 60) { + if ((req_sec < now - RGW_AUTH_GRACE_MINS * 60 || + req_sec > now + RGW_AUTH_GRACE_MINS * 60) && !qsr) { RGW_LOG(10) << "req_sec=" << req_sec << " now=" << now << "; now - RGW_AUTH_GRACE_MINS=" << now - RGW_AUTH_GRACE_MINS * 60 << "; now + RGW_AUTH_GRACE_MINS=" << now + RGW_AUTH_GRACE_MINS * 60 << dendl; RGW_LOG(0) << "request time skew too big now=" << utime_t(now, 0) << " req_time=" << s->header_time << dendl; return -ERR_REQUEST_TIME_SKEWED;