Volley sends If-Modified-Since when the document does not have Last-Modified

I am using the Android Volley Networking library in a project.

When I add "if-None-Match" with etag to the header, I do not get 304, because Volley also adds "If-Modified-Since". The cached response did not have “Last-Modified” in the header.

Should Volley send "If-Modified-Since" if the cached request didn't have "Last-Modified"?

+3
source share
1 answer

tl; dr: no, I do not believe that Volley should send If-Modified-Sinceas part of its requests, at least not in the way it does now.

Longer answer:

Volley If-Modified-Since, Date .

, , , (.. Last-Modified).

, 200 Volley/Android:

Request 1
If-None-Match: "cd090c6cb990a25585f1748d85d764bd"
If-Modified-Since: Tue, 16 Dec 2014 14:21:13 GMT+00:00

Response 1
ETag: "cd090c6cb990a25585f1748d85d764bd"
Date: Tue, 16 Dec 2014 14:21:29 GMT

Request 2
If-None-Match: "cd090c6cb990a25585f1748d85d764bd"
If-Modified-Since: Tue, 16 Dec 2014 14:21:29 GMT+00:00

Response 2
ETag: "cd090c6cb990a25585f1748d85d764bd"
Date: Tue, 16 Dec 2014 14:23:31 GMT

Last-Modified, http- If-Modified-Since... Volley If-Modified-Since Date .

+4

All Articles