HTTP If-Modified-Since with milliseconds -
let's object rest web service , object has time stamp. time stamp has milliseconds component. next time request same object don't want returned unless has changed, use if-modified-since header. date in header not supposed have milliseconds. if round time stamp down, i'll object if it's modified. if round risk missing updates. if-modified-since header useless me in case, or missing something?
a service sends time stamp milliseconds not http-compliant. last-modified
must sent http-date §3.3.1 specifies clearly:
http-date = rfc1123-date | rfc850-date | asctime-date rfc1123-date = wkday "," sp date1 sp time sp "gmt" rfc850-date = weekday "," sp date2 sp time sp "gmt" asctime-date = wkday sp date3 sp time sp 4digit date1 = 2digit sp month sp 4digit ; day month year (e.g., 02 jun 1982) date2 = 2digit "-" month "-" 2digit ; day-month-year (e.g., 02-jun-82) date3 = month sp ( 2digit | ( sp 1digit )) ; month day (e.g., jun 2) time = 2digit ":" 2digit ":" 2digit ; 00:00:00 - 23:59:59 wkday = "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun" weekday = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday" month = "jan" | "feb" | "mar" | "apr" | "may" | "jun" | "jul" | "aug" | "sep" | "oct" | "nov" | "dec"
file bug service using. invalid send last-modified
or if-modified-since
milliseconds.
if sub-second accuracy important, may more appropriate use entity tags (etag
).
Comments
Post a Comment