httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@apache.org
Subject cvs commit: httpd-2.0/modules/http mod_core.h http_core.c http_protocol.c http_request.c
Date Wed, 24 Jan 2001 02:14:24 GMT
gstein      01/01/23 18:14:24

  Modified:    include  http_protocol.h
               modules/http http_core.c http_protocol.c http_request.c
  Added:       modules/http mod_core.h
  Log:
  Begin mod_core.h for CORE-private information. Ideally, AP_CORE_DECLARE
  function decl's and CORE_PRIVATE header info should all move into this
  header.
  
  Start with moving the filter function declarations.
  
  Revision  Changes    Path
  1.46      +0 -11     httpd-2.0/include/http_protocol.h
  
  Index: http_protocol.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/http_protocol.h,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -u -r1.45 -r1.46
  --- http_protocol.h	2001/01/24 01:30:59	1.45
  +++ http_protocol.h	2001/01/24 02:14:23	1.46
  @@ -62,8 +62,6 @@
   #include "apr_hooks.h"
   #include "apr_portable.h"
   #include "apr_mmap.h"
  -#include "util_filter.h"
  -#include "apr_buckets.h"
   
   #ifdef __cplusplus
   extern "C" {
  @@ -103,12 +101,6 @@
    */
   AP_DECLARE(void) ap_send_http_header(request_rec *l);
   
  -AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(ap_filter_t *f, apr_bucket_brigade
*b);
  -AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f, apr_bucket_brigade
*b);
  -AP_CORE_DECLARE_NONSTD(apr_status_t) ap_content_length_filter(ap_filter_t *, 
  -                                                              apr_bucket_brigade *);
  -AP_CORE_DECLARE_NONSTD(apr_status_t) ap_old_write_filter(ap_filter_t *f, apr_bucket_brigade
*b);
  -
   /* Send the response to special method requests */
   
   AP_DECLARE(int) ap_send_http_trace(request_rec *r);
  @@ -518,9 +510,6 @@
    * @deffunc const char *ap_method_name_of(int methnum)
    */
   AP_DECLARE(const char *) ap_method_name_of(int methnum);
  -
  -apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b, ap_input_mode_t mode);
  -apr_status_t ap_dechunk_filter(ap_filter_t *f, apr_bucket_brigade *b, ap_input_mode_t mode);
   
   
     /* Hooks */
  
  
  
  1.246     +7 -6      httpd-2.0/modules/http/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/http_core.c,v
  retrieving revision 1.245
  retrieving revision 1.246
  diff -u -u -r1.245 -r1.246
  --- http_core.c	2001/01/24 01:38:31	1.245
  +++ http_core.c	2001/01/24 02:14:23	1.246
  @@ -62,9 +62,10 @@
   #include "apr_fnmatch.h"
   #include "apr_thread_proc.h"    /* for RLIMIT stuff */
   
  -#if APR_HAVE_SYS_UIO_H
  -#include <sys/uio.h>            /* for iovec */
  -#endif
  +#define APR_WANT_IOVEC
  +#define APR_WANT_STRFUNC
  +#define APR_WANT_MEMFUNC
  +#include "apr_want.h"
   
   #define CORE_PRIVATE
   #include "ap_config.h"
  @@ -84,15 +85,15 @@
   #include "util_ebcdic.h"
   #include "mpm.h"
   
  +#include "mod_core.h"
  +
   #ifdef HAVE_SYS_SOCKET_H
   #include <sys/socket.h>
   #endif
   #ifdef HAVE_ARPA_INET_H
   #include <arpa/inet.h>
   #endif
  -#ifdef HAVE_STRINGS_H
  -#include <strings.h>
  -#endif
  +
   
   /* LimitXMLRequestBody handling */
   #define AP_LIMIT_UNSET                  ((long) -1)
  
  
  
  1.274     +9 -7      httpd-2.0/modules/http/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v
  retrieving revision 1.273
  retrieving revision 1.274
  diff -u -u -r1.273 -r1.274
  --- http_protocol.c	2001/01/24 01:42:41	1.273
  +++ http_protocol.c	2001/01/24 02:14:23	1.274
  @@ -65,16 +65,18 @@
   
   #include "apr.h"
   #include "apr_strings.h"
  +#include "apr_buckets.h"
   
  -#if APR_HAVE_STDIO_H
  -#include <stdio.h>              /* for EOF, sscanf() */
  -#endif
  +#define APR_WANT_STDIO          /* for sscanf */
  +#define APR_WANT_STRFUNC
  +#define APR_WANT_MEMFUNC
  +#include "apr_want.h"
  +
   #if APR_HAVE_STDARG_H
   #include <stdarg.h>
   #endif
   
   #define CORE_PRIVATE
  -#include "apr_buckets.h"
   #include "util_filter.h"
   #include "ap_config.h"
   #include "httpd.h"
  @@ -91,12 +93,12 @@
   #include "util_ebcdic.h"
   #include "mpm_status.h"
   
  +#include "mod_core.h"
  +
   #ifdef HAVE_UNISTD_H
   #include <unistd.h>
  -#endif
  -#ifdef HAVE_STRINGS_H
  -#include <strings.h>
   #endif
  +
   
   APR_HOOK_STRUCT(
   	    APR_HOOK_LINK(post_read_request)
  
  
  
  1.77      +22 -7     httpd-2.0/modules/http/http_request.c
  
  Index: http_request.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/http_request.c,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -u -r1.76 -r1.77
  --- http_request.c	2001/01/20 21:42:18	1.76
  +++ http_request.c	2001/01/24 02:14:23	1.77
  @@ -66,6 +66,10 @@
    *
    */
   
  +#include "apr_strings.h"
  +#include "apr_file_io.h"
  +#include "apr_fnmatch.h"
  +
   #define CORE_PRIVATE
   #include "ap_config.h"
   #include "httpd.h"
  @@ -77,9 +81,9 @@
   #include "http_main.h"
   #include "util_filter.h"
   #include "util_charset.h"
  -#include "apr_strings.h"
  -#include "apr_file_io.h"
  -#include "apr_fnmatch.h"
  +
  +#include "mod_core.h"
  +
   #ifdef APR_HAVE_STDARG_H
   #include <stdarg.h>
   #endif
  @@ -1358,15 +1362,26 @@
   
   static void check_pipeline_flush(request_rec *r)
   {
  +    /* ### if would be nice if we could PEEK without a brigade. that would
  +       ### allow us to defer creation of the brigade to when we actually
  +       ### need to send a FLUSH. */
       apr_bucket_brigade *bb = apr_brigade_create(r->pool);
  +
  +    /* Flush the filter contents if:
  +     *
  +     *   1) the connection will be closed
  +     *   2) there isn't a request ready to be read
  +     */
  +    /* ### shouldn't this read from the connection input filters? */
       if (!r->connection->keepalive || 
           ap_get_brigade(r->input_filters, bb, AP_MODE_PEEK) != APR_SUCCESS) {
           apr_bucket *e = apr_bucket_create_flush();
   
  -        /* We just send directly to the connection based filters, because at
  -         * this point, we know that we have seen all of the data, so we just
  -         * want to flush the buckets if something hasn't been sent to the
  -         * network yet.
  +        /* We just send directly to the connection based filters.  At
  +         * this point, we know that we have seen all of the data
  +         * (request finalization sent an EOS bucket, which empties all
  +         * of the request filters). We just want to flush the buckets
  +         * if something hasn't been sent to the network yet.
            */
           APR_BRIGADE_INSERT_HEAD(bb, e);
           ap_pass_brigade(r->connection->output_filters, bb);
  
  
  
  1.1                  httpd-2.0/modules/http/mod_core.h
  
  Index: mod_core.h
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2000 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  #ifndef MOD_CORE_H
  #define MOD_CORE_H
  
  #include "apr.h"
  #include "apr_buckets.h"
  
  #include "httpd.h"
  #include "util_filter.h"
  
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
  /**
   * @package mod_core private header file
   */
  
  /*
   * These (output) filters are internal to the mod_core operation.
   */
  AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(ap_filter_t *f, apr_bucket_brigade
*b);
  AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f, apr_bucket_brigade
*b);
  AP_CORE_DECLARE_NONSTD(apr_status_t) ap_content_length_filter(ap_filter_t *, 
                                                                apr_bucket_brigade *);
  AP_CORE_DECLARE_NONSTD(apr_status_t) ap_old_write_filter(ap_filter_t *f, apr_bucket_brigade
*b);
  
  /*
   * These (input) filters are internal to the mod_core operation.
   */
  apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b, ap_input_mode_t mode);
  apr_status_t ap_dechunk_filter(ap_filter_t *f, apr_bucket_brigade *b, ap_input_mode_t mode);
  
  #ifdef __cplusplus
  }
  #endif
  
  #endif	/* !MOD_CORE_H */
  
  
  

Mime
View raw message