List Info

Thread: Firefox requesting CherryPy page twice




Firefox requesting CherryPy page twice
user name
2006-04-21 14:21:50
Hi guys,

I have created my first CherryPy script which utalises the
Python
Imaging Library on Mandriva 2006 Official, and everything
works fine,
except that when Firefox requests a page (which returns a
jpg) it makes
a second request, which IE and Opera don't - as the images
take time to
generate this means that firefox takes about 45 seconds to
get the
image.

A snippit of code is
// im is an image that has been created by merging some
others together
and then cropping the edge off

                im.thumbnail((int(fWidth),iHeight),3)
                imstring =
im.tostring("jpeg","RGB")

cherrypy.response.headerMap['Content-Type']='image/jpeg'
               
cherrypy.response.headerMap['Content-Length']=
len(imstring)
                return imstring
// yield imstring does exactly the same

Are there any other headers or such like that need to be
sent to get
firefox to only download the image once?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )