You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-dev@quetz.apache.org by Rob Miller <ro...@openplans.org> on 2006/07/20 04:16:36 UTC

filter "chunks"

i hope this is the right forum for mod_python newbie questions; it's the only 
list i could find.

anyway, i'm using mod_python 3.1.4, with apache 2.0.55, both from ubuntu 
packages.  i'm trying to get apache to proxy (via RewriteRule) some content 
that is served from another server, and then to apply a mod_python-based 
filter (via SetOutputFilter) before serving up the content.  it's working, 
sort of; the content is coming out of the other server and is being passed in 
to my output filter.  problem is, filter.read() is not returning the entire 
page, but instead only about the first third of it (7745 characters, to be 
precise... ;-).

i turned on PythonEnablePdb, and realized that the filter is actually being 
invoked 3 times during the request, and each time the 'filter' object has the 
next chunk of the page.  the content that's coming back is an XML document 
that i want to parse, so i need the whole thing before my filter will work at all.

i'm an experienced python developer but this is my first foray into apache 
innards.  is there a setting to tweak that will get the entire page to be made 
available to the filter on its first invocation?  is this a general apache 
filter issue, or is it mod_python specific?  i've done some searching through 
apache filtering docs and some google searches, but haven't found anything 
pertinent.  can anyone point me in the right direction?

thanks,

-r