httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: summary: issues for my filtering patch
Date Wed, 28 Jun 2000 14:47:28 GMT

I will tell you right now exactly what is required for me to remove my -1.  

The challenge:

Write a filter that needs to set a header based on information found
in the data passed to the filter.  This data can be ANYWHERE in the
response, and that must be taken into account.

What I think will happen:

Your module will have to cache all of the data in the response so that it
can be sure to change the headers before the first block of data is
written to the network.

The other option, is that the filter will end up writing huge blocks of
code to malloc/free memory and will in the end actually have the
beginnings of the bucket brigades patch.

I also think that because it is possible/likely that the thing that makes
you change the header could come in the last block of data.  This means
your filter is caching all of the data for the response.


Warning:  I am not a PHP programmer, but I am using one of your examples
from earlier.  

PHP allows a programmer to add a cookie to the request.  If that AddCookie
function is the last line in the program, then PHP will have to cache all
of the data to ensure that it is set before the data is sent.  Because PHP
has no way of knowing if this will happen or not, PHP will always have to
cache the data.

If you put a second module in line that has the same restriction, you will
make two copies of the data, and neither will be freed until the request
is finished.

Ending Comments:

If I am correct, then this patch does not solve the problems, and can not
be committed.  If I am incorrect, then I look forward to being proven
wrong and I will happily remove my veto.

I look forward to the code.


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message