[mod_python] [help]please give an input filter example ?

Gregory (Grisha) Trubetskoy grisha at modpython.org
Thu Sep 25 09:29:35 EST 2003

On Thu, 25 Sep 2003, camge wrote:

> Hi Grisha,
>     I have compiled the latest CVS version, and it works.
> But I found another problem here.
> >  postData = filter.read()
> >  modify(postData)
> >  filter.write(postData)
> If postData's length is not changed, everything is fine.
> Otherwise IE will hand there.
> I guess this is caused by HTTP header "Content-Length" .
> Because we changed the request body, but didn't update the header.

Most likely, but I don't think there is a way around that because the
header is sent before the body. Perhaps your filter can store something in
the request object to communicate to your handler that it needs to read
more data.


More information about the Mod_python mailing list