httpd.h revision 89da6eb70c41422a20e5f871dbf5950140d128ab
/** Set default for Windows file system */ /** Set the default for NetWare */ /** Set for all other OSs */ * --------- You shouldn't have to edit anything below this line ---------- * Any modifications to any defaults not defined above should be done in the * respective configuration file. * Default location of documents. Can be overridden by the DocumentRoot /* Set default for OS/2 file system */ /* Set default for non OS/2 file system */ #
endif /* DOCUMENT_LOCATION *//** Maximum number of dynamically loaded modules */ /** Default administrator's address */ /** The name of the log files */ #
endif /* DEFAULT_ERRORLOG *//** Define this to be what your per-directory security files are called */ /* Set default for OS/2 file system */ #
endif /* DEFAULT_ACCESS_FNAME *//** The name of the server config file */ /** The default path for CGI scripts if none is currently set */ /** The path to the suExec wrapper, can be overridden in Configuration */ /** The timeout for waiting for messages */ /** The timeout for waiting for keepalive timeout until next request */ /** The number of requests to entertain per connection */ * Limits on the size of various request items. These limits primarily * exist to prevent simple denial-of-service attacks on a server based * on misuse of the protocol. The recommended values will depend on the * nature of the server resources -- CGI scripts and database backends * might require large values, but most servers could get by with much * smaller limits than we use below. The request message body size can * be limited by the per-dir config directive LimitRequestBody. * Internal buffer sizes are two bytes more than the DEFAULT_LIMIT_REQUEST_LINE * and DEFAULT_LIMIT_REQUEST_FIELDSIZE below, which explains the 8190. * These two limits can be lowered or raised by the server config * directives LimitRequestLine and LimitRequestFieldsize, respectively. * DEFAULT_LIMIT_REQUEST_FIELDS can be modified or disabled (set = 0) by * the server config directive LimitRequestFields. /** default limit on bytes in Request-Line (Method+URI+HTTP-version) */ /** default limit on bytes in any one header field */ /** default limit on number of request header fields */ * The default default character set name to add if AddDefaultCharset is * enabled. Overridden with AddDefaultCharsetName. /** default HTTP Server protocol */ /* ------------------ stuff that modules are allowed to look at ----------- */ /** Define this to be what your HTML directory content files are called */ /** The name of the MIME types file */ * Define the HTML doctype strings centrally. "DTD HTML 3.2 Final//EN\">\n" /** HTML 4.0 Strict Doctype */ /** HTML 4.0 Transitional Doctype */ "DTD HTML 4.0 Transitional//EN\"\n" \
/** HTML 4.0 Frameset Doctype */ "DTD HTML 4.0 Frameset//EN\"\n" \
/** XHTML 1.0 Strict Doctype */ "DTD XHTML 1.0 Strict//EN\"\n" \
/** XHTML 1.0 Transitional Doctype */ "DTD XHTML 1.0 Transitional//EN\"\n" \
"xhtml1-transitional.dtd\">\n" /** XHTML 1.0 Frameset Doctype */ "DTD XHTML 1.0 Frameset//EN\"\n" \
/** Internal representation for a HTTP protocol number, e.g., HTTP/1.1 */ /** Major part of HTTP protocol */ /** Minor part of HTTP protocol */ /* -------------- Port number for server running standalone --------------- */ /** default HTTPS Port */ * Check whether @a port is the default port for the request @a r. * @param port The port number * Get the default port for a request (which depends on the scheme). * Get the scheme for a request. /** The default string length */ /** The length of a Huge string */ /** The size of the server's internal read-write buffers */ /** The max number of regex captures that can be expanded by ap_pregsub */ * APR_HAS_LARGE_FILES introduces the problem of spliting sendfile into * mutiple buckets, no greater than MAX(apr_size_t), and more granular * than that in case the brigade code/filters attempt to read it directly. * ### 16mb is an invention, no idea if it is reasonable. * MPM child process exit status values * The MPM parent process may check the status to see if special * error handling is required. /** A fatal error arising during the server's init sequence */ /** The child died during its init sequence */ * The child exited due to a resource shortage. * The parent should limit the rate of forking until * the situation is resolved. * A fatal error, resulting in the whole server aborting. * If a child exits with this error, the parent process * considers this a server-wide fatal error and aborts. * Stuff marked #AP_DECLARE is part of the API, and intended for use * by modules. Its purpose is to allow us to add attributes that * particular platforms or compilers require to every exported function. * Stuff marked #AP_DECLARE_NONSTD is part of the API, and intended for * use by modules. The difference between #AP_DECLARE and * #AP_DECLARE_NONSTD is that the latter is required for any functions * which use varargs or are used via indirect function call. This * is to accomodate the two calling conventions in windows dlls. * modules should not use functions marked AP_CORE_DECLARE * modules should not use functions marked AP_CORE_DECLARE_NONSTD * @defgroup APACHE_APR_STATUS_T HTTPD specific values of apr_status_t /** The function declines to handle the request */ * @brief The numeric version information is broken out into fields within this int major;
/**< major number */ int minor;
/**< minor number */ int patch;
/**< patch number */ const char *
add_string;
/**< additional string like "-dev" */ * Return httpd's version information in a numeric form. * @param version Pointer to a version structure for returning the version * Get the server banner in a form suitable for sending over the * network, with the level of information controlled by the * ServerTokens directive. * @return The server banner * Get the server description in a form suitable for local displays, * status reports, or logging. This includes the detailed server * version and information about some modules. It is not affected * by the ServerTokens directive. * @return The server description * Add a component to the server description and banner strings * @param pconf The pool to allocate the component from * @param component The string to add * Get the date a time that the server was built * @return The server build time string /* non-HTTP status codes returned by hooks */ #
define OK 0
/**< Module has handled this stage. */#
define DECLINED -
1 /**< Module declines to handle */#
define DONE -
2 /**< Module has served the response completely * - it's safe to die() with no more output #
define SUSPENDED -
3 /**< Module will handle the remainder of the request. * The core will never invoke the request again, */ /** Returned by the bottom-most filter if no data was written. * @see ap_pass_brigade(). */ /** Returned by the bottom-most filter if no data was read. * @see ap_get_brigade(). */ /** Returned by any filter if the filter chain encounters an error * and has already dealt with the error response. * @defgroup HTTP_Status HTTP Status Codes * storing all of the potential response status-lines (a sparse table). * When adding a new code here add it to status_lines as well. * A future version should dynamically generate the apr_table_t at startup. /** is the status code informational */ /** is the status code OK ?*/ /** is the status code a redirect */ /** is the status code a error (client or server) */ /** is the status code a client error */ /** is the status code a server error */ /** is the status code a (potentially) valid response code? */ /** should the status code drop the connection */ * @defgroup Methods List of Methods recognized by the server * @ingroup APACHE_CORE_DAEMON * @brief Methods recognized (but not necessarily handled) by the server. * These constants are used in bit shifting masks of size int, so it is * unsafe to have more methods than bits in an int. HEAD == M_GET. #
define M_GET 0
/** RFC 2616: HTTP */#
define M_TRACE 6 /** RFC 2616: HTTP */#
define M_PATCH 7 /** no rfc(!) ### remove this one? */#
define M_UNLOCK 14 /** RFC 2518: WebDAV */ * METHODS needs to be equal to the number of bits * we are using for limit masks. * The method mask bit to shift for anding with a bitmask. /** @see ap_method_list_t */ * @struct ap_method_list_t * @brief Structure for handling HTTP methods. * Methods known to the server are accessed via a bitmask shortcut; * extension methods are handled by an array. /** The bitmask used for known methods */ /** the array used for extension methods */ * @defgroup module_magic Module Magic mime types /** Magic for mod_cgi[d] */ /** Magic for mod_include */ /** Magic for mod_include */ /* Just in case your linefeed isn't the one the other end is expecting. */ /** carrige return /Line Feed Combo */ #
else /* APR_CHARSET_EBCDIC *//* For platforms using the EBCDIC charset, the transition ASCII->EBCDIC is done * "native EBCDIC" CR and NL characters. These are therefore #
endif /* APR_CHARSET_EBCDIC *//** Useful for common code with either platform charset. */ * @defgroup values_request_rec_body Possible values for request_rec.read_body * Possible values for request_rec.read_body (set by handling module): /** Send 413 error if message has any body */ /** Send 411 error if body without Content-Length */ /** If chunked, remove the chunks for me. */ /** @} // values_request_rec_body */ * @defgroup values_request_rec_used_path_info Possible values for request_rec.used_path_info * @ingroup APACHE_CORE_DAEMON * Possible values for request_rec.used_path_info: /** Accept the path_info from the request */ /** Return a 404 error if path_info was given */ /** Module may chose to use the given path_info */ /** @} // values_request_rec_used_path_info */ * Things which may vary per file-lookup WITHIN a request --- * e.g., state of MIME config. Basically, the name of an object, info * about the object, and any other info we may ahve which may need to * change as we go poking around looking for it (e.g., overridden by * Note how the default state of almost all these things is properly * zero, so that allocating it with pcalloc does the right thing without * a whole lot of hairy initialization... so long as we are willing to * make the (fairly) portable assumption that the bit pattern of a NULL * pointer is, in fact, zero. * @brief This represents the result of calling htaccess; these are cached for /** the directory to which this applies */ /** the overrides allowed for the .htaccess file */ /** the override options allowed for the .htaccess file */ /** Table of allowed directives for override */ /** the configuration directives */ /** the next one, or NULL if no more; N.B. never change this */ /* The following four types define a hierarchy of activities, so that * given a request_rec r you can write r->connection->server->process * to get to the process_rec. While this reduces substantially the * number of arguments that various hooks require beware that in * threaded versions of the server you must consider multiplexing /** A structure that represents one process */ /** A structure that represents a virtual server */ /** A structure that represents one connection */ /** A structure that represents the current request */ /** A structure that represents the status of the current connection */ /* ### would be nice to not include this from httpd.h ... */ /* This comes after we have defined the request_rec type */ * @brief A structure that represents one process /** Global pool. Cleared upon normal exit */ /** Configuration pool. Cleared upon restart */ /** The program name used to execute the program */ /** The command line arguments */ const char *
const *
argv;
/** Number of command line arguments passed to the program */ * @brief A structure that represents the current request /** The pool associated with the request */ /** The connection to the client */ /** The virtual host for this request */ /** Pointer to the redirected request if this is an external redirect */ /** Pointer to the previous request if this is an internal redirect */ /** Pointer to the main request if this is a sub-request /* Info about the request itself... we begin with stuff that only /** First line of request */ /** HTTP/0.9, "simple" request (e.g. GET /foo\n w/no headers) */ * possible values PROXYREQ_NONE, PROXYREQ_PROXY, PROXYREQ_REVERSE, /** HEAD request, as opposed to GET */ /** Protocol version number of protocol; 1.1 = 1001 */ /** Protocol string, as given to us, or HTTP/0.9 */ /** Host, as set by full URI or Host: */ /** Time when the request started */ /** Status line, if set by script */ /* Request method, two ways; also, protocol, etc.. Outside of protocol.c, /** M_GET, M_POST, etc. */ /** Request method (eg. GET, HEAD, POST, etc.) */ * 'allowed' is a bitvector of the allowed methods. * A handler must ensure that the request method is one that * it is capable of handling. Generally modules should DECLINE * any request methods they do not handle. Prior to aborting the * handler like this the handler should set r->allowed to the list * of methods that it is willing to handle. This bitvector is used * to construct the "Allow:" header required for OPTIONS requests, * and HTTP_METHOD_NOT_ALLOWED and HTTP_NOT_IMPLEMENTED status codes. * Since the default_handler deals with OPTIONS, all modules can * usually decline to deal with OPTIONS. TRACE is always allowed, * modules don't need to set it explicitly. * Since the default_handler will always handle a GET, a * module which does *not* implement GET should probably return * HTTP_METHOD_NOT_ALLOWED. Unfortunately this means that a Script GET * handler can't be installed by mod_actions. /** Array of extension methods */ /** List of allowed methods */ /** byte count in stream is for body */ /** body byte count, for easy access */ /** Last modified time of the requested resource */ /* HTTP/1.1 connection-level features */ /** The "real" content length */ /** sending chunked transfer-coding */ /** Method for reading the request body * (eg. REQUEST_CHUNKED_ERROR, REQUEST_NO_BODY, * REQUEST_CHUNKED_DECHUNK, etc...) */ /** reading chunked transfer-coding */ /** is client waiting for a 100 response? */ /** The optional kept body of the request. */ /** For ap_body_to_table(): parsed body */ /* XXX: ap_body_to_table has been removed. Remove body_table too or * XXX: keep it to reintroduce ap_body_to_table without major bump? */ /** Remaining bytes left to read from the request body */ /** Number of bytes that have been read from the request body */ /* MIME header environments, in and out. Also, an array containing * environment variables to be passed to subprocesses, so people can * write modules to add to that environment. * The difference between headers_out and err_headers_out is that the * latter are printed even on error, and persist across internal redirects * (so the headers printed for ErrorDocument handlers will have them). * The 'notes' apr_table_t is for notes from one module to another, with no * other set purpose in mind... /** MIME header environment from the request */ /** MIME header environment for the response */ /** MIME header environment for the response, printed even on errors and * persist across internal redirects */ /** Array of environment variables to be used for sub processes */ /** Notes from one module to another */ /* content_type, handler, content_encoding, and all content_languages * MUST be lowercased strings. They may be pointers to static strings; * they should not be modified in place. /** The content-type for the current request */ const char *
content_type;
/* Break these out --- we dispatch on 'em */ /** The handler string that we use to call a handler function */ const char *
handler;
/* What we *really* dispatch on */ /** How to encode the data */ /** Array of strings representing the content languages */ /** variant list validator (if negotiated) */ /** If an authentication check was made, this gets set to the user name. */ /** If an authentication check was made, this gets set to the auth type. */ /* What object is being requested (either directly, or via include * or content-negotiation mapping). /** The URI without any parsing performed */ /** The path portion of the URI, or "/" if no path provided */ /** The filename on disk corresponding to this response */ /* XXX: What does this mean? Please define "canonicalize" -aaron */ /** The true filename, we canonicalize r->filename if these don't match */ /** The PATH_INFO extracted from this request */ /** The QUERY_ARGS extracted from this request */ * Flag for the handler to accept or reject path_info on * the current request. All modules should respect the * AP_REQ_ACCEPT_PATH_INFO and AP_REQ_REJECT_PATH_INFO * values, while AP_REQ_DEFAULT_PATH_INFO indicates they * may follow existing conventions. This is set to the * user's preference upon HOOK_VERY_FIRST of the fixups. /** A flag to determine if the eos bucket has been sent yet */ /* Various other config info which may change with .htaccess files * These are config vectors, with one void* pointer for each module * (the thing pointed to being the module's business). /** Options set in config files, etc. */ /** Notes on *this* request */ /** Optional request log level configuration. Will usually point * to a server or per_dir config, i.e. must be copied before /** Id to identify request in access and error log. Set when the first * error log entry for this request is generated. * A linked list of the .htaccess configuration directives * accessed by this request. * N.B. always add to the head of the list, _never_ to the end. * that way, a sub request's list can (temporarily) point to a parent's list /** A list of output filters to be used for this request */ /** A list of input filters to be used for this request */ /** A list of protocol level output filters to be used for this /** A list of protocol level input filters to be used for this /** This response can not be cached */ /** There is no local copy of this response */ /** Mutex protect callbacks registered with ap_mpm_register_timed_callback * from being run before the original handler finishes running /** A struct containing the components of URI */ /** finfo.protection (st_mode) set to zero if no such file */ /** remote address information from conn_rec, can be overridden if * This is the address that originated the request. * @defgroup ProxyReq Proxy request types * Possible values of request_rec->proxyreq. A request could be normal, * proxied or reverse proxied. Normally proxied and reverse proxied are * grouped together as just "proxied", but sometimes it's necessary to * tell the difference between the two, such as for authentication. * @brief Enumeration of connection keepalive options * @brief Structure to store things which are per connection /** Pool associated with this connection */ /** Physical vhost this conn came in on */ /* Information about the connection itself */ /** remote address; this is the end-point of the next hop, for the address * of the request creator, see useragent_addr in request_rec /** Client's IP address; this is the end-point of the next hop, for the * IP of the request creator, see useragent_ip in request_rec /** Client's DNS name, if known. NULL if DNS hasn't been checked, * "" if it has and no address was found. N.B. Only access this though /** Only ever set if doing rfc1413 lookups. N.B. Only access this through * get_remote_logname() */ /** used for ap_get_server_name when UseCanonicalName is set to DNS * (ignores setting of HostnameLookups) */ /** ID of this connection; unique at any point in time */ /** Config vector containing pointers to connections per-server /** Notes on *this* connection: send note from one module to * another. must remain valid for all requests on this conn */ /** A list of input filters to be used for this connection */ /** A list of output filters to be used for this connection */ /** handle to scoreboard information for this connection */ /** The bucket allocator to use for all bucket/brigade creations */ /** The current state of this connection; may be NULL if not used by MPM */ /** Is there data pending in the input filters? */ /** Is there data pending in the output filters? */ /** Are there any filters that clogg/buffer the input stream, breaking /** have we done double-reverse DNS? -1 yes/failure, 0 not yet, /** Are we still talking? */ /** Are we going to keep the connection alive for another request? * @see ap_conn_keepalive_e */ /** How many times have we used it? */ /** Optional connection log level configuration. May point to a server or * per_dir config, i.e. must be copied before modifying */ /** Id to identify this connection in error log. Set when the first * error log entry for this connection is generated. /** This points to the current thread being used to process this request, * over the lifetime of a request, the value may change. Users of the connection * record should not rely upon it staying the same between calls that involve * Enumeration of connection states * The two states CONN_STATE_LINGER_NORMAL and CONN_STATE_LINGER_SHORT may * only be set by the MPM. Use CONN_STATE_LINGER outside of the MPM. * @brief A structure to contain connection state information /** Current state of the connection */ /* Per-vhost config... */ * The address 255.255.255.255, when used as a virtualhost address, * will become the "default" server when the ip doesn't match other vhosts. * @struct server_addr_rec * @brief A structure to be used for Per-vhost config /** The next server in the list */ /** The name given in "<VirtualHost>" */ /** The bound address, for this server */ /** The bound port, for this server */ /** The per-module log levels */ /** The log level for this server */ * @brief A structure to store information for each virtual server /** The process this server is running in */ /** The next server in the list */ /* Log files --- note that transfer log is now in the modules... */ /** The name of the error log */ /** A file descriptor that references the error log */ /** The log level configuration */ /* Module-specific configuration for server, and defaults... */ /** Config vector containing pointers to modules' per-server config /** MIME type info, etc., before we start checking per-directory info */ /** The name of the server */ /** The line of the config file that the server was defined on */ /** true if this is the virtual server */ /* Information for redirects */ /** for redirects, etc. */ /** The server request scheme for redirect responses */ /* Contact information */ /** The admin's contact information */ /** The server hostname */ /* Transaction handling */ /** I haven't got a clue */ /** Timeout, as an apr interval, before we give up */ /** The apr interval we will wait for another request */ /** Maximum requests per connection */ /** Use persistent connections? */ /** Normal names for ServerAlias servers */ /** Wildcarded names for ServerAlias servers */ /** Pathname for ServerPath */ /** limit on size of the HTTP request line */ /** limit on size of any request header field */ /** limit on number of request header fields */ /** Opaque storage location */ * @struct server_load_rec * @brief A structure to hold various server load params /* 1 min loadavg, ala getloadavg() */ * Get the context_document_root for a request. This is a generalization of * the document root, which is too limited in the presence of mappers like * mod_userdir and mod_alias. The context_document_root is the directory * on disk that maps to the context_prefix URI prefix. * @note For resources that do not map to the file system or for very complex * mappings, this information may still be wrong. * Get the context_prefix for a request. The context_prefix URI prefix * maps to the context_document_root on disk. /** Set context_prefix and context_document_root for a request. * @param prefix the URI prefix, without trailing slash * @param document_root the corresponding directory on disk, without trailing * @note If one of prefix of document_root is NULL, the corrsponding * property will not be changed. /** Set per-request document root. This is for mass virtual hosting modules * that want to provide the correct DOCUMENT_ROOT value to scripts. * @param document_root the document root for the request. * it sans any parameters; e.g., strip off any ';charset=foo' and the like. * @param p Pool to allocate memory from * @param intype The field to examine * @return A copy of the field minus any parameters * Convert a time from an integer into a string in a specified format * @param p The pool to allocate memory from * @param t The time to convert * @param fmt The format to use for the conversion * @param gmt Convert the time for GMT? * @return The string that represents the specified time /* String handling. The *_nc variants allow you to use non-const char **s as arguments (unfortunately C won't automatically convert a char ** to a const * Get the characters until the first occurance of a specified character * @param p The pool to allocate memory from * @param line The string to get the characters from * @param stop The character to stop at * @return A copy of the characters up to the first stop character * Get the characters until the first occurance of a specified character * @param p The pool to allocate memory from * @param line The string to get the characters from * @param stop The character to stop at * @return A copy of the characters up to the first stop character * @note This is the same as ap_getword(), except it doesn't use const char **. * Get the first word from a given string. A word is defined as all characters * up to the first whitespace. * @param p The pool to allocate memory from * @param line The string to traverse * @return The first word in the line * Get the first word from a given string. A word is defined as all characters * up to the first whitespace. * @param p The pool to allocate memory from * @param line The string to traverse * @return The first word in the line * @note The same as ap_getword_white(), except it doesn't use const char** * Get all characters from the first occurance of @a stop to the first "\0" * @param p The pool to allocate memory from * @param line The line to traverse * @param stop The character to start at * @return A copy of all caracters after the first occurance of the specified * Get all characters from the first occurance of @a stop to the first "\0" * @param p The pool to allocate memory from * @param line The line to traverse * @param stop The character to start at * @return A copy of all caracters after the first occurance of the specified * @note The same as ap_getword_nulls(), except it doesn't use const char **. * Get the second word in the string paying attention to quoting * @param p The pool to allocate from * @param line The line to traverse * @return A copy of the string * Get the second word in the string paying attention to quoting * @param p The pool to allocate from * @param line The line to traverse * @return A copy of the string * @note The same as ap_getword_conf(), except it doesn't use const char **. * Check a string for any config define or environment variable construct * and replace each of them by the value of that variable, if it exists. * The default syntax of the constructs is ${ENV} but can be changed by * setting the define::* config defines. If the variable does not exist, * leave the ${ENV} construct alone but print a warning. * @param p The pool to allocate from * @param word The string to check * @return The string with the replaced environment variables * Size an HTTP header field list item, as separated by a comma. * @param field The field to size * @param len The length of the field * @return The return value is a pointer to the beginning of the non-empty * list item within the original string (or NULL if there is none) and the * address of field is shifted to the next non-comma, non-whitespace * character. len is the length of the item excluding any beginning whitespace. * Retrieve an HTTP header field list item, as separated by a comma, * while stripping insignificant whitespace and lowercasing anything not in * a quoted string or comment. * @param p The pool to allocate from * @param field The field to retrieve * @return The return value is a new string containing the converted list * item (or NULL if none) and the address pointed to by field is * shifted to the next non-comma, non-whitespace. * Find an item in canonical form (lowercase, no extra spaces) within * an HTTP field value list. * @param p The pool to allocate from * @param line The field value list to search * @param tok The token to search for * @return 1 if found, 0 if not found. * Retrieve a token, spacing over it and adjusting the pointer to * the first non-white byte afterwards. Note that these tokens * are delimited by semis and commas and can also be delimited * by whitespace at the caller's option. * @param p The pool to allocate from * @param accept_line The line to retrieve the token from (adjusted afterwards) * @param accept_white Is it delimited by whitespace * Find http tokens, see the definition of token from RFC2068 * @param p The pool to allocate from * @param line The line to find the token * @param tok The token to find * @return 1 if the token is found, 0 otherwise * find http tokens from the end of the line * @param p The pool to allocate from * @param line The line to find the token * @param tok The token to find * @return 1 if the token is found, 0 otherwise * Check for an Absolute URI syntax * @param u The string to check * @return 1 if URI, 0 otherwise * @param url The string to unescape * @return 0 on success, non-zero otherwise * @param url The url to unescape * @return 0 on success, non-zero otherwise * Unescape a URL, but leaving %2f (slashes) escaped * @param url The url to unescape * @param decode_slashes Whether or not slashes should be decoded * @return 0 on success, non-zero otherwise * @param query The query to unescape * @return 0 on success, non-zero otherwise * Convert all double slashes to single slashes * @param name The string to convert * Remove all ./ and xx/../ substrings from a file name. Also remove * any leading ../ or /../ substrings. * @param name the file name to parse * Escape a path segment, as defined in RFC 1808 * @param p The pool to allocate from * @param s The path to convert * @return The converted URL * Escape a path segment, as defined in RFC 1808, to a preallocated buffer. * @param c The preallocated buffer to write to * @param s The path to convert * @return The converted URL (c) * convert an OS path to a URL in an OS dependent way. * @param p The pool to allocate from * @param path The path to convert * @param partial if set, assume that the path will be appended to something * with a '/' in it (and thus does not prefix "./"). * If not set, there will be one byte of additional space after the * NUL, to allow the caller to append a '/'. * @return The converted URL /** @see ap_os_escape_path */ * @param p The pool to allocate from * @param s The path to convert * @return The converted URL * @param c The preallocated buffer to write to * @param s The path to convert * @return The converted URL (c) * @param p The pool to allocate from * @param s The html to escape * @return The escaped string * @param p The pool to allocate from * @param s The html to escape * @param toasc Whether to escape all non-ASCII chars to \&\#nnn; * @return The escaped string * Escape a string for logging * @param p The pool to allocate from * @param str The string to escape * @return The escaped string * Escape a string for logging into the error log (without a pool) * @param dest The buffer to write to * @param source The string to escape * @param buflen The buffer size for the escaped string (including "\0") * @return The len of the escaped string (always < maxlen) * Construct a full hostname * @param p The pool to allocate from * @param hostname The hostname of the server * @param port The port the server is running on * @param r The current request * @return The server's hostname * @param p The pool to allocate from * @param s The command to escape * @return The escaped shell command * Count the number of directories in a path * @param path The path to count * @return The number of directories * Copy at most @a n leading directories of @a s into @a d. @a d * should be at least as large as @a s plus 1 extra byte * @param d The location to copy to * @param s The location to copy from * @param n The number of directories to copy * @return value is the ever useful pointer to the trailing "\0" of d * @note on platforms with drive letters, n = 0 returns the "/" root, * whereas n = 1 returns the "d:/" root. On all other platforms, n = 0 * returns the empty string. */ * Return the parent directory name (including trailing /) of the file * @param p The pool to allocate from * @param s The file to get the parent of * @return A copy of the file's parent directory * Given a directory and filename, create a single path from them. This * function is smart enough to ensure that there is a single '/' between the * directory and file names * @param a The pool to allocate from * @param dir The directory name * @return A copy of the full path, with one byte of extra space after the NUL * to allow the caller to add a trailing '/'. * @note Never consider using this function if you are dealing with filesystem * names that need to remain canonical, unless you are merging an apr_dir_read * path and returned filename. Otherwise, the result is not canonical. * Test if the given path has an an absolute path. * @param p The pool to allocate from * @param dir The directory name * @note The converse is not necessarily true, some OS's (Win32/OS2/Netware) have * multiple forms of absolute paths. This only reports if the path is absolute * Does the provided string contain wildcard characters? This is useful * for determining if the string should be passed to strcmp_match or to strcmp. * The only wildcard characters recognized are '?' and '*' * @param str The string to check * @return 1 if the string has wildcards, 0 otherwise * Determine if a string matches a patterm containing the wildcards '?' or '*' * @param str The string to check * @param expected The pattern to match against * @return 0 if the two strings match, 1 otherwise * Determine if a string matches a patterm containing the wildcards '?' or '*', * @param str The string to check * @param expected The pattern to match against * @return 0 if the two strings match, 1 otherwise * Find the first occurrence of the substring s2 in s1, regardless of case * @param s1 The string to search * @param s2 The substring to search for * @return A pointer to the beginning of the substring * @remark See apr_strmatch() for a faster alternative * Return a pointer to the location inside of bigstring immediately after prefix * @param bigstring The input string * @param prefix The prefix to strip away * @return A pointer relative to bigstring after prefix * Decode a base64 encoded string into memory allocated from a pool * @param p The pool to allocate from * @param bufcoded The encoded string * @return The decoded string * Encode a string into memory allocated from a pool in base 64 format * @param p The pool to allocate from * @param string The plaintext string * @return The encoded string * Compile a regular expression to be used later. The regex is freed when * @param p The pool to allocate from * @param pattern the regular expression to compile * @param cflags The bitwise or of one or more of the following: * @li REG_EXTENDED - Use POSIX extended Regular Expressions * @li REG_ICASE - Ignore case * @li REG_NOSUB - Support for substring addressing of matches * @li REG_NEWLINE - Match-any-character operators don't match new-line * @return The compiled regular expression * Free the memory associated with a compiled regular expression * @param p The pool the regex was allocated from * @param reg The regular expression to free * @note This function is only necessary if the regex should be cleaned * After performing a successful regex match, you may use this function to * perform a series of string substitutions based on subexpressions that were * matched during the call to ap_regexec. This function is limited to * result strings of 64K. Consider using ap_pregsub_ex() instead. * @param p The pool to allocate from * @param input An arbitrary string containing $1 through $9. These are * replaced with the corresponding matched sub-expressions * @param source The string that was originally matched to the regex * @param nmatch the nmatch returned from ap_pregex * @param pmatch the pmatch array returned from ap_pregex * @return The substituted string, or NULL on error * After performing a successful regex match, you may use this function to * perform a series of string substitutions based on subexpressions that were * matched during the call to ap_regexec * @param p The pool to allocate from * @param result where to store the result, will be set to NULL on error * @param input An arbitrary string containing $1 through $9. These are * replaced with the corresponding matched sub-expressions * @param source The string that was originally matched to the regex * @param nmatch the nmatch returned from ap_pregex * @param pmatch the pmatch array returned from ap_pregex * @param maxlen the maximum string length to return, 0 for unlimited * @return The substituted string, or NULL on error * We want to downcase the type/subtype for comparison purposes * but nothing else because ;parameter=foo values are case sensitive. * @param s The content-type to convert to lowercase * convert a string to all lowercase * @param s The string to convert to lowercase * convert a string to all uppercase * @param s The string to convert to uppercase * Search a string from left to right for the first occurrence of a * @param str The string to search * @param c The character to search for * @return The index of the first occurrence of c in str * Search a string from right to left for the first occurrence of a * @param str The string to search * @param c The character to search for * @return The index of the first occurrence of c in str * Given a string, replace any bare " with \\" . * @param p The pool to allocate memory from * @param instring The string to search for " * @return A copy of the string with escaped quotes * Given a string, append the PID deliminated by delim. * Usually used to create a pid-appended filepath name * @param p The pool to allocate memory from * @param string The string to append the PID to * @param delim The string to use to deliminate the string from the PID * @return A copy of the string with the PID appended * Parse a given timeout parameter string into an apr_interval_time_t value. * The unit of the time interval is given as postfix string to the numeric * string. Currently the following units are understood: * If no unit is contained in the given timeout parameter the default_time_unit * @param timeout_parameter The string containing the timeout parameter. * @param timeout The timeout value to be returned. * @param default_time_unit The default time unit to use if none is specified * @return Status value indicating whether the parsing was successful or not. * Determine if a request has a request body or not. * @param r the request_rec of the request * Cleanup a string (mainly to be filesystem safe) * We only allow '_' and alphanumeric chars. Non-printable * map to 'x' and all others map to '_' * @param p pool to use to allocate dest * @param src string to clean up * @param dest cleaned up, allocated string * @return Status value indicating whether the cleaning was successful or not. * Cleanup a string (mainly to be filesystem safe) * We only allow '_' and alphanumeric chars. Non-printable * map to 'x' and all others map to '_' * @param src string to clean up * @param dest cleaned up, pre-allocated string * @return Status value indicating whether the cleaning was successful or not. * Structure to store the contents of an HTTP form of the type * Currently it contains the name as a char* of maximum length * HUGE_STRING_LEN, and a value in the form of a bucket brigade * Read the body and parse any form found, which must be of the * @param r request containing POSTed form data * @param ptr returned array of ap_form_pair_t * @param num max num of params or -1 for unlimited * @param size max size allowed for parsed data * @return OK or HTTP error /* Misc system hackery */ * Given the name of an object in the file system determine if it is a directory * @param p The pool to allocate from * @param name The name of the object to check * @return 1 if it is a directory, 0 otherwise * Given the name of an object in the file system determine if it is a directory - this version is symlink aware * @param p The pool to allocate from * @param name The name of the object to check * @return 1 if it is a directory, 0 otherwise * Determine the local host name for the current machine * @param p The pool to allocate from * @return A copy of the local host name * Log an assertion to the error log * @param szExp The assertion that failed * @param szFile The file the assertion is in * @param nLine The line the assertion is defined on * @internal Internal Assert function * Redefine assert() to something more useful for an Apache... * Use ap_assert() if the condition should always be checked. * Use AP_DEBUG_ASSERT() if the condition should only be checked when AP_DEBUG * @defgroup stopsignal Flags which indicate places where the server should stop for debugging. * A set of flags which indicate places where the server should raise(SIGSTOP). * This is useful for debugging, because you can then attach to that process * with gdb and continue. This is important in cases where one_process * debugging isn't possible. /** stop making a child process */ /** stop spawning a child process */ /** stop spawning a child process with a piped log */ /** stop spawning a CGI child process */ /** Macro to get GDB started */ * Get HTML describing the address and (optionally) admin of the server. * @param prefix Text which is prepended to the return value * @param r The request_rec * @return HTML describing the server, allocated in @a r's pool. /** strtoul does not exist on sunos4. */ /* The C library has functions that allow const to be silently dropped ... these macros detect the drop in maintainer mode, but use the native methods for normal builds Note that on some platforms (e.g., AIX with gcc, Solaris with gcc), string.h needs to be included before the macros are defined or compilation will fail. * ap_palloc_debug initializes allocated memory to non-zero * this is necessary to avoid useless double memset of memory /** use this instead of strchr */ /** use this instead of strchr */ /** use this instead of strrchr */ /** use this instead of strrchr */ /** use this instead of strrstr*/ /** use this instead of strrstr*/ * Generate pseudo random bytes. * This is a convenience interface to apr_random. It is cheaper but less * secure than apr_generate_random_bytes(). * @param buf where to store the bytes * @param size number of bytes to generate * @note ap_random_insecure_bytes() is thread-safe, it uses a mutex on * Get a pseudo random number in a range. * @param min low end of range * @param max high end of range * @return a number in the range * Abort with a error message signifying out of memory * Wrapper for malloc() that calls ap_abort_on_oom() if out of memory * @param size size of the memory block * @return pointer to the allocated memory * @note ap_malloc may be implemented as a macro * Wrapper for calloc() that calls ap_abort_on_oom() if out of memory * @param nelem number of elements to allocate memory for * @param size size of a single element * @return pointer to the allocated memory * @note ap_calloc may be implemented as a macro * Wrapper for realloc() that calls ap_abort_on_oom() if out of memory * @param ptr pointer to the old memory block (or NULL) * @param size new size of the memory block * @return pointer to the reallocated memory * @note ap_realloc may be implemented as a macro * @param ld struct to populate: -1 in fields means error #
endif /* !APACHE_HTTPD_H *//** @} //APACHE Daemon */ /** @} //APACHE super group */