http_protocol.h revision 91f0d8da77152d24e4bbb31ce199282b3fd6e3b2
adea2e45fa61f1097aadc490a0aeaf4831b729ccChristian Maeder/* ====================================================================
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * The Apache Software License, Version 1.1
97018cf5fa25b494adffd7e9b4e87320dae6bf47Christian Maeder * Copyright (c) 2000 The Apache Software Foundation. All rights
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * Redistribution and use in source and binary forms, with or without
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * modification, are permitted provided that the following conditions
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * 1. Redistributions of source code must retain the above copyright
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * notice, this list of conditions and the following disclaimer.
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * 2. Redistributions in binary form must reproduce the above copyright
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * notice, this list of conditions and the following disclaimer in
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * the documentation and/or other materials provided with the
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * distribution.
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * 3. The end-user documentation included with the redistribution,
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * if any, must include the following acknowledgment:
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * "This product includes software developed by the
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * Apache Software Foundation (http://www.apache.org/)."
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * Alternately, this acknowledgment may appear in the software itself,
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * if and wherever such third-party acknowledgments normally appear.
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * 4. The names "Apache" and "Apache Software Foundation" must
adea2e45fa61f1097aadc490a0aeaf4831b729ccChristian Maeder * not be used to endorse or promote products derived from this
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * software without prior written permission. For written
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * permission, please contact apache@apache.org.
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * 5. Products derived from this software may not be called "Apache",
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * nor may "Apache" appear in their name, without prior written
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * permission of the Apache Software Foundation.
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * SUCH DAMAGE.
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * ====================================================================
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * This software consists of voluntary contributions made by many
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * individuals on behalf of the Apache Software Foundation. For more
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * information on the Apache Software Foundation, please see
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * Portions of this software are based upon public domain software
adea2e45fa61f1097aadc490a0aeaf4831b729ccChristian Maeder * originally written at the National Center for Supercomputing Applications,
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * University of Illinois, Urbana-Champaign.
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * @package HTTP protocol handling
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * Prototypes for routines which either talk directly back to the user,
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * or control the ones that eventually do.
adea2e45fa61f1097aadc490a0aeaf4831b729ccChristian Maeder * Read a request and fill in the fields.
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * @param c The current connection
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * @return The new request_rec
adea2e45fa61f1097aadc490a0aeaf4831b729ccChristian Maeder * Send a single HTTP header field
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian Maeder * @param r The current request
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * @param fieldname The Header field to send
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * @param fieldval The value of the header
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * @deffunc int ap_send_header_field(request_rec *r, const char *fieldname, const char *fieldval)
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till MossakowskiAPI_EXPORT_NONSTD(int) ap_send_header_field(request_rec *r, const char *fieldname,
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * Send the minimal part of an HTTP response header.
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * @param r The current request
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * @warning Modules should be very careful about using this, and should
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * prefer ap_send_http_header(). Much of the HTTP/1.1 implementation
adea2e45fa61f1097aadc490a0aeaf4831b729ccChristian Maeder * correctness depends on code in ap_send_http_header().
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * @deffunc void ap_basic_http_header(request_rec *r)
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till MossakowskiAPI_EXPORT(void) ap_basic_http_header(request_rec *r);
adea2e45fa61f1097aadc490a0aeaf4831b729ccChristian Maeder * Send the Status-Line and header fields for HTTP response
88ece6e49930670e8fd3ee79c89a2e918d2fbd0cChristian Maeder * @param l The current request
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * @deffunc void ap_send_http_header(request_rec *l)
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till MossakowskiAPI_EXPORT(void) ap_send_http_header(request_rec *l);
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski/* Send the response to special method requests */
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till MossakowskiAPI_EXPORT(int) ap_send_http_trace(request_rec *r);
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski/* Finish up stuff after a request */
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * Called at completion of sending the response. It sends the terminating
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * protocol information.
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * @param r The current request
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * @deffunc void ap_finalize_request_protocol(request_rec *r)
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till MossakowskiAPI_EXPORT(void) ap_finalize_request_protocol(request_rec *r);
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * Send error back to client.
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * @param r The current request
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski * @param recursive_error last arg indicates error status in case we get
* @deffunc apr_status_t ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t offset, apr_size_t length, apr_size_t *nbytes);
int mnum),
void *rec,
int mnum),
const char *method);
* (only use outside protocol.c is in getting them configured).
#ifdef __cplusplus