Hello,

I want to serve a file from Pylons with just the headers:
content-type, content-length and expires=<some time in the distant
future>. What is the best way?
FileApp seems to add more headers than I want. Iv also tried the
following but somehow the response ends up with content-length=0 and
gains pragma and cache-control headers.

    def view(self, url, path='css', ext=''):
        response.headers.clear()
        response.headers['Expires'] = 'Thu, 15 Apr 2099 20:00:00 GMT'
        response.headers['Content-Type'] = 'text/css'
        response.headers['Content-Length'] = len(content)
        content = open(get_file(url)).read()
        return content

Thanks
Dunk

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en.

Reply via email to