> Yup, I didn't read #686 carefully before posting here :o)
>
> I filed another ticket yesterday, #879 - setting the milestone now.
>
> Until then, if anyone else is having problems with this, a workaround
> is to remove the 'If-Modified-Since' header from the request before
> calling serveFile:
>
> if 'If-Modified-Since' in cherrypy.request.headers:
>     del cherrypy.request.headers['If-Modified-Since']
> return serveFile(thumbpath, 'image/jpeg')
>
> This makes CherryPy return a generator that reads the file every time.
>

That is really ugly and makes serveFile almost pointless I'm afraid.

The point of the If-Modified-Since header is for the UA to check if the
requested resource has been modified since its last retrieval.

That avoids wasting bandwith and using your server for processing each
time the same resource over and over.

Your workaround is therefore a bad one.

- Sylvain


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to