http_core.h revision f062ed7bd262a37a909dd77ce5fc23b446818823
5255N/A/* ==================================================================== 5255N/A * The Apache Software License, Version 1.1 5255N/A * Copyright (c) 2000 The Apache Software Foundation. All rights 5255N/A * Redistribution and use in source and binary forms, with or without 5255N/A * modification, are permitted provided that the following conditions 5255N/A * 1. Redistributions of source code must retain the above copyright 5255N/A * notice, this list of conditions and the following disclaimer. 5255N/A * 2. Redistributions in binary form must reproduce the above copyright 5255N/A * notice, this list of conditions and the following disclaimer in 5255N/A * the documentation and/or other materials provided with the 5255N/A * 3. The end-user documentation included with the redistribution, 5255N/A * if any, must include the following acknowledgment: 5255N/A * "This product includes software developed by the 5255N/A * Alternately, this acknowledgment may appear in the software itself, 5255N/A * if and wherever such third-party acknowledgments normally appear. 5255N/A * 4. The names "Apache" and "Apache Software Foundation" must 5255N/A * not be used to endorse or promote products derived from this 5255N/A * software without prior written permission. For written 5255N/A * permission, please contact apache@apache.org. 5255N/A * 5. Products derived from this software may not be called "Apache", 5255N/A * nor may "Apache" appear in their name, without prior written 5255N/A * permission of the Apache Software Foundation. 5255N/A * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 5255N/A * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 5255N/A * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 5255N/A * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR 5255N/A * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 5255N/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 5255N/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 5255N/A * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 5255N/A * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 5255N/A * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 5255N/A * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 5255N/A * ==================================================================== 5255N/A * This software consists of voluntary contributions made by many 5255N/A * individuals on behalf of the Apache Software Foundation. For more 5255N/A * information on the Apache Software Foundation, please see 5255N/A * Portions of this software are based upon public domain software 5255N/A * originally written at the National Center for Supercomputing Applications, 5255N/A * University of Illinois, Urbana-Champaign. /***************************************************************** * The most basic server code is encapsulated in a single module * known as the core, which is just *barely* functional enough to * serve documents, though not terribly well. * Largely for NCSA back-compatibility reasons, the core needs to * make pieces of its config structures available to other modules. * The accessors are declared here, along with the interpretation * of one of them (allow_options). /* options for get_remote_host() */ /* REMOTE_HOST returns the hostname, or NULL if the hostname * lookup fails. It will force a DNS lookup according to the * HostnameLookups setting. /* REMOTE_NAME returns the hostname, or the dotted quad if the * hostname lookup fails. It will force a DNS lookup according * to the HostnameLookups setting. /* REMOTE_NOLOOKUP is like REMOTE_NAME except that a DNS lookup is /* REMOTE_DOUBLE_REV will always force a DNS lookup, and also force * a double reverse lookup, regardless of the HostnameLookups * setting. The result is the (double reverse checked) hostname, * or NULL if any of the lookups fail. * through a Userdir, or something like * that, it'll screw you. But it's /* Used for constructing self-referencing URLs, and things like SERVER_PORT, /* Authentication stuff. This is one of the places where compatibility * with the old config files *really* hurts; they don't discriminate at * all between different authentication schemes, meaning that we need * to maintain common state for all of them in the core, and make it * available to the other modules through interfaces. * CGI Script stuff for Win32... * Core is also unlike other modules in being implemented in more than * one file... so, data structures are declared here, even though most of * the code that cares really is in http_core.c. Also, another accessor. /* Per-directory configuration */ /* the number of slashes in d */ /* If (opts & OPT_UNSET) then no absolute assignment to options has * invariant: (opts_add & opts_remove) == 0 * Which said another way means that the last relative (options + or -) * assignment made to each bit is recorded in exactly one of opts_add /* MIME typing --- the core doesn't do anything at all with this, * but it does know what to slap on a request for a document which * goes untyped by other mechanisms before it slips out the door... /* Authentication stuff. Groan... */ /* Custom response config. These can contain text or a URL to redirect to. * if response_code_strings is NULL then there are none in the config, * if it's not null then it's allocated to sizeof(char*)*RESPONSE_CODES. * This lets us do quick merges in merge_core_dir_configs(). /* Hostname resolution etc */ signed int do_rfc1413 :
2;
/* See if client is advertising a username? */ signed int content_md5 :
2;
/* calculate Content-MD5? */ /* since is_fnmatch(conf->d) was being called so frequently in * directory_walk() and its relatives, this field was created and * is set to the result of that call. /* should we force a charset on any outgoing parameterless content-type? unsigned long limit_req_body;
/* limit on bytes in request msg body */ /* Where to find interpreter to run scripts */ /* Per-server core configuration */ /* Name translations --- we want the core to be able to do *something* * so it's at least a minimally functional web server on its own (and * can be tested that way). But let's keep it to the bare minimum: #
endif /* !APACHE_HTTP_CORE_H */