httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgaudet-list-new-ht...@arctic.org>
Subject Re: cvs commit: apache-2.0/htdocs/manual/developer layeredio.html index.html
Date Tue, 28 Mar 2000 00:36:14 GMT


On Sun, 26 Mar 2000, Ralf S. Engelschall wrote:

> 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.

hey ralf, how else do you handle the case of mod_cgi -- the core or
nothing else knows until after mod_cgi has exec'd the subprocess and
received the header back saying "Content-Type: text/x-parsed-html" that
you need to stack another handler in there.

> (and not have to hope that the previous handler were friendly enough and
> allow it).

how is this any different than the current situation where a handler has
to hope that another handler for the same content-type hasn't already run
and returned OK?

this is a trivial extension to the existing API.

> 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.).

exactly -- just as the current API requires every handler to return
DECLINED unless they served the final response.

> 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.

this is impossible without changing all the handlers so that they work in
an asynchronous manner -- with callbacks or message passing.

Dean


Mime
View raw message