http_connection.h revision 4fbb89a070c82e489830233bde6bc78ddf179978
d32fae803076bce020fb9cb595a383f78ea740ebkess/* ====================================================================
2772c0bad271d7a345ef7779dd318fa6098a6bfand * The Apache Software License, Version 1.1
2772c0bad271d7a345ef7779dd318fa6098a6bfand * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
2772c0bad271d7a345ef7779dd318fa6098a6bfand * reserved.
2772c0bad271d7a345ef7779dd318fa6098a6bfand * Redistribution and use in source and binary forms, with or without
2772c0bad271d7a345ef7779dd318fa6098a6bfand * modification, are permitted provided that the following conditions
2772c0bad271d7a345ef7779dd318fa6098a6bfand * are met:
2772c0bad271d7a345ef7779dd318fa6098a6bfand * 1. Redistributions of source code must retain the above copyright
2772c0bad271d7a345ef7779dd318fa6098a6bfand * notice, this list of conditions and the following disclaimer.
2772c0bad271d7a345ef7779dd318fa6098a6bfand * 2. Redistributions in binary form must reproduce the above copyright
2772c0bad271d7a345ef7779dd318fa6098a6bfand * notice, this list of conditions and the following disclaimer in
2772c0bad271d7a345ef7779dd318fa6098a6bfand * the documentation and/or other materials provided with the
2772c0bad271d7a345ef7779dd318fa6098a6bfand * distribution.
2772c0bad271d7a345ef7779dd318fa6098a6bfand * 3. The end-user documentation included with the redistribution,
2772c0bad271d7a345ef7779dd318fa6098a6bfand * if any, must include the following acknowledgment:
2772c0bad271d7a345ef7779dd318fa6098a6bfand * "This product includes software developed by the
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd * Apache Software Foundation (http://www.apache.org/)."
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd * Alternately, this acknowledgment may appear in the software itself,
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd * if and wherever such third-party acknowledgments normally appear.
43e2c3ca329ff3ca8cb7613d455ddb3794edf7adnd * 4. The names "Apache" and "Apache Software Foundation" must
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd * not be used to endorse or promote products derived from this
1cc20a8827ff6056399d64e3106b44d31e8e0e53nd * software without prior written permission. For written
1cc20a8827ff6056399d64e3106b44d31e8e0e53nd * permission, please contact apache@apache.org.
6abfd7bce937fd1dd27d29321a25b6056d9cb20dnd * 5. Products derived from this software may not be called "Apache",
2772c0bad271d7a345ef7779dd318fa6098a6bfand * nor may "Apache" appear in their name, without prior written
cc04b9186e16eb08609e37ceace74b45f14973ccnd * permission of the Apache Software Foundation.
2772c0bad271d7a345ef7779dd318fa6098a6bfand * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
52bc21ad2115333a8295c5f3e4f328d7431e6989nd * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
2772c0bad271d7a345ef7779dd318fa6098a6bfand * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2772c0bad271d7a345ef7779dd318fa6098a6bfand * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
2772c0bad271d7a345ef7779dd318fa6098a6bfand * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2772c0bad271d7a345ef7779dd318fa6098a6bfand * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2772c0bad271d7a345ef7779dd318fa6098a6bfand * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
2772c0bad271d7a345ef7779dd318fa6098a6bfand * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2772c0bad271d7a345ef7779dd318fa6098a6bfand * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2772c0bad271d7a345ef7779dd318fa6098a6bfand * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
2772c0bad271d7a345ef7779dd318fa6098a6bfand * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2772c0bad271d7a345ef7779dd318fa6098a6bfand * SUCH DAMAGE.
2772c0bad271d7a345ef7779dd318fa6098a6bfand * ====================================================================
2772c0bad271d7a345ef7779dd318fa6098a6bfand * This software consists of voluntary contributions made by many
2772c0bad271d7a345ef7779dd318fa6098a6bfand * individuals on behalf of the Apache Software Foundation. For more
2772c0bad271d7a345ef7779dd318fa6098a6bfand * information on the Apache Software Foundation, please see
2772c0bad271d7a345ef7779dd318fa6098a6bfandextern "C" {
2772c0bad271d7a345ef7779dd318fa6098a6bfand * @package Apache connection library
2772c0bad271d7a345ef7779dd318fa6098a6bfand * Create a new connection.
2772c0bad271d7a345ef7779dd318fa6098a6bfand * @param p Pool to allocate data structures out of
2772c0bad271d7a345ef7779dd318fa6098a6bfand * @param server The server to create the connection for
2772c0bad271d7a345ef7779dd318fa6098a6bfand * @param csd The socket to use for all communication with the client
2772c0bad271d7a345ef7779dd318fa6098a6bfand * @param id ID of this connection; unique at any point in time.
2772c0bad271d7a345ef7779dd318fa6098a6bfand * @param sbh Scoreboard handle
2772c0bad271d7a345ef7779dd318fa6098a6bfand * @return new conn_rec, or NULL if the connection has already been reset
2772c0bad271d7a345ef7779dd318fa6098a6bfandAP_CORE_DECLARE(conn_rec *)ap_new_connection(apr_pool_t *ptrans, server_rec *server,
2772c0bad271d7a345ef7779dd318fa6098a6bfand * This is the protocol module driver. This calls all of the
2772c0bad271d7a345ef7779dd318fa6098a6bfand * pre-connection and connection hooks for all protocol modules.
2772c0bad271d7a345ef7779dd318fa6098a6bfand * @param c The connection on which the request is read
2772c0bad271d7a345ef7779dd318fa6098a6bfand * @deffunc void ap_process_connection(conn_rec *)
2772c0bad271d7a345ef7779dd318fa6098a6bfandAP_CORE_DECLARE(void) ap_process_connection(conn_rec *, apr_socket_t *csd);
b05ab3ff5ab54aa22610b13d56eaba6ddfc3db60nd * This function is responsible for the following cases:
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd * we now proceed to read from the client until we get EOF, or until
1cc20a8827ff6056399d64e3106b44d31e8e0e53nd * MAX_SECS_TO_LINGER has passed. the reasons for doing this are
1cc20a8827ff6056399d64e3106b44d31e8e0e53nd * documented in a draft:
b95ae799514ad86a15610ad75808d7065e9847c9kess * http://www.ics.uci.edu/pub/ietf/http/draft-ietf-http-connection-00.txt
2772c0bad271d7a345ef7779dd318fa6098a6bfand * in a nutshell -- if we don't make this effort we risk causing
#ifdef __cplusplus