-
Notifications
You must be signed in to change notification settings - Fork 754
Cache header If-Modified-Since does not conform to RFC1123 #287
Copy link
Copy link
Closed
AndroidKotlinID/volley
#44Description
In BasicNetwork.java cache headers are automatically populated before a request is performed.
When required, the If-Modified-Since header is filled with the date of the last modification in the method getCacheHeaders.
The format used for the date, however, does not respect RFC1123 since it includes the name of the timezone (GMT) as well as the offset e.g.
Tue, 27 Aug 2019 07:36:17 GMT+00:00.
If we follow the RFC1123 grammar defined below:
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"
We see that the RFC1123 format does not support a timezone offset after the timezone designation. (rfc1123-date = wkday "," SP date1 SP time SP "GMT")
As such, volley should format the previously shown date as Tue, 27 Aug 2019 07:36:17 GMT without any offset after the GMT designation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels