httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <>
Subject Re: Mod_include design
Date Thu, 02 Nov 2000 19:48:14 GMT
Greg Stein <> writes:

> It will be *incredibly* easier to parse a directive if we can turn it into a
> contiguous string. Consider that we are going to have to do some level of
> copying to deal with the tag [for a strcmp], and then copy each argument
> into a new buffer, etc. The nature of this stuff is simply that we will
> eventually copy an entire directive anyhow, so let's just do it up front and
> simplify the parsing step.

> If our goal is to rebuild mod_include into a *clean* and *maintainable*
> module, then this will be quite handy. The parsing step will be clear and
> quite servicable.


> 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 don't see anything in 1.3 indicating that it is *theoretically*
bounded to a relatively small number...  For example, consider the cmd
attribute on exec.  (How long can a command-line be?  way long...)

*Practically* a human isn't going to deal with long (>2048-byte)
directives (though machine-generated directives have no such distaste).

Overall I think collecting directive bytes into a buffer as we parse is
the way to go...

Jeff Trawick | | PGP public key at web site:
          Born in Roswell... married an alien...

View raw message