Project

General

Profile

Actions

Bug #19965

open

RGW handling of combined If-None-Match and If-Modified-Since request is not RFC compliant

Added by Sylvain Munaut almost 7 years ago. Updated almost 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

If you look at the rfc2616 (section 14.26), my interpretation is that is that the result should be as follow :

If-None-Match   If-modified-since       RV
----------------------------------------------
Not Present     Not present             200
Not Present     Same or older           304
Not Present     Newer                   200
No Match        Not present             200
No Match        Same or older           200     <---
No Match        Newer                   200
Match           Not present             304
Match           Same or older           304
Match           Newer                   200     <---

The two highlighted case seem incorrect to me when reading the code ( src/rgw/rgw_rados.cc around line 9297 ) the two headers are processed completely independently and so the 'weird' interactions between the two are not properly accounted for.

Specifically the RFC says :

   If any of the entity tags match the entity tag of the entity that
   would have been returned in the response to a similar GET request
   (without the If-None-Match header) on that resource, or if "*" is
   given and any current entity exists for that resource, then the
   server MUST NOT perform the requested method, unless required to do
   so because the resource's modification date fails to match that
   supplied in an If-Modified-Since header field in the request.

and

   If none of the entity tags match, then the server MAY perform the
   requested method as if the If-None-Match header field did not exist,
   but MUST also ignore any If-Modified-Since header field(s) in the
   request. That is, if no entity tags match, then the server MUST NOT
   return a 304 (Not Modified) response.
Actions #1

Updated by Greg Farnum almost 7 years ago

  • Project changed from Ceph to rgw
  • Category deleted (22)
Actions

Also available in: Atom PDF