Closed Bug 735039 Opened 12 years ago Closed 12 years ago

Clarify spec re: behaviour for malformed X-If-[Un]Modified-Since headers

Categories

(Cloud Services Graveyard :: Server: Sync, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rfkelly, Assigned: rfkelly)

References

Details

(Whiteboard: [qa?])

Attachments

(1 file)

storage-syncserver currently returns an error if the X-If-Modified-Since field it not an integer.  This diverges from the spec for If-Modified-Since, where invalid value cause the header to be ignored.  We should have X-If-Modified-Sinc behave the same way.
Since this is our own invented header, we have the right to make our own rules. While I like consistency with similar headers, I also like failing fast and rejecting misbehaving clients. We aren't dealing with user-generated data here, so I'm not sure if the "be lenient in what you accept" rule applies.

Just a consideration.
Agree with Greg. We should explicitly call out this error in the spec and not be ignoring problems here.
I was prepared to argue for consistency in the If-Modified-Since case, but I kept reading rfc2616 and realized that If-Unmodified-Since is *also* supposed to be ignored if invalid.  That is Really Bad.  So I agree, let's force good client behavior and tighten it up in the spec instead.  Bug title changed accordingly.
Summary: Don't error out on invalid X-If-Modified-Since → Clarify spec re: behaviour for malformed X-If-[Un]Modified-Since headers
So, what 400-Bad-Request error code should we return in this case?  We don't seem to have any generic ones.
Attachment #605244 - Flags: feedback?(gps)
Whiteboard: [qa?]
Comment on attachment 605244 [details] [diff] [review]
patch clarifying behaviour for malformed xims header

Review of attachment 605244 [details] [diff] [review]:
-----------------------------------------------------------------

Let's add a new code: Malformed header value.
Attachment #605244 - Flags: feedback?(gps) → feedback+
Blocks: 720964
Depends on: 784592
This is now handled with cornice-format errors, see Bug Bug 812432 and Bug 784592.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Cloud Services → Cloud Services Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: