jvandal / modwsgi

Automatically exported from code.google.com/p/modwsgi
0 stars 0 forks source link

Allow WSGI application to dynamically add input/output filters. #181

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In mod_python it was possible to dynamically add input or output filters 
through which bucket 
brigade should be processed. For output filters at least, this has been 
requested for mod_wsgi as 
well. This would allow for example a web application to dynamically add the 
Apache DEFLATE 
output filter for compressing response content.

Addition of filters could be achieved in a number of ways. One could use a 
response 
header such as X-Add-Output-Filter, or as an option to a Script-Control 
response header. A 
further  option is to have a function callback passed in WSGI environment 
dictionary labelled 
something like  'mod_wsgi.add_output_filter'. Although response headers works 
okay for output 
filters as they are processed before output content, they wouldn't work where 
want to dynamically 
add an input filter.

Original issue reported on code.google.com by Graham.Dumpleton@gmail.com on 4 Mar 2010 at 11:00

GoogleCodeExporter commented 8 years ago

Original comment by Graham.Dumpleton@gmail.com on 4 Mar 2010 at 11:00

GoogleCodeExporter commented 8 years ago
My current thinking on this is that I shouldn't add this to mod_wsgi as a 
builtin feature.

It may be better to just provide an ability in mod_wsgi to write input/output 
filters in Python code, like 
mod_python did, but do it somewhat better than the problematic way that 
mod_python did it.

This could help with the above issue because you could write a special 
input/output filter which would allow you 
to push alternate existing C based input/output filters on to the filter stacks.

Original comment by Graham.Dumpleton@gmail.com on 10 Mar 2010 at 10:17

GoogleCodeExporter commented 8 years ago
Closing. Create again if concrete need ever arises.

Original comment by Graham.Dumpleton@gmail.com on 30 Nov 2014 at 3:52