You can move them to separate folder and write a special controller
method that will set the header and output the requested file. Do
something like this.

web.header("Content-Encoding", "gzip")
web.header("Content-Type", "text/html")
return open(filename,"rb").read()


On Sep 18, 10:18 pm, alexander lind <[email protected]> wrote:
> Hi
>
> I have a need to serve a couple of gzipped files out of my /static/  
> directory, and I want the browser to decompress and render in the  
> browser, not trigger a save-file dialog.
> When serving with lighttpd, I do this by adding these headers to any  
> url that ends in .gz:
>   "Content-Encoding" => "gzip", "Content-Type" => "text/html"
>
> Does anyone know how I can get web.py / cherrypy to do the same?
>
> Alec
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to