httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: cvs commit: apache-2.0/htdocs/manual/developer layeredio.html index.html
Date Sun, 26 Mar 2000 16:11:30 GMT
> Hmm... if I've perhaps still not understood the stuff correctly, please
> complain. But you assume that the decision for using layered I/O is done
> by the handlers which come first (for output handlers), i.e. they have
> to know or guess that there will be handlers which want to act on their
> stuff later. I think this logic is unreasonable and is in the wrong

You've got the right idea, but you haven't thought it through far enough,

> handlers. In practice your approach seems to lead to handlers which
> _always_ return RERUN_HANDLERS to make sure others get a chance (think
> perhaps about a compression or encryption layer - it would require that
> all handlers are friendly in order to work for both static pages, CGI,
> etc.).

Yes, MOST modules will return RERUN_HANDLERS, because they won't be able
to write things out to the network.  That job is pretty much reserved for
default handlers.  By default handlers, I don't mean the default_handler
function in http_core.c, but any handler that handles */* and writes to
the network.  This is how SSL would be implemented, which should remove
some core changes.

> So I think, the more reasonable approach would be that every handler
> just uses the BUFF as it would directly writing to it. And if some other
> handler wants to filter this stuff, this fact is _internally_ handled
> by the BUFF code and doesn't require any changes to the handlers. Or
> in short: a handler should not have to know whether its output is
> post-processed or pre-processed or not touched at all.

If you would like to code that change, go ahead.  I was trying to keep
backwards compatability with the current handlers stuff.  The fact is,
modules currently only know one thing right now.  They aren't sending
their data to the network.  Beyond that, modules haven't got a clue about
whether some other module generated the content, or whether some other
module will be mucking with the data later.

I will be adding in the future the ability to Set multiple handlers in the
config file, but that is a second step.


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

View raw message