httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: Mod_include design
Date Thu, 02 Nov 2000 20:52:15 GMT
On Thu, Nov 02, 2000 at 03:46:17PM -0500, Bill Stoddard wrote:
> > > 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...
> 
> The uri in "include virtual=uri" constructed dynamically (for example via a
> CGI) could be a quite large.  I see no reason we shouldn't impose (and
> enforce) a reasonably large upper limit on tag length.

Well, it isn't hard to allocate a directive buffer of, say, 500 bytes. If
the user gives us a pathological case, then we simply grow the buffer. No
big deal. 99% of the time, we follow the fast-path with the 500 byte buffer
for the directive (tag+args+whatever)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message