I'm not a HTTP guru here, so teach me if you can.
The google cache is not behaving as I expected. If I request a
resource with the 'current' etag, I expect a 304. But what I am
getting is a 200 (and occasionally a 304 when a google-cache miss).
So I am forced to manually check the etags to see a changed resource
(see code below).
response = urlfetch.fetch(url=url, headers={'If-None-
Match':stored_etag})
if rss.status_code == 304:
logging.info('Resource not modified, expected behaviour!')
return
if stored_etag == response.headers['etag']:
logging.info('Should have got 304?????!!!!!!!!!!'))
return
# process updated resource
I would expect even with a cache-hit, the response should be a 304.
Is this a bug of the urlfetch / google cache or is there a complex
HTTP rule that I am unaware of ? If so, what is the best way to
handle this issue. I feel manually checking etags is lame, and
against the grain of HTTP.
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.