httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Mod_include design
Date Thu, 02 Nov 2000 20:44:15 GMT
On 2 Nov 2000, Jeff Trawick wrote:

> writes:
> > > But: it definitely depends on how bounded the size of a directive can be. I
> > > mean, can a directive be 10k long? If it is bounded, say, to MAX_PATH + 200,
> > > then we just put that buffer into the ctx and run with it.
> > 
> > I wouldn't personally put it into the ctx, because this will all be done
> > in a single call to the filter, 
> but we aren't guaranteed that the entire tag is in the same
> brigade...  isn't your reasoning for not putting it in the ctx based
> on a tag not crossing brigade boundaries?

Please read my previous messages again.  I do garauntee that by the time
we are parsing the actual tag, it is in a single brigade.  What I am
saying, is that we absolutely can not actually process the SSI tag until
we have all of it, so if we already have the full tag, then we don't need
the ctx field.

Greg's comment that we might as well copy as we find the tag, I don't
agree with either.  Picture a brigade that looks like:

"<" -> "!" -> "-" -> "foobar"

This is an invalid tag.  If we copy as we find things, then we will copy
things into the buffer that isn't really a tag, and if we use the presence
of data in the buffer to siginify a tag, then we have a problem.

If we copy the tag once we have found the full tag, then we can actually
allocate a buffer of the correct size for the tag that we have.


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

View raw message