]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: don't check for time skew when Expires was set
authorYehuda Sadeh <yehuda@hq.newdream.net>
Mon, 29 Aug 2011 17:57:19 +0000 (10:57 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Mon, 29 Aug 2011 17:58:28 +0000 (10:58 -0700)
src/rgw/rgw_rest_s3.cc

index 6ff974b5c318aec5adc12815d2c1a60709b6f6fb..e74e7b3ccee203c9362499874f138b45004523e3 100644 (file)
@@ -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;