Comment 8 for bug 274815

Revision history for this message
Leonard Richardson (leonardr) wrote : Re: Cached binary files aren't retrieved from cache

This is annoying. I think I've duplicated the requests with the example web service. I made the lazr.restful file manager stop serving ETags and made it capable of checking If-Modified-Since to detect a conditional GET.

Now my lazr.restful client makes a
---
GET /1.0/cookbooks/Everyday%20Greens/cover

HTTP/1.0 303 See Other
Location: http://cookbooks.dev/1.0/filemanager/0
---
GET /1.0/filemanager/0
if-modified-since: 2009-04-28T08:15:45.495289

HTTP/1.0 304 Not Modified
---

But according to lazr.restful the response code is 200, and the buggy code is not triggered.

In fact, this is the behavior I'd expect. httplib2 retrieves the cached response and gives it to lazr.restful. Not only does it give lazr.restful the cached data, it gives the cached response code. As far as lazr.restful is concerned, the request went through and the response code was 200 and here's the data. It doesn't have to handle the 304.

But for some reason, the behavior on the real Launchpad site is different. I'm trying to figure out the difference now.