You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Greg Stein <gs...@lyra.org> on 2000/06/03 23:41:41 UTC

layer classes (was: filtered I/O ordering)

On Sat, 3 Jun 2000, Life is hard, and then you die wrote:
>...
> However, having said that, I find both schemes equally usable, unless
> we can get into having filters tag themselves as to the type of filter
> they are (transport-encoding-filter and content-encoding-filter are
> two examples of what I'm thinking of, because mod_auth_digest needs
> to hook itself precisely between them). If there were such tagging,
> then the hooks stuff would allow folks to just specify, say, which
> content-encoding and which transport-encoding to use, and they would
> never have to worry about (and possibly get it wrong) where and if
> mod_auth_digest would need to hook itself in. Similarly,
> content-encoding filters could just specify that they must come after
> any content-munging filters and content-generators, and the hook
> ordering could take it from there.

Interesting thought here, in terms of classifying the filters:

1) content-generator                (files, CGI, database, etc)
2) content-filter/munger/processor  (SSI, PHP, etc)
3) content-encoding                 (gzip?)
4) digest/message processor?        (mod_auth_digest)
5) transport-encoding               (chunking, SSL)


Is SSL a different class from chunking? Anyone have better names for the
above?

Cheers,
-g

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


Re: layer classes (was: filtered I/O ordering)

Posted by "Life is hard, and then you die" <ro...@innovation.ch>.
On Sun, Jun 04, 2000 at 12:22:35PM -0400, Jeff Trawick wrote:
> > Date: Sun, 4 Jun 2000 08:45:05 -0400
> > From: Jeff Trawick <tr...@bellsouth.net>
> > 
> > > Date: Sat, 3 Jun 2000 14:41:41 -0700 (PDT)
> > > From: Greg Stein <gs...@lyra.org>
> > ...
> > > Interesting thought here, in terms of classifying the filters:
> > > 
> > > 1) content-generator                (files, CGI, database, etc)
> > > 2) content-filter/munger/processor  (SSI, PHP, etc)
> > > 3) content-encoding                 (gzip?)
> > > 4) digest/message processor?        (mod_auth_digest)
> > > 5) transport-encoding               (chunking, SSL)
> > 
> > Character set recoding of content* would need to come between your 
> > "content-filter/munger/processor" and "content-encoding".
> 
> Another aspect for completeness is the handling of input (e.g.,
> posted) content.  Some of these same filter types are important for
> input, and we wouldn't want to have one of the types, say chunking,
> implemented as a filter for output but built into buff.c for input.

Good point. Filter types 3,4, and 5 certainly need to be there (in
reverse order).


  Cheers,

  Ronald


Re: layer classes (was: filtered I/O ordering)

Posted by Jeff Trawick <tr...@bellsouth.net>.
> Date: Sun, 4 Jun 2000 08:45:05 -0400
> From: Jeff Trawick <tr...@bellsouth.net>
> 
> > Date: Sat, 3 Jun 2000 14:41:41 -0700 (PDT)
> > From: Greg Stein <gs...@lyra.org>
> ...
> > Interesting thought here, in terms of classifying the filters:
> > 
> > 1) content-generator                (files, CGI, database, etc)
> > 2) content-filter/munger/processor  (SSI, PHP, etc)
> > 3) content-encoding                 (gzip?)
> > 4) digest/message processor?        (mod_auth_digest)
> > 5) transport-encoding               (chunking, SSL)
> 
> Character set recoding of content* would need to come between your 
> "content-filter/munger/processor" and "content-encoding".

Another aspect for completeness is the handling of input (e.g.,
posted) content.  Some of these same filter types are important for
input, and we wouldn't want to have one of the types, say chunking,
implemented as a filter for output but built into buff.c for input.

-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Re: layer classes (was: filtered I/O ordering)

Posted by Jeff Trawick <tr...@bellsouth.net>.
> Date: Sat, 3 Jun 2000 14:41:41 -0700 (PDT)
> From: Greg Stein <gs...@lyra.org>
...
> Interesting thought here, in terms of classifying the filters:
> 
> 1) content-generator                (files, CGI, database, etc)
> 2) content-filter/munger/processor  (SSI, PHP, etc)
> 3) content-encoding                 (gzip?)
> 4) digest/message processor?        (mod_auth_digest)
> 5) transport-encoding               (chunking, SSL)

Character set recoding of content* would need to come between your 
"content-filter/munger/processor" and "content-encoding".

*I say "of content" because other character set recoding comes
elsewhere:

1) on an EBCDIC machine: recoding the printable-ascii length field which
   is part of the chunking format (currently this is special logic in
   the code that builds the length field, and is not part of the
   generic recoding support for BUFF operations)

2) on an EBCDIC machine: recoding headers into ASCII (currently this
   happens via the generic recoding support for BUFF operations)

(By the way...  I expect to put in more improvements/fixes to the BUFF
support for recoding.  Don't interpret this as a lack of interest in
the possibility of using a filter to do that :) )

-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Re: layer classes (was: filtered I/O ordering)

Posted by "Life is hard, and then you die" <ro...@innovation.ch>.
On Sat, Jun 03, 2000 at 02:41:41PM -0700, Greg Stein wrote:
> On Sat, 3 Jun 2000, Life is hard, and then you die wrote:
> >...
> > However, having said that, I find both schemes equally usable, unless
> > we can get into having filters tag themselves as to the type of filter
> > they are (transport-encoding-filter and content-encoding-filter are
> > two examples of what I'm thinking of, because mod_auth_digest needs
> > to hook itself precisely between them). If there were such tagging,
> > then the hooks stuff would allow folks to just specify, say, which
> > content-encoding and which transport-encoding to use, and they would
> > never have to worry about (and possibly get it wrong) where and if
> > mod_auth_digest would need to hook itself in. Similarly,
> > content-encoding filters could just specify that they must come after
> > any content-munging filters and content-generators, and the hook
> > ordering could take it from there.
> 
> Interesting thought here, in terms of classifying the filters:
> 
> 1) content-generator                (files, CGI, database, etc)
> 2) content-filter/munger/processor  (SSI, PHP, etc)
> 3) content-encoding                 (gzip?)
> 4) digest/message processor?        (mod_auth_digest)
> 5) transport-encoding               (chunking, SSL)
> 
> Is SSL a different class from chunking? Anyone have better names for the
> above?

Yes, SSL is a separate layer because it's not even part of http.
something like

6) socket-encoding		(SSL)

(Umm, ok, so I'm not great at coming up with names...).

Note that the ordering within a class must still be explicitly configured
(e.g. SSI and PHP may conveivably appear in any order, or you might even
have things like PHP-SSI-PHP, i.e. a filter appearing multiple times).


  Cheers,

  Ronald