From: VRan Liu Date: Wed, 15 Oct 2014 08:29:50 +0000 (+0800) Subject: rgw: correct "If-Modified-Since" handle. X-Git-Tag: v0.89~30^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=107cb0dd00184f1807c2272b22cc8cbe6702bf6e;p=ceph.git rgw: correct "If-Modified-Since" handle. Normally client will use `Last-Modified` of server returned, as the value of `If-Modified-Since`. So the `ctime` is exactly equal to `*mod_ptr`, and rgw should return `Not Modified`, otherwise the cache will never worked. Signed-off-by: VRan Liu --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 1d05509d6c8b..ee774f69f7b6 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -4295,7 +4295,7 @@ int RGWRados::prepare_get_obj(void *ctx, rgw_obj& obj, if (mod_ptr) { ldout(cct, 10) << "If-Modified-Since: " << *mod_ptr << " Last-Modified: " << ctime << dendl; - if (ctime < *mod_ptr) { + if (ctime <= *mod_ptr) { r = -ERR_NOT_MODIFIED; goto done_err; }