I am using gzipper middleware and recursive includer. My wsgi application serves up xslt and xml files to recent browsers, but for older browsers it does the xslt conversion on the server using lxml.
I have some large xml files that I want to gzip, so I've added filter-with=gzip as appropriate to various app sections in my deploy .ini file The problem I have is that when doing server-side xslt transform, includer ends up returning gzip'd contents to lxml, leading to failure. I think gzipper should not gzip when returning data as part of an 'included' request (but I guess it should gzip forwarded requests). I imagine there will be other middleware components that might need to be tweaked in various ways to work correctly when being called via includer. On the other hand, I do create a new environ to be used by Include so I could adjust HTTP_ACCEPT_ENCODING with that. But as I look at recursive.py I'm thinking that maybe Recursive.__call__ should also accept a list of keys to delete from the original environ, or be able to accept a completely new environ.. Currently __call__ only accepts a dict (extra_environ) to be merged into the environ used during Include processing. Though maybe passing in a completely new environ might break recursion checking. What's the best way to go here? Change gzipper and other filtering middleware to detect when it's being called by Includer, or add a delete_keys parameter to Recursive.__call__ or just rely on extra_environ to set certain environ variables to the empty string? -- Brad Clements, [EMAIL PROTECTED] (315)268-1000 http://www.murkworks.com AOL-IM: BKClements _______________________________________________ Paste-users mailing list [email protected] http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users
