httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: httpd-2.0/server core.c
Date Mon, 19 Nov 2001 22:36:20 GMT
dougm       01/11/19 14:36:20

  Modified:    include  util_filter.h
               server   core.c
  Log:
  add new input filter mode AP_MODE_INIT:
  allows filters such as mod_ssl to initialize a client connection
  (ie handshake) before reading request data from the client.
  Submitted by:   dougm
  Reviewed by:	wrowe
  
  Revision  Changes    Path
  1.61      +6 -1      httpd-2.0/include/util_filter.h
  
  Index: util_filter.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/util_filter.h,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- util_filter.h	2001/10/08 16:44:04	1.60
  +++ util_filter.h	2001/11/19 22:36:20	1.61
  @@ -97,7 +97,12 @@
        *  ::APR_EOF otherwise.  The filter must not return any buckets of
        *  data.  Data returned on a subsequent call, when mode is
        *  ::AP_MODE_BLOCKING or ::AP_MODE_NONBLOCKING. */
  -    AP_MODE_PEEK
  +    AP_MODE_PEEK,
  +    /*
  +     * the filter should initialize the connection if needed,
  +     * NNTP or FTP over SSL for example.
  +     */
  +    AP_MODE_INIT
   } ap_input_mode_t;
   
   /**
  
  
  
  1.100     +14 -0     httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.99
  retrieving revision 1.100
  diff -u -r1.99 -r1.100
  --- core.c	2001/11/18 02:57:12	1.99
  +++ core.c	2001/11/19 22:36:20	1.100
  @@ -2790,6 +2790,20 @@
       apr_size_t len;
       int keptalive = f->c->keepalive == 1;
   
  +    if (mode == AP_MODE_INIT) {
  +        /*
  +         * this mode is for filters that might need to 'initialize'
  +         * a connection before reading request data from a client.
  +         * NNTP over SSL for example needs to handshake before the 
  +         * server sends the welcome message.
  +         * such filters would have changed the mode before this point
  +         * is reached.  however, protocol modules such as NNTP should
  +         * not need to know anything about SSL.  given the example, if
  +         * SSL is not in the filter chain, AP_MODE_INIT is a noop.
  +         */
  +        return APR_SUCCESS;
  +    }
  +
       if (!ctx)
       {
           ctx = apr_pcalloc(f->c->pool, sizeof(*ctx));
  
  
  

Mime
View raw message