#include "ap_hooks.h"
/* Although this file doesn't declare any hooks, declare the exports group here */
-/**
- * @defgroup exports Apache exports
+/**
+ * @defgroup exports Apache exports
* @ingroup APACHE_CORE
*/
* @see AP_DECLARE_EXPORT
*
* AP_DECLARE_STATIC and AP_DECLARE_EXPORT are left undefined when
- * including Apache's Core headers, to import and link the symbols from the
- * dynamic Apache Core library and assure appropriate indirection and calling
+ * including Apache's Core headers, to import and link the symbols from the
+ * dynamic Apache Core library and assure appropriate indirection and calling
* conventions at compile time.
*/
# define AP_DECLARE_STATIC
#define AP_DECLARE(type) type
/**
- * Apache Core dso variable argument and hook functions are declared with
+ * Apache Core dso variable argument and hook functions are declared with
* AP_DECLARE_NONSTD(), as they must use the C language calling convention.
* @see AP_DECLARE
* @code
/**
* Declare a dso module's exported module structure as AP_MODULE_DECLARE_DATA.
*
- * Unless AP_MODULE_DECLARE_STATIC is defined at compile time, symbols
+ * Unless AP_MODULE_DECLARE_STATIC is defined at compile time, symbols
* declared with AP_MODULE_DECLARE_DATA are always exported.
* @code
* module AP_MODULE_DECLARE_DATA mod_tag
* AP_MODULE_DECLARE_EXPORT is a no-op. Unless contradicted by the
* AP_MODULE_DECLARE_STATIC compile-time symbol, it is assumed and defined.
*
- * The old SHARED_MODULE compile-time symbol is now the default behavior,
+ * The old SHARED_MODULE compile-time symbol is now the default behavior,
* so it is no longer referenced anywhere with Apache 2.0.
*/
#define AP_MODULE_DECLARE_EXPORT
#define AP_HOOKS_H
/* Although this file doesn't declare any hooks, declare the hook group here */
-/**
- * @defgroup hooks Apache Hooks
+/**
+ * @defgroup hooks Apache Hooks
* @ingroup APACHE_CORE
*/
* @see AP_DECLARE_EXPORT
*
* AP_DECLARE_STATIC and AP_DECLARE_EXPORT are left undefined when
- * including Apache's Core headers, to import and link the symbols from the
- * dynamic Apache Core library and assure appropriate indirection and calling
+ * including Apache's Core headers, to import and link the symbols from the
+ * dynamic Apache Core library and assure appropriate indirection and calling
* conventions at compile time.
*/
# define AP_DECLARE_STATIC
args_use,ok,decline)
/**
- * Implement a hook that runs until a function returns something other than
- * decline. If all functions return decline, the hook runner returns decline.
+ * Implement a hook that runs until a function returns something other than
+ * decline. If all functions return decline, the hook runner returns decline.
* The implementation is called ap_run_<i>name</i>.
*
* @param ret The return type of the hook (and the hook runner)
typedef apr_status_t (*accept_function)(void **csd, ap_listen_rec *lr, apr_pool_t *ptrans);
/**
- * @brief Apache's listeners record.
+ * @brief Apache's listeners record.
*
* These are used in the Multi-Processing Modules
* to setup all of the sockets for the MPM to listen to and accept on.
*/
ap_listen_rec *next;
/**
- * The actual socket
+ * The actual socket
*/
apr_socket_t *sd;
/**
*/
accept_function accept_func;
/**
- * Is this socket currently active
+ * Is this socket currently active
*/
int active;
/**
* sockets. This executes the listen and bind on the sockets.
* @param s The global server_rec
* @return The number of open sockets.
- */
+ */
AP_DECLARE(int) ap_setup_listeners(server_rec *s);
/**
* should not ever be called by external modules. ALL MPMs should include
* LISTEN_COMMANDS in their command_rec table so that these functions are
* called.
- */
+ */
AP_DECLARE_NONSTD(const char *) ap_set_listenbacklog(cmd_parms *cmd, void *dummy, const char *arg);
-AP_DECLARE_NONSTD(const char *) ap_set_listener(cmd_parms *cmd, void *dummy,
+AP_DECLARE_NONSTD(const char *) ap_set_listener(cmd_parms *cmd, void *dummy,
int argc, char *const argv[]);
AP_DECLARE_NONSTD(const char *) ap_set_send_buffer_size(cmd_parms *cmd, void *dummy,
const char *arg);
The MPM may or may not be multithreaded. In the event that it is
multithreaded, at any instant it guarantees a 1:1 mapping of threads
- ap_process_connection invocations.
+ ap_process_connection invocations.
Note: In the future it will be possible for ap_process_connection
to return to the MPM prior to finishing the entire connection; and
* Spawn a process with privileges that another module has requested
* @param r The request_rec of the current request
* @param newproc The resulting process handle.
- * @param progname The program to run
- * @param args the arguments to pass to the new program. The first
+ * @param progname The program to run
+ * @param args the arguments to pass to the new program. The first
* one should be the program name.
- * @param env The new environment apr_table_t for the new process. This
+ * @param env The new environment apr_table_t for the new process. This
* should be a list of NULL-terminated strings.
* @param attr the procattr we should use to determine how to create the new
* process
- * @param p The pool to use.
+ * @param p The pool to use.
*/
AP_DECLARE(apr_status_t) ap_os_create_privileged_process(
const request_rec *r,
- apr_proc_t *newproc,
+ apr_proc_t *newproc,
const char *progname,
- const char * const *args,
+ const char * const *args,
const char * const *env,
- apr_procattr_t *attr,
+ apr_procattr_t *attr,
apr_pool_t *p);
/* Subtypes/Values for AP_MPMQ_IS_THREADED and AP_MPMQ_IS_FORKED */
* @param eflags Bitwise OR of AP_REG_* flags (NOTBOL and NOTEOL supported,
* other flags are ignored)
* @return 0 for successful match, \p AP_REG_NOMATCH otherwise
- */
+ */
AP_DECLARE(int) ap_regexec(const ap_regex_t *preg, const char *string,
apr_size_t nmatch, ap_regmatch_t *pmatch, int eflags);
* @param errbuf A buffer to store the error in
* @param errbuf_size The size of the buffer
*/
-AP_DECLARE(apr_size_t) ap_regerror(int errcode, const ap_regex_t *preg,
+AP_DECLARE(apr_size_t) ap_regerror(int errcode, const ap_regex_t *preg,
char *errbuf, apr_size_t errbuf_size);
/** Destroy a pre-compiled regex.
typedef struct ap_regkey_t ap_regkey_t;
-/* Used to recover AP_REGKEY_* constants
+/* Used to recover AP_REGKEY_* constants
*/
AP_DECLARE(const ap_regkey_t *) ap_regkey_const(int i);
* AP_REGKEY_CURRENT_USER
* AP_REGKEY_LOCAL_MACHINE
* AP_REGKEY_USERS
- * AP_REGKEY_PERFORMANCE_DATA
- * AP_REGKEY_DYN_DATA
+ * AP_REGKEY_PERFORMANCE_DATA
+ * AP_REGKEY_DYN_DATA
* </PRE>
* @param keyname The path of the key relative to the parent key
* @param flags Or'ed value of:
* </PRE>
* @param pool The pool in which newkey is allocated
*/
-AP_DECLARE(apr_status_t) ap_regkey_open(ap_regkey_t **newkey,
+AP_DECLARE(apr_status_t) ap_regkey_open(ap_regkey_t **newkey,
const ap_regkey_t *parentkey,
const char *keyname,
- apr_int32_t flags,
+ apr_int32_t flags,
apr_pool_t *pool);
/**
* AP_REGKEY_CURRENT_USER
* AP_REGKEY_LOCAL_MACHINE
* AP_REGKEY_USERS
- * AP_REGKEY_PERFORMANCE_DATA
- * AP_REGKEY_DYN_DATA
+ * AP_REGKEY_PERFORMANCE_DATA
+ * AP_REGKEY_DYN_DATA
* </PRE>
* @param keyname The path of the key relative to the parent key
* @param pool The pool used for temp allocations
* @remark ap_regkey_remove() is not recursive, although it removes
- * all values within the given keyname, it will not remove a key
+ * all values within the given keyname, it will not remove a key
* containing subkeys.
*/
-AP_DECLARE(apr_status_t) ap_regkey_remove(const ap_regkey_t *parent,
+AP_DECLARE(apr_status_t) ap_regkey_remove(const ap_regkey_t *parent,
const char *keyname,
apr_pool_t *pool);
/**
* Win32 Only: Retrieve a registry value string from an open key.
- * @param result The string value retrieved
+ * @param result The string value retrieved
* @param key The registry key to retrieve the value from
* @param valuename The named value to retrieve (pass "" for the default)
* @param pool The pool used to store the result
* if the registry value is set with AP_REG_EXPAND (REG_EXPAND_SZ), such
* expansions are always performed.
*/
-AP_DECLARE(apr_status_t) ap_regkey_value_get(char **result,
- ap_regkey_t *key,
- const char *valuename,
+AP_DECLARE(apr_status_t) ap_regkey_value_get(char **result,
+ ap_regkey_t *key,
+ const char *valuename,
apr_pool_t *pool);
/**
* values will find all %foo% variables expanded from the environment.
* @param pool The pool used for temp allocations
*/
-AP_DECLARE(apr_status_t) ap_regkey_value_set(ap_regkey_t *key,
- const char *valuename,
- const char *value,
+AP_DECLARE(apr_status_t) ap_regkey_value_set(ap_regkey_t *key,
+ const char *valuename,
+ const char *value,
apr_int32_t flags,
apr_pool_t *pool);
/**
* Win32 Only: Retrieve a raw byte value from an open key.
- * @param result The raw bytes value retrieved
- * @param resultsize Pointer to a variable to store the number raw bytes retrieved
+ * @param result The raw bytes value retrieved
+ * @param resultsize Pointer to a variable to store the number raw bytes retrieved
* @param resulttype Pointer to a variable to store the registry type of the value retrieved
* @param key The registry key to retrieve the value from
* @param valuename The named value to retrieve (pass "" for the default)
* @param pool The pool used to store the result
*/
-AP_DECLARE(apr_status_t) ap_regkey_value_raw_get(void **result,
+AP_DECLARE(apr_status_t) ap_regkey_value_raw_get(void **result,
apr_size_t *resultsize,
apr_int32_t *resulttype,
- ap_regkey_t *key,
- const char *valuename,
+ ap_regkey_t *key,
+ const char *valuename,
apr_pool_t *pool);
/**
* @param valuename The named value to store (pass "" for the default)
* @param value The bytes to store for the named value
* @param valuesize The number of bytes for value
- * @param valuetype The
+ * @param valuetype The
* values will find all %foo% variables expanded from the environment.
* @param pool The pool used for temp allocations
*/
-AP_DECLARE(apr_status_t) ap_regkey_value_raw_set(ap_regkey_t *key,
- const char *valuename,
- const void *value,
+AP_DECLARE(apr_status_t) ap_regkey_value_raw_set(ap_regkey_t *key,
+ const char *valuename,
+ const void *value,
apr_size_t valuesize,
apr_int32_t valuetype,
apr_pool_t *pool);
* @param valuename The named value to retrieve (pass "" for the default)
* @param pool The pool used to store the result
*/
-AP_DECLARE(apr_status_t) ap_regkey_value_array_get(apr_array_header_t **result,
+AP_DECLARE(apr_status_t) ap_regkey_value_array_get(apr_array_header_t **result,
ap_regkey_t *key,
- const char *valuename,
+ const char *valuename,
apr_pool_t *pool);
/**
* @param elts The number of elements in the elts string array
* @param pool The pool used for temp allocations
*/
-AP_DECLARE(apr_status_t) ap_regkey_value_array_set(ap_regkey_t *key,
- const char *valuename,
- int nelts,
+AP_DECLARE(apr_status_t) ap_regkey_value_array_set(ap_regkey_t *key,
+ const char *valuename,
+ int nelts,
const char * const * elts,
apr_pool_t *pool);
* @param valuename The named value to remove (pass "" for the default)
* @param pool The pool used for temp allocations
*/
-AP_DECLARE(apr_status_t) ap_regkey_value_remove(const ap_regkey_t *key,
+AP_DECLARE(apr_status_t) ap_regkey_value_remove(const ap_regkey_t *key,
const char *valuename,
apr_pool_t *pool);
* The tokens are listed in order of their significance for identifying the
* application.
*
- * "Product tokens should be short and to the point -- use of them for
+ * "Product tokens should be short and to the point -- use of them for
* advertizing or other non-essential information is explicitly forbidden."
*
- * Example: "Apache/1.1.0 MrWidget/0.1-alpha"
+ * Example: "Apache/1.1.0 MrWidget/0.1-alpha"
*/
#define AP_SERVER_BASEVENDOR "Apache Software Foundation"
#define AP_SERVER_BASEPROJECT "Apache HTTP Server"
#define AP_SERVER_PATCHLEVEL_NUMBER 15
#define AP_SERVER_DEVBUILD_BOOLEAN 1
-/* Synchronize the above with docs/manual/style/version.ent */
+/* Synchronize the above with docs/manual/style/version.ent */
#if AP_SERVER_DEVBUILD_BOOLEAN
#define AP_SERVER_ADD_STRING "-dev"
/**
* return number of free (not used) slots allocated for this entry.
* Valid for slots which are AP_SLOTMEM_TYPE_PREGRAB as well as
- * any which use get/release.
+ * any which use get/release.
* @param s ap_slotmem_instance_t to use.
* @return number of slots
*/
*/
#ifndef AP_SOCACHE_H
-#define AP_SOCACHE_H
+#define AP_SOCACHE_H
#include "httpd.h"
#include "ap_provider.h"
/** Bitmask of AP_SOCACHE_FLAG_* flags: */
unsigned int flags;
- /**
+ /**
* Create a session cache based on the given configuration string.
* The instance pointer returned in the instance paramater will be
* passed as the first argument to subsequent invocations.
* @param arg Used-specified configuration string. May be NULL to
* force use of defaults.
* @param tmp Pool to be used for any temporary allocations
- * @param p Pool to be use for any allocations lasting as long as
+ * @param p Pool to be use for any allocations lasting as long as
* the created instance
* @return NULL on success, or an error string on failure.
*/
- const char *(*create)(ap_socache_instance_t **instance, const char *arg,
+ const char *(*create)(ap_socache_instance_t **instance, const char *arg,
apr_pool_t *tmp, apr_pool_t *p);
/* Initialize the cache. The cname must be of maximum length 16
* @param pool Pool for long-lived allocations
* @return APR status value indicating success.
*/
- apr_status_t (*init)(ap_socache_instance_t *instance, const char *cname,
+ apr_status_t (*init)(ap_socache_instance_t *instance, const char *cname,
const struct ap_socache_hints *hints,
server_rec *s, apr_pool_t *pool);
- /**
+ /**
* Destroy a given cache instance object.
* @param instance The cache instance to destroy.
* @param s Associated server structure (for logging purposes)
*/
void (*destroy)(ap_socache_instance_t *instance, server_rec *s);
- /**
+ /**
* Store an object in a cache instance.
* @param instance The cache instance
* @param s Associated server structure (for logging purposes)
* @param pool Pool for temporary allocations.
* @return APR status value.
*/
- apr_status_t (*store)(ap_socache_instance_t *instance, server_rec *s,
- const unsigned char *id, unsigned int idlen,
- apr_time_t expiry,
+ apr_status_t (*store)(ap_socache_instance_t *instance, server_rec *s,
+ const unsigned char *id, unsigned int idlen,
+ apr_time_t expiry,
unsigned char *data, unsigned int datalen,
apr_pool_t *pool);
* This is the protocol module driver. This calls all of the
* pre-connection and connection hooks for all protocol modules.
* @param c The connection on which the request is read
- * @param csd The mechanism on which this connection is to be read.
+ * @param csd The mechanism on which this connection is to be read.
* Most times this will be a socket, but it is up to the module
* that accepts the request to determine the exact type.
*/
/* Hooks */
/**
- * create_connection is a RUN_FIRST hook which allows modules to create
- * connections. In general, you should not install filters with the
- * create_connection hook. If you require vhost configuration information
+ * create_connection is a RUN_FIRST hook which allows modules to create
+ * connections. In general, you should not install filters with the
+ * create_connection hook. If you require vhost configuration information
* to make filter installation decisions, you must use the pre_connection
* or install_network_transport hook. This hook should close the connection
* if it encounters a fatal error condition.
*
* @param p The pool from which to allocate the connection record
- * @param server The server record to create the connection too.
+ * @param server The server record to create the connection too.
* @param csd The socket that has been accepted
* @param conn_id A unique identifier for this connection. The ID only
* needs to be unique at that time, not forever.
AP_DECLARE_HOOK(conn_rec *, create_connection,
(apr_pool_t *p, server_rec *server, apr_socket_t *csd,
long conn_id, void *sbh, apr_bucket_alloc_t *alloc))
-
+
/**
* This hook gives protocol modules an opportunity to set everything up
* before calling the protocol handler. All pre-connection hooks are
* run until one returns something other than ok or decline
* @param c The connection on which the request has been received.
- * @param csd The mechanism on which this connection is to be read.
+ * @param csd The mechanism on which this connection is to be read.
* Most times this will be a socket, but it is up to the module
* that accepts the request to determine the exact type.
* @return OK or DECLINED
/** @} */
/**
- * @defgroup get_remote_host Remote Host Resolution
+ * @defgroup get_remote_host Remote Host Resolution
* @ingroup APACHE_CORE_HTTPD
* @{
*/
/**
* Retrieve the document root for this server
* @param r The current request
- * @warning Don't use this! If your request went through a Userdir, or
+ * @warning Don't use this! If your request went through a Userdir, or
* something like that, it'll screw you. But it's back-compatible...
* @return The document root
*/
* never forced.
* 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)
+ * setting. The result is the (double reverse checked)
* hostname, or NULL if any of the lookups fail.
* </pre>
- * @param str_is_ip unless NULL is passed, this will be set to non-zero on output when an IP address
+ * @param str_is_ip unless NULL is passed, this will be set to non-zero on output when an IP address
* string is returned
* @return The remote hostname
*/
AP_DECLARE(apr_port_t) ap_get_server_port(const request_rec *r);
/**
- * Return the limit on bytes in request msg body
+ * Return the limit on bytes in request msg body
* @param r The current request
* @return the maximum number of bytes in the request msg body
*/
/** @see require_line */
typedef struct require_line require_line;
-/**
- * @brief A structure to keep track of authorization requirements
+/**
+ * @brief A structure to keep track of authorization requirements
*/
struct require_line {
/** Where the require line is in the config file. */
/** The complete string from the command line */
char *requirement;
};
-
+
/**
* Return the type of authorization required for this request
* @param r The current request
* @param r The current request
* @return The current authorization realm
*/
-AP_DECLARE(const char *) ap_auth_name(request_rec *r);
+AP_DECLARE(const char *) ap_auth_name(request_rec *r);
/**
* How the requires lines must be met.
#endif
/**
- * @brief Per-request configuration
+ * @brief Per-request configuration
*/
typedef struct {
- /** bucket brigade used by getline for look-ahead and
+ /** bucket brigade used by getline for look-ahead and
* ap_get_client_block for holding left-over request body */
struct apr_bucket_brigade *bb;
srv_sig_withmail
} server_signature_e;
-/**
- * @brief Per-directory configuration
+/**
+ * @brief Per-directory configuration
*/
typedef struct {
/** path of the directory/regex/etc. see also d_is_fnmatch/absolute below */
allow_options_t opts_remove;
overrides_t override;
allow_options_t override_opts;
-
+
/* 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().
*/
-
+
char **response_code_strings; /* from ErrorDocument, not from
* ap_custom_response() */
/* Per-server core configuration */
typedef struct {
-
+
char *gprof_dir;
/* Name translations --- we want the core to be able to do *something*
* can be tested that way). But let's keep it to the bare minimum:
*/
const char *ap_document_root;
-
+
/* Access control */
char *access_name;
#define APLOG_NOERRNO (APLOG_LEVELMASK + 1)
/** Use APLOG_TOCLIENT on ap_log_rerror() to give content
- * handlers the option of including the error text in the
+ * handlers the option of including the error text in the
* ErrorDocument sent back to the client. Setting APLOG_TOCLIENT
- * will cause the error text to be saved in the request_rec->notes
+ * will cause the error text to be saved in the request_rec->notes
* table, keyed to the string "error-notes", if and only if:
* - the severity level of the message is APLOG_WARNING or greater
* - there are no other "error-notes" set in request_rec->notes
* Once error-notes is set, it is up to the content handler to
* determine whether this text should be sent back to the client.
- * Note: Client generated text streams sent back to the client MUST
+ * Note: Client generated text streams sent back to the client MUST
* be escaped to prevent CSS attacks.
*/
#define APLOG_TOCLIENT ((APLOG_LEVELMASK + 1) * 2)
/* normal but significant condition on startup, usually printed to stderr */
-#define APLOG_STARTUP ((APLOG_LEVELMASK + 1) * 4)
+#define APLOG_STARTUP ((APLOG_LEVELMASK + 1) * 4)
#ifndef DEFAULT_LOGLEVEL
#define DEFAULT_LOGLEVEL APLOG_WARNING
* @param p The pool to allocate out of
* @param file Name of the file to log stderr output
*/
-AP_DECLARE(apr_status_t) ap_replace_stderr_log(apr_pool_t *p,
+AP_DECLARE(apr_status_t) ap_replace_stderr_log(apr_pool_t *p,
const char *file);
/**
* @param ptemp Pool used for temporary allocations
* @param s_main The main server
* @note ap_open_logs isn't expected to be used by modules, it is
- * an internal core function
+ * an internal core function
*/
-int ap_open_logs(apr_pool_t *pconf, apr_pool_t *plog,
+int ap_open_logs(apr_pool_t *pconf, apr_pool_t *plog,
apr_pool_t *ptemp, server_rec *s_main);
/**
*/
void ap_logs_child_init(apr_pool_t *p, server_rec *s);
-/*
+/*
* The primary logging functions, ap_log_error, ap_log_rerror, ap_log_cerror,
- * and ap_log_perror use a printf style format string to build the log message.
- * It is VERY IMPORTANT that you not include any raw data from the network,
- * such as the request-URI or request header fields, within the format
- * string. Doing so makes the server vulnerable to a denial-of-service
- * attack and other messy behavior. Instead, use a simple format string
+ * and ap_log_perror use a printf style format string to build the log message.
+ * It is VERY IMPORTANT that you not include any raw data from the network,
+ * such as the request-URI or request header fields, within the format
+ * string. Doing so makes the server vulnerable to a denial-of-service
+ * attack and other messy behavior. Instead, use a simple format string
* like "%s", followed by the string containing the untrusted data.
*/
* in preference to calling this function. Otherwise, if a conn_rec is
* available, use that with ap_log_cerror() in preference to calling
* this function.
- * @warning It is VERY IMPORTANT that you not include any raw data from
- * the network, such as the request-URI or request header fields, within
- * the format string. Doing so makes the server vulnerable to a
- * denial-of-service attack and other messy behavior. Instead, use a
- * simple format string like "%s", followed by the string containing the
+ * @warning It is VERY IMPORTANT that you not include any raw data from
+ * the network, such as the request-URI or request header fields, within
+ * the format string. Doing so makes the server vulnerable to a
+ * denial-of-service attack and other messy behavior. Instead, use a
+ * simple format string like "%s", followed by the string containing the
* untrusted data.
*/
#ifdef DOXYGEN
* @param ... The arguments to use to fill out fmt.
* @note ap_log_perror is implemented as a macro
* @note Use APLOG_MARK to fill out file, line, and module_index
- * @warning It is VERY IMPORTANT that you not include any raw data from
- * the network, such as the request-URI or request header fields, within
- * the format string. Doing so makes the server vulnerable to a
- * denial-of-service attack and other messy behavior. Instead, use a
- * simple format string like "%s", followed by the string containing the
+ * @warning It is VERY IMPORTANT that you not include any raw data from
+ * the network, such as the request-URI or request header fields, within
+ * the format string. Doing so makes the server vulnerable to a
+ * denial-of-service attack and other messy behavior. Instead, use a
+ * simple format string like "%s", followed by the string containing the
* untrusted data.
*/
#ifdef DOXYGEN
* @param ... The arguments to use to fill out fmt.
* @note ap_log_rerror is implemented as a macro
* @note Use APLOG_MARK to fill out file, line, and module_index
- * @warning It is VERY IMPORTANT that you not include any raw data from
- * the network, such as the request-URI or request header fields, within
- * the format string. Doing so makes the server vulnerable to a
- * denial-of-service attack and other messy behavior. Instead, use a
- * simple format string like "%s", followed by the string containing the
+ * @warning It is VERY IMPORTANT that you not include any raw data from
+ * the network, such as the request-URI or request header fields, within
+ * the format string. Doing so makes the server vulnerable to a
+ * denial-of-service attack and other messy behavior. Instead, use a
+ * simple format string like "%s", followed by the string containing the
* untrusted data.
*/
#ifdef DOXYGEN
* @note Use APLOG_MARK to fill out file, line, and module_index
* @note If a request_rec is available, use that with ap_log_rerror()
* in preference to calling this function.
- * @warning It is VERY IMPORTANT that you not include any raw data from
- * the network, such as the request-URI or request header fields, within
- * the format string. Doing so makes the server vulnerable to a
- * denial-of-service attack and other messy behavior. Instead, use a
- * simple format string like "%s", followed by the string containing the
+ * @warning It is VERY IMPORTANT that you not include any raw data from
+ * the network, such as the request-URI or request header fields, within
+ * the format string. Doing so makes the server vulnerable to a
+ * denial-of-service attack and other messy behavior. Instead, use a
+ * simple format string like "%s", followed by the string containing the
* untrusted data.
*/
#ifdef DOXYGEN
* @note If a request_rec is available, use that with ap_log_rerror()
* in preference to calling this function. This function is mainly useful for
* modules like mod_ssl to use before the request_rec is created.
- * @warning It is VERY IMPORTANT that you not include any raw data from
- * the network, such as the request-URI or request header fields, within
- * the format string. Doing so makes the server vulnerable to a
- * denial-of-service attack and other messy behavior. Instead, use a
- * simple format string like "%s", followed by the string containing the
+ * @warning It is VERY IMPORTANT that you not include any raw data from
+ * the network, such as the request-URI or request header fields, within
+ * the format string. Doing so makes the server vulnerable to a
+ * denial-of-service attack and other messy behavior. Instead, use a
+ * simple format string like "%s", followed by the string containing the
* untrusted data.
*/
#ifdef DOXYGEN
* @param p The pool to allocate out of
* @param program The program to run in the logging process
* @return The piped log structure
- * @note The log program is invoked as @p APR_PROGRAM_ENV,
+ * @note The log program is invoked as @p APR_PROGRAM_ENV,
* @see ap_open_piped_log_ex to modify this behavior
*/
AP_DECLARE(piped_log *) ap_open_piped_log(apr_pool_t *p, const char *program);
AP_DECLARE(apr_file_t *) ap_piped_log_write_fd(piped_log *pl);
/**
- * hook method to log error messages
+ * hook method to log error messages
* @ingroup hooks
* @param file The file in which this function is called
* @param line The line number on which this function is called
* @param s The server which we are logging for
* @param r The request which we are logging for
* @param pool Memory pool to allocate from
- * @param errstr message to log
+ * @param errstr message to log
*/
AP_DECLARE_HOOK(void, error_log, (const char *file, int line,
int module_index, int level,
* Read a request and fill in the fields.
* @param c The current connection
* @return The new request_rec
- */
+ */
request_rec *ap_read_request(conn_rec *c);
/**
/**
* Send error back to client.
* @param r The current request
- * @param recursive_error last arg indicates error status in case we get
- * an error in the process of trying to deal with an ErrorDocument
- * to handle some other error. In that case, we print the default
- * report for the first thing that went wrong, and more briefly report
+ * @param recursive_error last arg indicates error status in case we get
+ * an error in the process of trying to deal with an ErrorDocument
+ * to handle some other error. In that case, we print the default
+ * report for the first thing that went wrong, and more briefly report
* on the problem with the ErrorDocument.
*/
AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error);
AP_DECLARE(int) ap_set_keepalive(request_rec *r);
/**
- * Return the latest rational time from a request/mtime pair. Mtime is
+ * Return the latest rational time from a request/mtime pair. Mtime is
* returned unless it's in the future, in which case we return the current time.
* @param r The current request
* @param mtime The last modified time
* @param r The current request
* @param type The content type
* @return The content-type
- */
+ */
AP_DECLARE(const char *) ap_make_content_type(request_rec *r,
const char *type);
* @param force_weak Force the entity tag to be weak - it could be modified
* again in as short an interval.
* @return The entity tag
- */
+ */
AP_DECLARE(char *) ap_make_etag(request_rec *r, int force_weak);
/**
/**
* Implements condition GET rules for HTTP/1.1 specification. This function
- * inspects the client headers and determines if the response fulfills
+ * inspects the client headers and determines if the response fulfills
* the requirements specified.
* @param r The current request
* @return OK if the response fulfills the condition GET rules, some
*/
/**
- * Send an entire file to the client, using sendfile if supported by the
+ * Send an entire file to the client, using sendfile if supported by the
* current platform
* @param fd The file to send.
* @param r The current request
* @param length Amount of data to send
* @param nbytes Amount of data actually sent
*/
-AP_DECLARE(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t offset,
+AP_DECLARE(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);
#if APR_HAS_MMAP
* @return None.
*/
AP_DECLARE(void) ap_method_list_add(ap_method_list_t *l, const char *method);
-
+
/**
* Remove an HTTP method name from an ap_method_list_t structure.
*
* @return None.
*/
AP_DECLARE(void) ap_clear_method_list(ap_method_list_t *l);
-
+
/**
- * Set the content type for this request (r->content_type).
+ * Set the content type for this request (r->content_type).
* @param r The current request
* @param ct The new content type
- * @warning This function must be called to set r->content_type in order
+ * @warning This function must be called to set r->content_type in order
* for the AddOutputFilterByType directive to work correctly.
*/
AP_DECLARE(void) ap_set_content_type(request_rec *r, const char *ct);
*/
AP_DECLARE(int) ap_index_of_response(int status);
-/**
+/**
* Return the Status-Line for a given status code (excluding the
* HTTP-Version field). If an invalid or unknown status code is
- * passed, "500 Internal Server Error" will be returned.
+ * passed, "500 Internal Server Error" will be returned.
* @param status The HTTP status code
* @return The Status-Line
*/
/**
* Setup the client to allow Apache to read the request body.
* @param r The current request
- * @param read_policy How the server should interpret a chunked
+ * @param read_policy How the server should interpret a chunked
* transfer-encoding. One of: <pre>
* REQUEST_NO_BODY Send 413 error if message has any body
* REQUEST_CHUNKED_ERROR Send 411 error if body without Content-Length
AP_DECLARE(int) ap_setup_client_block(request_rec *r, int read_policy);
/**
- * Determine if the client has sent any data. This also sends a
+ * Determine if the client has sent any data. This also sends a
* 100 Continue response to HTTP/1.1 clients, so modules should not be called
* until the module is ready to read content.
* @warning Never call this function more than once.
* failing to read the request body would cause it to be interpreted
* as the next request on a persistent connection.
* @param r The current request
- * @return error status if request is malformed, OK otherwise
+ * @return error status if request is malformed, OK otherwise
*/
AP_DECLARE(int) ap_discard_request_body(request_rec *r);
* Setup the output headers so that the client knows how to authenticate
* itself the next time, if an authentication request failed.
* @param r The current request
- */
+ */
AP_DECLARE(void) ap_note_auth_failure(request_rec *r);
/**
* @deprecated @see ap_note_auth_failure
- */
+ */
AP_DECLARE(void) ap_note_basic_auth_failure(request_rec *r);
/**
* @deprecated @see ap_note_auth_failure
- */
+ */
AP_DECLARE(void) ap_note_digest_auth_failure(request_rec *r);
/**
* @param r The current request
* @param pw The password as set in the headers
* @return 0 (OK) if it set the 'pw' argument (and assured
- * a correct value in r->user); otherwise it returns
- * an error code, either HTTP_INTERNAL_SERVER_ERROR if things are
- * really confused, HTTP_UNAUTHORIZED if no authentication at all
- * seemed to be in use, or DECLINED if there was authentication but
- * it wasn't Basic (in which case, the caller should presumably
+ * a correct value in r->user); otherwise it returns
+ * an error code, either HTTP_INTERNAL_SERVER_ERROR if things are
+ * really confused, HTTP_UNAUTHORIZED if no authentication at all
+ * seemed to be in use, or DECLINED if there was authentication but
+ * it wasn't Basic (in which case, the caller should presumably
* decline as well).
*/
AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw);
/**
* parse_uri: break apart the uri
- * @warning Side Effects:
+ * @warning Side Effects:
* @li sets r->args to rest after '?' (or NULL if no '?')
* @li sets r->uri to request uri (without r->args part)
* @li sets r->hostname (if not set already) from request (scheme://host:port)
/**
* Get the next line of input for the request
*
- * Note: on ASCII boxes, ap_rgetline is a macro which simply calls
+ * Note: on ASCII boxes, ap_rgetline is a macro which simply calls
* ap_rgetline_core to get the line of input.
- *
+ *
* on EBCDIC boxes, ap_rgetline is a wrapper function which
* translates ASCII protocol lines to the local EBCDIC code page
* after getting the line of input.
- *
+ *
* @param s Pointer to the pointer to the buffer into which the line
* should be read; if *s==NULL, a buffer of the necessary size
* to hold the data will be allocated from the request pool
* Other errors where appropriate
*/
#if APR_CHARSET_EBCDIC
-AP_DECLARE(apr_status_t) ap_rgetline(char **s, apr_size_t n,
+AP_DECLARE(apr_status_t) ap_rgetline(char **s, apr_size_t n,
apr_size_t *read,
request_rec *r, int fold,
apr_bucket_brigade *bb);
#endif
/** @see ap_rgetline */
-AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
+AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
apr_size_t *read,
request_rec *r, int fold,
apr_bucket_brigade *bb);
* @return OK or DECLINED
*/
AP_DECLARE_HOOK(int,post_read_request,(request_rec *r))
-
+
/**
* This hook allows modules to perform any module-specific logging activities
* over and above the normal server things.
/**
* Make the bucket passed in an error bucket
* @param b The bucket to make into an error bucket
- * @param error The HTTP error code to put in the bucket.
+ * @param error The HTTP error code to put in the bucket.
* @param buf An optional error string to put in the bucket.
* @param p A pool to allocate out of.
* @return The new bucket, or NULL if allocation failed
/**
* Create a bucket referring to an HTTP error.
- * @param error The HTTP error code to put in the bucket.
+ * @param error The HTTP error code to put in the bucket.
* @param buf An optional error string to put in the bucket.
* @param p A pool to allocate the error string out of.
* @param list The bucket allocator from which to allocate the bucket
const request_rec *r,
ap_filter_t *next_filter);
/**
- * Create a subrequest for the given apr_dir_read result. This subrequest
+ * Create a subrequest for the given apr_dir_read result. This subrequest
* can be inspected to find information about the requested file
* @param finfo The apr_dir_read result to lookup
* @param r The current request
* @param next_filter The first filter the sub_request should use. If this is
* NULL, it defaults to the first filter for the main request
* @return The new request record
- * @note The apr_dir_read flags value APR_FINFO_MIN|APR_FINFO_NAME flag is the
+ * @note The apr_dir_read flags value APR_FINFO_MIN|APR_FINFO_NAME flag is the
* minimum recommended query if the results will be passed to apr_dir_read.
* The file info passed must include the name, and must have the same relative
* directory as the current request.
*/
void ap_process_request(request_rec *r);
-/* For post-processing after a handler has finished with a request.
+/* For post-processing after a handler has finished with a request.
* (Commonly used after it was suspended)
*/
AP_DECLARE(void) ap_process_request_after_handler(request_rec *r);
/**
* This hook allow modules to set the per_dir_config based on their own
- * context (such as "<Proxy>" sections) and responds to contextless requests
+ * context (such as "<Proxy>" sections) and responds to contextless requests
* such as TRACE that need no security or filesystem mapping.
* based on the filesystem.
* @param r The current request
- * @return DONE (or HTTP_) if this contextless request was just fulfilled
+ * @return DONE (or HTTP_) if this contextless request was just fulfilled
* (such as TRACE), OK if this is not a file, and DECLINED if this is a file.
* The core map_to_storage (HOOK_RUN_REALLY_LAST) will directory_walk
* and file_walk the r->filename.
- *
+ *
* @ingroup hooks
*/
AP_DECLARE_HOOK(int,map_to_storage,(request_rec *r))
* @ingroup hooks
*/
AP_DECLARE_HOOK(int,fixups,(request_rec *r))
-
+
/**
* This routine is called to determine and/or set the various document type
* information bits, like Content-type (via r->content_type), language, et
int nOrder, int type);
/**
- * Register a hook function that will apply additional access control
+ * Register a hook function that will apply additional access control
* and/or bypass authentication for the current request.
* @param pf An access_checker_ex hook function
* @param aszPre A NULL-terminated array of strings that name modules whose
AP_DECLARE(void) ap_init_vhost_config(apr_pool_t *p);
/**
- * called after the config has been read to compile the tables needed to do
+ * called after the config has been read to compile the tables needed to do
* the run-time vhost lookups
* @param p The pool to allocate out of
* @param main_server The start of the virtual host list
const char *ap_parse_vhost_addrs(apr_pool_t *p, const char *hostname, server_rec *s);
/**
- * handle NameVirtualHost directive
+ * handle NameVirtualHost directive
* @param cmd Command Parameters structure
* @param dummy NOT USED
* @param arg a host of the form "<address>[:port]"
* @return 0 on success, any non-zero return will stop the iteration.
*/
typedef int(*ap_vhost_iterate_conn_cb)(void* baton, conn_rec* conn, server_rec* s);
-
+
/**
* For every virtual host on this connection, call func_cb.
* @param conn The current connection
- * @param func_cb Function called for every Name Based Virtual Host for this
+ * @param func_cb Function called for every Name Based Virtual Host for this
* connection.
* @param baton Opaque object passed to func_cb.
* @return The return value from func_cb.
- * @note If func_cb returns non-zero, the function will return at this point,
+ * @note If func_cb returns non-zero, the function will return at this point,
* and not continue iterating the virtual hosts.
*/
AP_DECLARE(int) ap_vhost_iterate_given_conn(conn_rec *conn,
void* baton);
/**
- * given an ip address only, give our best guess as to what vhost it is
+ * given an ip address only, give our best guess as to what vhost it is
* @param conn The current connection
*/
AP_DECLARE(void) ap_update_vhost_given_ip(conn_rec *conn);
/**
- * ap_update_vhost_given_ip is never enough, and this is always called after
+ * ap_update_vhost_given_ip is never enough, and this is always called after
* the headers have been read. It may change r->server.
* @param r The current request
*/
#endif
#endif /* HTTPD_ROOT */
-/*
+/*
* --------- 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.
+ * 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
* directive.
*/
/** The timeout for waiting for messages */
#ifndef DEFAULT_TIMEOUT
-#define DEFAULT_TIMEOUT 300
+#define DEFAULT_TIMEOUT 300
#endif
/** The timeout for waiting for keepalive timeout until next request */
/** default limit on bytes in Request-Line (Method+URI+HTTP-version) */
#ifndef DEFAULT_LIMIT_REQUEST_LINE
#define DEFAULT_LIMIT_REQUEST_LINE 8190
-#endif
+#endif
/** default limit on bytes in any one header field */
#ifndef DEFAULT_LIMIT_REQUEST_FIELDSIZE
#define DEFAULT_LIMIT_REQUEST_FIELDSIZE 8190
-#endif
+#endif
/** default limit on number of request header fields */
#ifndef DEFAULT_LIMIT_REQUEST_FIELDS
#define DEFAULT_LIMIT_REQUEST_FIELDS 100
-#endif
+#endif
/**
* The default default character set name to add if AddDefaultCharset is
#define AP_MAX_REG_MATCH 10
/**
- * APR_HAS_LARGE_FILES introduces the problem of spliting sendfile into
- * mutiple buckets, no greater than MAX(apr_size_t), and more granular
+ * 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.
*/
/**
* Special Apache error codes. These are basically used
* in http_main.c so we can keep track of various errors.
- *
+ *
*/
/** a normal exit */
#define APEXIT_OK 0x0
#define APEXIT_INIT 0x2
/** The child died during its init sequence */
#define APEXIT_CHILDINIT 0x3
-/**
+/**
* The child exited due to a resource shortage.
* The parent should limit the rate of forking until
* the situation is resolved.
*/
#define APEXIT_CHILDSICK 0x7
-/**
+/**
* 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.
# define AP_CORE_DECLARE_NONSTD AP_DECLARE_NONSTD
#endif
-/**
- * @brief The numeric version information is broken out into fields within this
- * structure.
+/**
+ * @brief The numeric version information is broken out into fields within this
+ * structure.
*/
typedef struct {
int major; /**< major number */
#define OK 0 /**< Module has handled this stage. */
#define DECLINED -1 /**< Module declines to handle */
-#define DONE -2 /**< Module has served the response completely
+#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.
+#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.
/**
* @struct ap_method_list_t
- * @brief Structure for handling HTTP methods.
+ * @brief Structure for handling HTTP methods.
*
- * Methods known to the server are accessed via a bitmask shortcut;
+ * Methods known to the server are accessed via a bitmask shortcut;
* extension methods are handled by an array.
*/
struct ap_method_list_t {
#define CR '\r'
#define LF '\n'
#define CRLF "\r\n"
-#endif /* APR_CHARSET_EBCDIC */
+#endif /* APR_CHARSET_EBCDIC */
/** Useful for common code with either platform charset. */
#define CRLF_ASCII "\015\012"
/**
- * @defgroup values_request_rec_body Possible values for request_rec.read_body
+ * @defgroup values_request_rec_body Possible values for request_rec.read_body
* @{
* Possible values for request_rec.read_body (set by handling module):
*/
/** @} // values_request_rec_body */
/**
- * @defgroup values_request_rec_used_path_info Possible values for request_rec.used_path_info
+ * @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:
/* This comes after we have defined the request_rec type */
#include "apr_uri.h"
-/**
- * @brief A structure that represents one process
+/**
+ * @brief A structure that represents one process
*/
struct process_rec {
/** Global pool. Cleared upon normal exit */
int argc;
};
-/**
- * @brief A structure that represents the current request
+/**
+ * @brief A structure that represents the current request
*/
struct request_rec {
/** The pool associated with the request */
*/
apr_int64_t allowed;
/** Array of extension methods */
- apr_array_header_t *allowed_xmethods;
+ apr_array_header_t *allowed_xmethods;
/** List of allowed methods */
- ap_method_list_t *allowed_methods;
+ ap_method_list_t *allowed_methods;
/** byte count in stream is for body */
apr_off_t sent_bodyct;
/** Notes from one module to another */
apr_table_t *notes;
- /* content_type, handler, content_encoding, and all content_languages
+ /* 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.
*/
/** variant list validator (if negotiated) */
char *vlist_validator;
-
+
/** If an authentication check was made, this gets set to the user name. */
- char *user;
+ char *user;
/** If an authentication check was made, this gets set to the auth type. */
char *ap_auth_type;
*/
/** The URI without any parsing performed */
- char *unparsed_uri;
+ char *unparsed_uri;
/** The path portion of the URI, or "/" if no path provided */
char *uri;
/** The filename on disk corresponding to this response */
/** The PATH_INFO extracted from this request */
char *path_info;
/** The QUERY_ARGS extracted from this request */
- char *args;
+ char *args;
/**
- * Flag for the handler to accept or reject path_info on
+ * 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
+ * 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.
AP_CONN_KEEPALIVE
} ap_conn_keepalive_e;
-/**
- * @brief Structure to store things which are per connection
+/**
+ * @brief Structure to store things which are per connection
*/
struct conn_rec {
/** Pool associated with this connection */
char *local_host;
/** ID of this connection; unique at any point in time */
- long id;
+ long id;
/** Config vector containing pointers to connections per-server
* config structures. */
struct ap_conf_vector_t *conn_config;
struct apr_bucket_alloc_t *bucket_alloc;
/** The current state of this connection */
conn_state_t *cs;
- /** Is there data pending in the input filters? */
+ /** Is there data pending in the input filters? */
int data_in_input_filters;
/** Is there data pending in the output filters? */
int data_in_output_filters;
* the event mpm.
*/
unsigned int clogging_input_filters:1;
-
- /** have we done double-reverse DNS? -1 yes/failure, 0 not yet,
+
+ /** have we done double-reverse DNS? -1 yes/failure, 0 not yet,
* 1 yes/success */
signed int double_reverse:2;
#endif
};
-/**
- * Enumeration of connection states
+/**
+ * Enumeration of connection states
*/
typedef enum {
CONN_STATE_CHECK_REQUEST_LINE_READABLE,
CONN_STATE_LINGER_SHORT
} conn_state_e;
-/**
- * @brief A structure to contain connection state information
+/**
+ * @brief A structure to contain connection state information
*/
struct conn_state_t {
/** APR_RING of expiration timeouts */
/**
* @struct server_addr_rec
- * @brief A structure to be used for Per-vhost config
+ * @brief A structure to be used for Per-vhost config
*/
typedef struct server_addr_rec server_addr_rec;
struct server_addr_rec {
/** The log level for this server */
int level;
};
-/**
- * @brief A structure to store information for each virtual server
+/**
+ * @brief A structure to store information for each virtual server
*/
struct server_rec {
/** The process this server is running in */
/* Module-specific configuration for server, and defaults... */
- /** Config vector containing pointers to modules' per-server config
+ /** Config vector containing pointers to modules' per-server config
* structures. */
- struct ap_conf_vector_t *module_config;
+ struct ap_conf_vector_t *module_config;
/** MIME type info, etc., before we start checking per-directory info */
struct ap_conf_vector_t *lookup_defaults;
/** limit on size of any request header field */
int limit_req_fieldsize;
/** limit on number of request header fields */
- int limit_req_fields;
+ int limit_req_fields;
/** Opaque storage location */
apr_size_t bytes_in;
apr_size_t bytes_written;
} core_output_filter_ctx_t;
-
+
typedef struct core_filter_ctx {
apr_bucket_brigade *b;
apr_bucket_brigade *tmpbb;
} core_ctx_t;
-
+
typedef struct core_net_rec {
/** Connection to the client */
apr_socket_t *client_socket;
/** connection record */
conn_rec *c;
-
+
core_output_filter_ctx_t *out_ctx;
core_ctx_t *in_ctx;
} core_net_rec;
* @param word The string to check
* @return The string with the replaced environment variables
*/
-AP_DECLARE(const char *) ap_resolve_env(apr_pool_t *p, const char * word);
+AP_DECLARE(const char *) ap_resolve_env(apr_pool_t *p, const char * word);
/**
* 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
+ * @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.
*/
AP_DECLARE(const char *) ap_size_list_item(const char **field, int *len);
/**
* 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.
+ * 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
+ * @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.
*/
AP_DECLARE(char *) ap_get_list_item(apr_pool_t *p, const char **field);
/**
* Find an item in canonical form (lowercase, no extra spaces) within
- * an HTTP field value list.
+ * 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
AP_DECLARE(char *) ap_get_token(apr_pool_t *p, const char **accept_line, int accept_white);
/**
- * Find http tokens, see the definition of token from RFC2068
+ * 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
* @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,
+ * @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. */
AP_DECLARE(char *) ap_make_dirstr_prefix(char *d, const char *s, int n);
* @param string The plaintext string
* @return The encoded string
*/
-AP_DECLARE(char *) ap_pbase64encode(apr_pool_t *p, char *string);
+AP_DECLARE(char *) ap_pbase64encode(apr_pool_t *p, char *string);
/**
* Compile a regular expression to be used later. The regex is freed when
AP_DECLARE(void) ap_pregfree(apr_pool_t *p, ap_regex_t *reg);
/**
- * After performing a successful regex match, you may use this function to
+ * 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 input An arbitrary string containing $1 through $9. These are
+ * @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
/**
* convert a string to all lowercase
- * @param s The string to convert to lowercase
+ * @param s The string to convert to lowercase
*/
AP_DECLARE(void) ap_str_tolower(char *s);
/**
* convert a string to all uppercase
- * @param s The string to convert to uppercase
+ * @param s The string to convert to uppercase
*/
AP_DECLARE(void) ap_str_toupper(char *s);
/**
- * Search a string from left to right for the first occurrence of a
+ * Search a string from left to right for the first occurrence of a
* specific character
* @param str The string to search
* @param c The character to search for
AP_DECLARE(int) ap_ind(const char *str, char c); /* Sigh... */
/**
- * Search a string from right to left for the first occurrence of a
+ * Search a string from right to left for the first occurrence of a
* specific character
* @param str The string to search
* @param c The character to search for
* 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
+ * @return A copy of the string with escaped quotes
*/
AP_DECLARE(char *) ap_escape_quotes(apr_pool_t *p, const char *instring);
* @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
+ * @return A copy of the string with the PID appended
*/
AP_DECLARE(char *) ap_append_pid(apr_pool_t *p, const char *string,
const char *delim);
* @return truth value
*/
AP_DECLARE(int) ap_request_has_body(request_rec *r);
-
+
/**
* Cleanup a string (mainly to be filesystem safe)
* We only allow '_' and alphanumeric chars. Non-printable
/**
* Structure to store the contents of an HTTP form of the type
* application/x-www-form-urlencoded.
- *
+ *
* Currently it contains the name as a char* of maximum length
* HUGE_STRING_LEN, and a value in the form of a bucket brigade
* of arbitrary length.
/* 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 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 p The pool to allocate from
* @param name The name of the object to check
* @return 1 if it is a directory, 0 otherwise
*/
AP_DECLARE(void) ap_log_assert(const char *szExp, const char *szFile, int nLine)
__attribute__((noreturn));
-/**
+/**
* @internal Internal Assert function
*/
#define ap_assert(exp) ((exp) ? (void)0 : ap_log_assert(#exp,__FILE__,__LINE__))
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
+ 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.
*/
#include <string.h>
* @fn void ap_basic_http_header(request_rec *r, apr_bucket_brigade *bb)
*/
AP_DECLARE(void) ap_basic_http_header(request_rec *r, apr_bucket_brigade *bb);
-
+
/**
* Send an appropriate response to an http TRACE request.
* @param r The current request
* by listen(2). Under some systems, it should be increased if you
* are experiencing a heavy TCP SYN flood attack.
*
- * It defaults to 511 instead of 512 because some systems store it
- * as an 8-bit datatype; 512 truncated to 8-bits is 0, while 511 is
+ * It defaults to 511 instead of 512 because some systems store it
+ * as an 8-bit datatype; 512 truncated to 8-bits is 0, while 511 is
* 255 when truncated.
*/
#ifndef DEFAULT_LISTENBACKLOG
#define DEFAULT_LISTENBACKLOG 511
#endif
-
+
/* Signal used to gracefully restart */
#define AP_SIG_GRACEFUL SIGUSR1
void ap_relieve_child_processes(ap_reclaim_callback_fn_t *mpm_callback);
/**
- * Tell ap_reclaim_child_processes() and ap_relieve_child_processes() about
+ * Tell ap_reclaim_child_processes() and ap_relieve_child_processes() about
* an MPM child process which has no entry in the scoreboard.
* @param pid The process id of an MPM child process which should be
* reclaimed when ap_reclaim_child_processes() is called.
* Run the monitor hook (once every ten calls), determine if any child
* process has died and, if none died, sleep one second.
* @param status The return code if a process has died
- * @param exitcode The returned exit status of the child, if a child process
+ * @param exitcode The returned exit status of the child, if a child process
* dies, or the signal that caused the child to die.
* @param ret The process id of the process that died
* @param p The pool to allocate out of
* @param s The server_rec to pass
*/
-void ap_wait_or_timeout(apr_exit_why_e *status, int *exitcode, apr_proc_t *ret,
+void ap_wait_or_timeout(apr_exit_why_e *status, int *exitcode, apr_proc_t *ret,
apr_pool_t *p, server_rec *s);
/**
/**
* The initgroups() function initializes the group access list by reading the
* group database /etc/group and using all groups of which user is a member.
- * The additional group basegid is also added to the list.
+ * The additional group basegid is also added to the list.
* @param name The user name - must be non-NULL
* @param basegid The basegid to add
* @return returns 0 on success
* core's pre-config hook
*/
void mpm_common_pre_config(apr_pool_t *pconf);
-
+
#ifdef __cplusplus
}
#endif
#define DEFAULT_SCOREBOARD "logs/apache_runtime_status"
#endif
-/* Scoreboard info on a process is, for now, kept very brief ---
+/* Scoreboard info on a process is, for now, kept very brief ---
* just status value and pid (the latter so that the caretaker process
* can properly update the scoreboard when a process dies). We may want
* to eventually add a separate set of long_score structures which would
*/
typedef int ap_generation_t;
-/* Is the scoreboard shared between processes or not?
+/* Is the scoreboard shared between processes or not?
* Set by the MPM when the scoreboard is created.
*/
typedef enum {
AP_DECLARE(void) ap_create_sb_handle(ap_sb_handle_t **new_sbh, apr_pool_t *p,
int child_num, int thread_num);
-
+
AP_DECLARE(int) ap_find_child_by_pid(apr_proc_t *pid);
AP_DECLARE(int) ap_update_child_status(ap_sb_handle_t *sbh, int status, request_rec *r);
AP_DECLARE(int) ap_update_child_status_from_indexes(int child_num, int thread_num,
/**
* Hook for post scoreboard creation, pre mpm.
* @param p Apache pool to allocate from.
- * @param sb_type
+ * @param sb_type
* @ingroup hooks
* @return OK or DECLINE on success; anything else is a error
- */
+ */
AP_DECLARE_HOOK(int, pre_mpm, (apr_pool_t *p, ap_scoreboard_e sb_type))
/* for time_process_request() in http_main.c */
typedef struct ap_directive_t ap_directive_t;
/**
- * @brief Structure used to build the config tree.
+ * @brief Structure used to build the config tree.
*
* The config tree only stores
* the directives that will be active in the running server. Directives
struct ap_directive_t {
/** The current directive */
const char *directive;
- /** The arguments for the current directive, stored as a space
+ /** The arguments for the current directive, stored as a space
* separated list */
const char *args;
/** The next directive node in the tree */
* @param child Is the node to add a child node
* @return the added node
*/
-ap_directive_t *ap_add_node(ap_directive_t **parent, ap_directive_t *current,
+ap_directive_t *ap_add_node(ap_directive_t **parent, ap_directive_t *current,
ap_directive_t *toadd, int child);
#ifdef __cplusplus
#include "apr_xlate.h"
-/** On EBCDIC machine this is a translation handle used to translate the
+/** On EBCDIC machine this is a translation handle used to translate the
* headers from the local machine format to ASCII for network transmission.
* On an ASCII machine this is NULL */
extern apr_xlate_t *ap_hdrs_to_ascii;
extern apr_xlate_t *ap_hdrs_from_ascii;
#endif /* APR_CHARSET_EBCDIC */
-
+
#ifdef __cplusplus
}
#endif
/** The filter should return at most readbytes data. */
AP_MODE_READBYTES,
/** The filter should return at most one line of CRLF data.
- * (If a potential line is too long or no CRLF is found, the
+ * (If a potential line is too long or no CRLF is found, the
* filter may return partial data).
*/
AP_MODE_GETLINE,
*
* Callbacks are associated with a filter definition, which is specified
* by name. See ap_register_input_filter() and ap_register_output_filter()
- * for setting the association between a name for a filter and its
+ * for setting the association between a name for a filter and its
* associated callback (and other information).
*
* If the initialization function argument passed to the registration
* For the input and output filters, the return value of a filter should be
* an APR status value. For the init function, the return value should
* be an HTTP error code or OK if it was successful.
- *
+ *
* @ingroup filter
* @{
*/
typedef apr_status_t (*ap_out_filter_func)(ap_filter_t *f,
apr_bucket_brigade *b);
typedef apr_status_t (*ap_in_filter_func)(ap_filter_t *f,
- apr_bucket_brigade *b,
+ apr_bucket_brigade *b,
ap_input_mode_t mode,
apr_read_type_e block,
apr_off_t readbytes);
/** Providers for this filter */
ap_filter_provider_t *providers;
- /** The type of filter, either AP_FTYPE_CONTENT or AP_FTYPE_CONNECTION.
- * An AP_FTYPE_CONTENT filter modifies the data based on information
- * found in the content. An AP_FTYPE_CONNECTION filter modifies the
+ /** The type of filter, either AP_FTYPE_CONTENT or AP_FTYPE_CONNECTION.
+ * An AP_FTYPE_CONTENT filter modifies the data based on information
+ * found in the content. An AP_FTYPE_CONNECTION filter modifies the
* data based on the type of connection.
*/
ap_filter_type ftype;
};
/**
- * @brief The representation of a filter chain.
+ * @brief The representation of a filter chain.
*
* Each request has a list
* of these structures which are called in turn to filter the data. Sub
/**
* Get the current bucket brigade from the next filter on the filter
- * stack. The filter returns an apr_status_t value. If the bottom-most
+ * stack. The filter returns an apr_status_t value. If the bottom-most
* filter doesn't read from the network, then ::AP_NOBODY_READ is returned.
* The bucket brigade will be empty when there is nothing left to get.
* @param filter The next filter in the chain
* ::APR_BLOCK_READ, ::APR_NONBLOCK_READ
* @param readbytes How many bytes to read from the next filter.
*/
-AP_DECLARE(apr_status_t) ap_get_brigade(ap_filter_t *filter,
- apr_bucket_brigade *bucket,
+AP_DECLARE(apr_status_t) ap_get_brigade(ap_filter_t *filter,
+ apr_bucket_brigade *bucket,
ap_input_mode_t mode,
- apr_read_type_e block,
+ apr_read_type_e block,
apr_off_t readbytes);
/**
* Pass the current bucket brigade down to the next filter on the filter
- * stack. The filter returns an apr_status_t value. If the bottom-most
+ * stack. The filter returns an apr_status_t value. If the bottom-most
* filter doesn't write to the network, then ::AP_NOBODY_WROTE is returned.
* @param filter The next filter in the chain
* @param bucket The current bucket brigade
apr_bucket_brigade *bucket);
/**
- * This function is used to register an input filter with the system.
- * After this registration is performed, then a filter may be added
- * into the filter chain by using ap_add_input_filter() and simply
+ * This function is used to register an input filter with the system.
+ * After this registration is performed, then a filter may be added
+ * into the filter chain by using ap_add_input_filter() and simply
* specifying the name.
*
* @param name The name to attach to the filter function
* @param filter_func The filter function to name
- * @param filter_init The function to call before the filter handlers
+ * @param filter_init The function to call before the filter handlers
are invoked
* @param ftype The type of filter function, either ::AP_FTYPE_CONTENT_SET or
* ::AP_FTYPE_CONNECTION
*/
/**
- * This function is used to register an output filter with the system.
- * After this registration is performed, then a filter may be added
+ * This function is used to register an output filter with the system.
+ * After this registration is performed, then a filter may be added
* directly to the filter chain by using ap_add_output_filter() and
* simply specifying the name, or as a provider under mod_filter.
*
* @param name The name to attach to the filter function
* @param filter_func The filter function to name
- * @param filter_init The function to call before the filter handlers
+ * @param filter_init The function to call before the filter handlers
* are invoked
* @param ftype The type of filter function, either ::AP_FTYPE_CONTENT_SET or
* ::AP_FTYPE_CONNECTION
* calls to ap_add_filter). If the current filter chain contains filters
* from another request, then this filter will be added before those other
* filters.
- *
+ *
* To re-iterate that last comment. This function is building a FIFO
* list of filters. Take note of that when adding your filter to the chain.
*
* object r must be passed in to ensure the filter chains are modified
* correctly. f->r will still be initialized as NULL in the new filter.
*/
-AP_DECLARE(ap_filter_t *) ap_add_output_filter(const char *name, void *ctx,
+AP_DECLARE(ap_filter_t *) ap_add_output_filter(const char *name, void *ctx,
request_rec *r, conn_rec *c);
/**
*/
/**
- * prepare a bucket brigade to be setaside. If a different brigade was
+ * prepare a bucket brigade to be setaside. If a different brigade was
* set-aside earlier, then the two brigades are concatenated together.
* @param f The current filter
* @param save_to The brigade that was previously set-aside. Regardless, the
*/
AP_DECLARE(apr_status_t) ap_save_brigade(ap_filter_t *f,
apr_bucket_brigade **save_to,
- apr_bucket_brigade **b, apr_pool_t *p);
+ apr_bucket_brigade **b, apr_pool_t *p);
/**
* Flush function for apr_brigade_* calls. This calls ap_pass_brigade
apr_bucket_brigade *bb,
const char *fmt,
...)
- __attribute__((format(printf,3,4)));
+ __attribute__((format(printf,3,4)));
/**
* set protocol requirements for an output content filter
#include "http_request.h"
#include "apr_optional.h"
-/* Create a set of LDAP_DECLARE macros with appropriate export
+/* Create a set of LDAP_DECLARE macros with appropriate export
* and import tags for the platform
*/
#if !defined(WIN32)
/* Values that the deref member can have */
typedef enum {
- never=LDAP_DEREF_NEVER,
- searching=LDAP_DEREF_SEARCHING,
- finding=LDAP_DEREF_FINDING,
+ never=LDAP_DEREF_NEVER,
+ searching=LDAP_DEREF_SEARCHING,
+ finding=LDAP_DEREF_FINDING,
always=LDAP_DEREF_ALWAYS
} deref_options;
apr_array_header_t *client_certs; /* Client certificates */
} util_ldap_config_t;
-/* LDAP cache state information */
+/* LDAP cache state information */
typedef struct util_ldap_state_t {
apr_pool_t *pool; /* pool from which this state is allocated */
#if APR_HAS_THREADS
* @fn int util_ldap_connection_open(request_rec *r,
* util_ldap_connection_t *ldc)
*/
-APR_DECLARE_OPTIONAL_FN(int,uldap_connection_open,(request_rec *r,
+APR_DECLARE_OPTIONAL_FN(int,uldap_connection_open,(request_rec *r,
util_ldap_connection_t *ldc));
/**
* @param binddn The DN to bind with
* @param bindpw The password to bind with
* @param deref The dereferencing behavior
- * @param secure use SSL on the connection
+ * @param secure use SSL on the connection
* @tip Once a connection is found and returned, a lock will be acquired to
* lock that particular connection, so that another thread does not try and
* use this connection while it is busy. Once you are finished with a connection,
* const char *url, const char *dn, const char *reqdn,
* int compare_dn_on_server)
*/
-APR_DECLARE_OPTIONAL_FN(int,uldap_cache_comparedn,(request_rec *r, util_ldap_connection_t *ldc,
- const char *url, const char *dn, const char *reqdn,
+APR_DECLARE_OPTIONAL_FN(int,uldap_cache_comparedn,(request_rec *r, util_ldap_connection_t *ldc,
+ const char *url, const char *dn, const char *reqdn,
int compare_dn_on_server));
/**
* @param url The URL of the LDAP connection - used for deciding which cache to use.
* @param dn The DN of the object in which we do the compare.
* @param attrib The attribute within the object we are comparing for.
- * @param value The value of the attribute we are trying to compare for.
+ * @param value The value of the attribute we are trying to compare for.
* @tip Use this function to determine whether an attribute/value pair exists within an
* object. Typically this would be used to determine LDAP top-level group
* membership.
* stored. If this mutex is disabled, mutex will be set to NULL on
* output. (That is allowed only if the AP_MUTEX_ALLOW_NONE flag is
* passed to ap_mutex_register().)
- * @param name The generated filename of the created mutex, or NULL if
+ * @param name The generated filename of the created mutex, or NULL if
* no file was created. Pass NULL if this result is not needed.
* @param type The type name of the mutex, matching the type name passed
* to ap_mutex_register().
* stored. If this mutex is disabled, mutex will be set to NULL on
* output. (That is allowed only if the AP_MUTEX_ALLOW_NONE flag is
* passed to ap_mutex_register().)
- * @param name The generated filename of the created mutex, or NULL if
+ * @param name The generated filename of the created mutex, or NULL if
* no file was created. Pass NULL if this result is not needed.
* @param type The type name of the mutex, matching the type name passed
* to ap_mutex_register().
AP_DECLARE(int) ap_find_path_info(const char *uri, const char *path_info);
/**
- * Add CGI environment variables required by HTTP/1.1 to the request's
+ * Add CGI environment variables required by HTTP/1.1 to the request's
* environment table
* @param r the current request
* @fn void ap_add_cgi_vars(request_rec *r)
* @param r The current request
* @param f The file to read from
* @param buffer Empty when calling the function. On output, if there was an
- * error, the string that cause the error is stored here.
+ * error, the string that cause the error is stored here.
* @return HTTP_OK on success, HTTP_INTERNAL_SERVER_ERROR otherwise
* @fn int ap_scan_script_header_err(request_rec *r, apr_file_t *f, char *buffer)
- */
+ */
AP_DECLARE(int) ap_scan_script_header_err(request_rec *r, apr_file_t *f, char *buffer);
/**
* @param r The current request
* @param bb The brigade from which to read
* @param buffer Empty when calling the function. On output, if there was an
- * error, the string that cause the error is stored here.
+ * error, the string that cause the error is stored here.
* @return HTTP_OK on success, HTTP_INTERNAL_SERVER_ERROR otherwise
* @fn int ap_scan_script_header_err_brigade(request_rec *r, apr_bucket_brigade *bb, char *buffer)
- */
+ */
AP_DECLARE(int) ap_scan_script_header_err_brigade(request_rec *r,
apr_bucket_brigade *bb,
char *buffer);
* current request
* @param r The current request
* @param buffer Empty when calling the function. On output, if there was an
- * error, the string that cause the error is stored here.
+ * error, the string that cause the error is stored here.
* @param termch Pointer to the last character parsed.
* @param termarg Pointer to an int to capture the last argument parsed.
- *
- * The varargs are string arguments to parse consecutively for headers,
+ *
+ * The varargs are string arguments to parse consecutively for headers,
* with a NULL argument to terminate the list.
*
* @return HTTP_OK on success, HTTP_INTERNAL_SERVER_ERROR otherwise
- */
-AP_DECLARE_NONSTD(int) ap_scan_script_header_err_strs(request_rec *r,
- char *buffer,
+ */
+AP_DECLARE_NONSTD(int) ap_scan_script_header_err_strs(request_rec *r,
+ char *buffer,
const char **termch,
int *termarg, ...)
ap_func_attr_sentinel;
* current request
* @param r The current request
* @param buffer Empty when calling the function. On output, if there was an
- * error, the string that cause the error is stored here.
+ * error, the string that cause the error is stored here.
* @param getsfunc Function to read the headers from. This function should
act like gets()
* @param getsfunc_data The place to read from
* @return HTTP_OK on success, HTTP_INTERNAL_SERVER_ERROR otherwise
- */
+ */
AP_DECLARE(int) ap_scan_script_header_err_core(request_rec *r, char *buffer,
int (*getsfunc) (char *, int, void *),
void *getsfunc_data);
/**
* format a recent timestamp in the ctime() format.
* @param date_str String to write to.
- * @param t the time to convert
+ * @param t the time to convert
* @note Consider using ap_recent_ctime_ex instead.
* @return APR_SUCCESS iff successful
*/
/**
* format a recent timestamp in an extended ctime() format.
* @param date_str String to write to.
- * @param t the time to convert
+ * @param t the time to convert
* @param option Additional formatting options (AP_CTIME_OPTION_*).
* @param len Pointer to an int containing the length of the provided buffer.
* On successful return it contains the number of bytes written to the
/**
* format a recent timestamp in the RFC822 format
* @param date_str String to write to (must have length >= APR_RFC822_DATE_LEN)
- * @param t the time to convert
+ * @param t the time to convert
*/
AP_DECLARE(apr_status_t) ap_recent_rfc822_date(char *date_str, apr_time_t t);
#define MOD_AUTHZ_DBD_H
#include "httpd.h"
-/* Create a set of AUTHZ_DBD_DECLARE(type), AUTHZ_DBD_DECLARE_NONSTD(type) and
+/* Create a set of AUTHZ_DBD_DECLARE(type), AUTHZ_DBD_DECLARE_NONSTD(type) and
* AUTHZ_DBD_DECLARE_DATA with appropriate export and import tags
*/
#if !defined(WIN32)
/**
* @file mod_unixd.h
- * @brief common stuff that unix MPMs will want
+ * @brief common stuff that unix MPMs will want
*
* @addtogroup APACHE_OS_UNIX
* @{
typedef struct isapi_cid isapi_cid;
typedef struct isapi_cid *HCONN;
-/* Prototypes of the essential functions exposed by mod_isapi
+/* Prototypes of the essential functions exposed by mod_isapi
* for the module to communicate with Apache.
*/
-typedef int (APR_THREAD_FUNC
+typedef int (APR_THREAD_FUNC
*PFN_GETSERVERVARIABLE)(HCONN cid,
char *variable_name,
void *buf_data,
apr_uint32_t *buf_size);
-typedef int (APR_THREAD_FUNC
- *PFN_WRITECLIENT)(HCONN cid,
+typedef int (APR_THREAD_FUNC
+ *PFN_WRITECLIENT)(HCONN cid,
void *buf_data,
apr_uint32_t *buf_size,
apr_uint32_t flags);
-typedef int (APR_THREAD_FUNC
- *PFN_READCLIENT)(HCONN cid,
+typedef int (APR_THREAD_FUNC
+ *PFN_READCLIENT)(HCONN cid,
void *buf_data,
apr_uint32_t *buf_size);
-typedef int (APR_THREAD_FUNC
+typedef int (APR_THREAD_FUNC
*PFN_SERVERSUPPORTFUNCTION)(HCONN cid,
apr_uint32_t HSE_code,
void *buf_data,
PFN_SERVERSUPPORTFUNCTION ServerSupportFunction;
} EXTENSION_CONTROL_BLOCK;
-/* Status/Headers structure to pass to HSE_SEND_HEADER_EX,
+/* Status/Headers structure to pass to HSE_SEND_HEADER_EX,
* an MS extension to ServerSupportFunction
*/
typedef struct HSE_SEND_HEADER_EX_INFO {
const char * pszStatus; /* HTTP status text, such as "200 OK" */
const char * pszHeader; /* HTTP header lines text, such as
* "Content-type: text/plain\r\n"
- * "Content-Language: en\r\n"
+ * "Content-Language: en\r\n"
* Note that (in spite of cchFoo lengths below)
* NULL characters will interfere in headers.
*/
* relation to Apache; the rules that the Apache server obeys follow
* its own design and HTTP protocol filter rules.
*
- * We do not support async, however, we fake it. If HSE_IO_SYNC is
+ * We do not support async, however, we fake it. If HSE_IO_SYNC is
* not passed, and a completion context was defined, we will invoke the
* completion function immediately following the transfer, and then
* return to the caller. If HSE_IO_SYNC is passed, there is no call
#define HSE_IO_DISCONNECT_AFTER_SEND 4
#define HSE_IO_NODELAY 4096
-/* The Completion function prototype. This callback may be fixed with
+/* The Completion function prototype. This callback may be fixed with
* the HSE_REQ_IO_COMPLETION ServerSupportFunction call, or overriden
* for the HSE_REQ_TRANSMIT_FILE call.
*/
*/
void *pContext;
apr_os_file_t hFile; /* HANDLE/fd to transmit */
- const char *pszStatusCode; /* Ignored if HSE_IO_SEND_HEADERS is
+ const char *pszStatusCode; /* Ignored if HSE_IO_SEND_HEADERS is
* not set. Includes HTTP status text
* plus header text lines, such as
* "200 OK\r\n"
#define HSE_REQ_SEND_URL 2
#define HSE_REQ_SEND_RESPONSE_HEADER 3
#define HSE_REQ_DONE_WITH_SESSION 4
-
+
/* MS Extented methods to ISAPI ServerSupportFunction() HSE_code */
#define HSE_REQ_MAP_URL_TO_PATH 1001 /* Emulated */
#define HSE_REQ_GET_SSPI_INFO 1002 /* Not Supported */
#define HSE_REQ_IS_CONNECTED 1018 /* Supported */
#define HSE_REQ_EXTENSION_TRIGGER 1020 /* Not Supported */
-/* The request entry point that must be exported by every ISAPI handler
+/* The request entry point that must be exported by every ISAPI handler
*/
apr_uint32_t APR_THREAD_FUNC HttpExtensionProc(EXTENSION_CONTROL_BLOCK *ecb);
-typedef apr_uint32_t (APR_THREAD_FUNC
+typedef apr_uint32_t (APR_THREAD_FUNC
*PFN_HTTPEXTENSIONPROC)(EXTENSION_CONTROL_BLOCK *ecb);
-/* Allowable return values from HttpExtensionProc (apparently 0 is also
+/* Allowable return values from HttpExtensionProc (apparently 0 is also
* accepted by MS IIS, and we will respect it as Success.)
* If the HttpExtensionProc returns HSE_STATUS_PENDING, we will create
* a wait mutex and lock on it, until HSE_REQ_DONE_WITH_SESSION is called.
#define HSE_TERM_ADVISORY_UNLOAD 2
/* The shutdown entry point óptionally exported by an ISAPI handler, passed
- * HSE_TERM_MUST_UNLOAD or HSE_TERM_ADVISORY_UNLOAD. The module may return
+ * HSE_TERM_MUST_UNLOAD or HSE_TERM_ADVISORY_UNLOAD. The module may return
* if passed HSE_TERM_ADVISORY_UNLOAD, and the module will remain loaded.
- * If the module returns 1 to HSE_TERM_ADVISORY_UNLOAD it is immediately
- * unloaded. If the module is passed HSE_TERM_MUST_UNLOAD, its return value
+ * If the module returns 1 to HSE_TERM_ADVISORY_UNLOAD it is immediately
+ * unloaded. If the module is passed HSE_TERM_MUST_UNLOAD, its return value
* is ignored.
*/
int APR_THREAD_FUNC TerminateExtension(apr_uint32_t flags);
* @param key_entry callback to get the key of a entry
* @param free_entry callback to free an entry
*/
-cache_cache_t* cache_init(int max_entries,
+cache_cache_t* cache_init(int max_entries,
apr_size_t max_size,
cache_pqueue_get_priority get_pri,
cache_pqueue_set_priority set_pri,
* @param key the key
*/
void* cache_find(cache_cache_t* c, const char *key);
-/**
+/**
* insert a entry into the cache
* @param c the cache
* @param entry the entry
*/
void cache_update(cache_cache_t* c, void *entry);
-/**
+/**
* insert a entry into the cache
* @param c the cache
* @param entry the entry
* @returns the entry or NULL
*/
void* cache_pop(cache_cache_t* c);
-/**
- * remove an item from the cache
+/**
+ * remove an item from the cache
* @param c the cache
* @param entry the actual entry (from a find)
*/
/**
* Create a hash table.
- * @param size
+ * @param size
* @return The hash table just created
*/
cache_hash_t* cache_hash_make(apr_size_t size);
* @param *ht Pointer to the hash table to be freed.
* @return void
* @remark The caller should ensure that all objects have been removed
- * from the cache prior to calling cache_hash_free(). Objects
+ * from the cache prior to calling cache_hash_free(). Objects
* not removed from the cache prior to calling cache_hash_free()
* will be unaccessable.
*/
/**
* Continue iterating over the entries in a hash table.
* @param hi The iteration state
- * @return a pointer to the updated iteration state. NULL if there are no more
+ * @return a pointer to the updated iteration state. NULL if there are no more
* entries.
*/
cache_hash_index_t* cache_hash_next(cache_hash_index_t *hi);
* @remark The return pointers should point to a variable that will be set to the
* corresponding data, or they may be NULL if the data isn't interesting.
*/
-void cache_hash_this(cache_hash_index_t *hi, const void **key,
+void cache_hash_this(cache_hash_index_t *hi, const void **key,
apr_ssize_t *klen, void **val);
/**
* @param out the output handle
* @param print the callback function to print the entry
*/
-void cache_pq_print(cache_pqueue_t *q,
- FILE *out,
+void cache_pq_print(cache_pqueue_t *q,
+ FILE *out,
cache_pqueue_print_entry print);
/**
* @param out the output handle
* @param print the callback function to print the entry
*/
-void cache_pq_dump(cache_pqueue_t *q,
+void cache_pq_dump(cache_pqueue_t *q,
FILE *out,
cache_pqueue_print_entry print);
/**
* @file mod_so.h
* @brief Shared Object Loader Extension Module for Apache
- *
+ *
* @defgroup MOD_SO mod_so
* @ingroup APACHE_MODS
* @{
typedef struct ap_watchdog_t ap_watchdog_t;
-/* Create a set of AP_WD_DECLARE(type), AP_WD_DECLARE_NONSTD(type) and
+/* Create a set of AP_WD_DECLARE(type), AP_WD_DECLARE_NONSTD(type) and
* AP_WD_DECLARE_DATA with appropriate export and import tags for the platform
*/
#if !defined(AP_WD_DECLARE)
/**
* Watchdog require hook.
- * @param s The server record
+ * @param s The server record
* @param name Watchdog name.
* @param parent Non-zero to indicate the parent process watchdog mode.
* @param singleton Non-zero to indicate the singleton watchdog mode.
/**
* Watchdog initialize hook.
* It is called after the watchdog thread is initialized.
- * @param s The server record
+ * @param s The server record
* @param name Watchdog name.
* @param pool The pool used to create the watchdog.
*/
/**
* Watchdog terminate hook.
* It is called when the watchdog thread is terminated.
- * @param s The server record
+ * @param s The server record
* @param name Watchdog name.
* @param pool The pool used to create the watchdog.
*/
/**
* Fixed interval watchdog hook.
* It is called regularly on @p AP_WD_TM_INTERVAL interval.
- * @param s The server record
+ * @param s The server record
* @param name Watchdog name.
* @param pool Temporary pool destroyed after the call.
*/
* http://www.apache.org/~niq/dbd.html
* or
* http://apache.webthing.com/database/
- *
+ *
* @defgroup MOD_DBD mod_dbd
* @ingroup APACHE_MODS
* @{
#ifndef DBD_H
#define DBD_H
-/* Create a set of DBD_DECLARE(type), DBD_DECLARE_NONSTD(type) and
+/* Create a set of DBD_DECLARE(type), DBD_DECLARE_NONSTD(type) and
* DBD_DECLARE_DATA with appropriate export and import tags for the platform
*/
#if !defined(WIN32)
* Use is subject to license terms.
*
* Copyright (c) 1984 AT&T
- * All Rights Reserved
+ * All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0.
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied.
+ * http://www.apache.org/licenses/LICENSE-2.0.
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License.
*/
#ifndef LIBSED_H
/**
* @file mod_include.h
* @brief Server Side Include Filter Extension Module for Apache
- *
+ *
* @defgroup MOD_INCLUDE mod_include
* @ingroup APACHE_MODS
* @{
(include_ctx_t *ctx, const char *in, char *out,
apr_size_t length, int leave_name));
-APR_DECLARE_OPTIONAL_FN(void, ap_register_include_handler,
+APR_DECLARE_OPTIONAL_FN(void, ap_register_include_handler,
(char *tag, include_handler_fn_t *func));
#endif /* MOD_INCLUDE */
#ifndef _MOD_RATELIMIT_H_
#define _MOD_RATELIMIT_H_
-/* Create a set of AP_RL_DECLARE(type), AP_RL_DECLARE_NONSTD(type) and
+/* Create a set of AP_RL_DECLARE(type), AP_RL_DECLARE_NONSTD(type) and
* AP_RL_DECLARE_DATA with appropriate export and import tags for the platform
*/
#if !defined(WIN32)
* Copyright (c) 2005, 2008 Sun Microsystems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
- * Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
- * All Rights Reserved
+ * Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+ * All Rights Reserved
*
* University Copyright- Copyright (c) 1982, 1986, 1988
* The Regents of the University of California
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0.
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied.
+ * http://www.apache.org/licenses/LICENSE-2.0.
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License.
*/
#ifndef _REGEXP_H
* Use is subject to license terms.
*
* Copyright (c) 1984 AT&T
- * All Rights Reserved
+ * All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0.
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied.
+ * http://www.apache.org/licenses/LICENSE-2.0.
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License.
*/
#ifndef _SED_H
/**
* @file mod_cgi.h
* @brief CGI Script Execution Extension Module for Apache
- *
+ *
* @defgroup MOD_CGI mod_cgi
* @ingroup APACHE_MODS
* @{
* @param p The pool to allocate correct cmd/argv elements within.
* @param e_info pass e_info.cmd_type (Set to APR_SHELLCMD or APR_PROGRAM on entry)
and e_info.detached (Should the child start in detached state?)
- * @remark This callback may be registered by the os-specific module
+ * @remark This callback may be registered by the os-specific module
* to correct the command and arguments for apr_proc_create invocation
* on a given os. mod_cgi will call the function if registered.
*/
-APR_DECLARE_OPTIONAL_FN(apr_status_t, ap_cgi_build_command,
+APR_DECLARE_OPTIONAL_FN(apr_status_t, ap_cgi_build_command,
(const char **cmd, const char ***argv,
- request_rec *r, apr_pool_t *p,
+ request_rec *r, apr_pool_t *p,
cgi_exec_info_t *e_info));
#endif /* _MOD_CGI_H */
/**
* @file mod_suexec.h
* @brief SuExec Extension Module for Apache
- *
+ *
* @defgroup MOD_SUEXEC mod_suexec
* @ingroup APACHE_MODS
* @{
double avg_purgetime; /* Average time to purge the cache */
apr_time_t last_purge; /* Time of the last purge */
unsigned long npurged; /* Number of elements purged in last purge. This is not
- obvious: it won't be 3/4 the size of the cache if
+ obvious: it won't be 3/4 the size of the cache if
there were a lot of expired entries. */
unsigned long fetches; /* Number of fetches */
} util_compare_subgroup_t;
/*
- * We cache every successful search and bind operation, using the username
- * as the key. Each node in the cache contains the returned DN, plus the
+ * We cache every successful search and bind operation, using the username
+ * as the key. Each node in the cache contains the returned DN, plus the
* password used to bind.
*/
typedef struct util_search_node_t {
const char *username; /* Cache key */
const char *dn; /* DN returned from search */
- const char *bindpw; /* The most recently used bind password;
+ const char *bindpw; /* The most recently used bind password;
NULL if the bind failed */
apr_time_t lastbind; /* Time of last successful bind */
const char **vals; /* Values of queried attributes */
/*
* We cache every successful compare operation, using the DN, attrib, and
- * value as the key.
+ * value as the key.
*/
typedef struct util_compare_node_t {
const char *dn; /* DN, attrib and value combine to be the key */
- const char *attrib;
+ const char *attrib;
const char *value;
apr_time_t lastcompare;
int result;
util_url_node_t *util_ald_create_caches(util_ldap_state_t *s, const char *url);
util_ald_cache_t *util_ald_create_cache(util_ldap_state_t *st,
long cache_size,
- unsigned long (*hashfunc)(void *),
+ unsigned long (*hashfunc)(void *),
int (*comparefunc)(void *, void *),
void * (*copyfunc)(util_ald_cache_t *cache, void *),
void (*freefunc)(util_ald_cache_t *cache, void *),
void (*displayfunc)(request_rec *r, util_ald_cache_t *cache, void *));
-
+
void util_ald_destroy_cache(util_ald_cache_t *cache);
void *util_ald_cache_fetch(util_ald_cache_t *cache, void *payload);
void *util_ald_cache_insert(util_ald_cache_t *cache, void *payload);
/**
* @file mod_log_config.h
* @brief Logging Configuration Extension Module for Apache
- *
+ *
* @defgroup MOD_LOG_CONFIG mod_log_config
* @ingroup APACHE_MODS
* @{
#ifndef _MOD_LOG_CONFIG_H
#define _MOD_LOG_CONFIG_H 1
-/**
+/**
* callback function prototype for a external log handler
*/
typedef const char *ap_log_handler_fn_t(request_rec *r, char *a);
/**
* callback function prototype for external writer initialization.
*/
-typedef void *ap_log_writer_init(apr_pool_t *p, server_rec *s,
+typedef void *ap_log_writer_init(apr_pool_t *p, server_rec *s,
const char *name);
/**
* callback which gets called where there is a log line to write.
*/
typedef apr_status_t ap_log_writer(
request_rec *r,
- void *handle,
+ void *handle,
const char **portions,
int *lengths,
int nelts,
int want_orig_default;
} ap_log_handler;
-APR_DECLARE_OPTIONAL_FN(void, ap_register_log_handler,
+APR_DECLARE_OPTIONAL_FN(void, ap_register_log_handler,
(apr_pool_t *p, char *tag, ap_log_handler_fn_t *func,
int def));
/**
- * you will need to set your init handler *BEFORE* the open_logs
+ * you will need to set your init handler *BEFORE* the open_logs
* in mod_log_config gets executed
*/
APR_DECLARE_OPTIONAL_FN(ap_log_writer_init*, ap_log_set_writer_init,(ap_log_writer_init *func));
-/**
+/**
* you should probably set the writer at the same time (ie..before open_logs)
*/
APR_DECLARE_OPTIONAL_FN(ap_log_writer*, ap_log_set_writer, (ap_log_writer* func));
/* pool to use for lifecycle if APL_SCOPE_ONCE is set, otherwise unused */
apr_pool_t *pool;
- /* Pre-compiled Lua Byte code to load directly. If bytecode_len is >0,
+ /* Pre-compiled Lua Byte code to load directly. If bytecode_len is >0,
* the file part of this structure is ignored for loading purposes, but
- * it is used for error messages.
+ * it is used for error messages.
*/
const char *bytecode;
apr_size_t bytecode_len;
* If one exists, will return extant one, otherwise will create, attach, and return
* This does no locking around the lua_State, so if the pool is shared between
* threads, locking is up the client.
- *
+ *
* @lifecycle_pool -> pool whose lifeycle controls the lua_State
* @file file to be opened, also used as a key for uniquing lua_States
* @cb callback for vm initialization called *before* the file is opened
#include "lauxlib.h"
#include "lualib.h"
-/* Create a set of AP_LUA_DECLARE(type), AP_LUA_DECLARE_NONSTD(type) and
+/* Create a set of AP_LUA_DECLARE(type), AP_LUA_DECLARE_NONSTD(type) and
* AP_LUA_DECLARE_DATA with appropriate export and import tags for the platform
*/
#if !defined(WIN32)
*/
unsigned int code_cache_style;
- /**
+ /**
* APL_SCOPE_ONCE | APL_SCOPE_REQUEST | APL_SCOPE_CONN | APL_SCOPE_SERVER
*/
unsigned int vm_scope;
/**
* @file mod_rewrite.h
* @brief Rewrite Extension module for Apache
- *
+ *
* @defgroup MOD_REWRITE mod_rewrite
* @ingroup APACHE_MODS
* @{
/** AJP Specific error codes
*/
/** Buffer overflow exception */
-#define AJP_EOVERFLOW (APR_OS_START_USERERR + 1)
+#define AJP_EOVERFLOW (APR_OS_START_USERERR + 1)
/** Destination Buffer is to small */
-#define AJP_ETOSMALL (APR_OS_START_USERERR + 2)
+#define AJP_ETOSMALL (APR_OS_START_USERERR + 2)
/** Invalid input parameters */
-#define AJP_EINVAL (APR_OS_START_USERERR + 3)
+#define AJP_EINVAL (APR_OS_START_USERERR + 3)
/** Bad message signature */
-#define AJP_EBAD_SIGNATURE (APR_OS_START_USERERR + 4)
+#define AJP_EBAD_SIGNATURE (APR_OS_START_USERERR + 4)
/** Incoming message too bg */
-#define AJP_ETOBIG (APR_OS_START_USERERR + 5)
+#define AJP_ETOBIG (APR_OS_START_USERERR + 5)
/** Missing message header */
-#define AJP_ENO_HEADER (APR_OS_START_USERERR + 6)
+#define AJP_ENO_HEADER (APR_OS_START_USERERR + 6)
/** Bad message header */
-#define AJP_EBAD_HEADER (APR_OS_START_USERERR + 7)
+#define AJP_EBAD_HEADER (APR_OS_START_USERERR + 7)
/** Bad message */
-#define AJP_EBAD_MESSAGE (APR_OS_START_USERERR + 8)
+#define AJP_EBAD_MESSAGE (APR_OS_START_USERERR + 8)
/** Cant log via AJP14 */
-#define AJP_ELOGFAIL (APR_OS_START_USERERR + 9)
+#define AJP_ELOGFAIL (APR_OS_START_USERERR + 9)
/** Bad request method */
-#define AJP_EBAD_METHOD (APR_OS_START_USERERR + 10)
+#define AJP_EBAD_METHOD (APR_OS_START_USERERR + 10)
-/** A structure that represents ajp message */
+/** A structure that represents ajp message */
typedef struct ajp_msg ajp_msg_t;
-/** A structure that represents ajp message */
+/** A structure that represents ajp message */
struct ajp_msg
{
- /** The buffer holding a AJP message */
+ /** The buffer holding a AJP message */
apr_byte_t *buf;
- /** The length of AJP message header (defaults to AJP_HEADER_LEN) */
+ /** The length of AJP message header (defaults to AJP_HEADER_LEN) */
apr_size_t header_len;
- /** The length of AJP message */
+ /** The length of AJP message */
apr_size_t len;
- /** The current read position */
+ /** The current read position */
apr_size_t pos;
- /** Flag indicating the origing of the message */
+ /** Flag indicating the origing of the message */
int server_side;
/** The size of the buffer */
apr_size_t max_size;
apr_status_t ajp_msg_append_uint8(ajp_msg_t *msg, apr_byte_t value);
/**
- * Add a String in AJP message, and transform the String in ASCII
- * if convert is set and we're on an EBCDIC machine
+ * Add a String in AJP message, and transform the String in ASCII
+ * if convert is set and we're on an EBCDIC machine
*
* @param msg AJP Message to get value from
* @param value Pointer to String
apr_status_t ajp_msg_append_string_ex(ajp_msg_t *msg, const char *value,
int convert);
/**
- * Add a String in AJP message, and transform
- * the String in ASCII if we're on an EBCDIC machine
+ * Add a String in AJP message, and transform
+ * the String in ASCII if we're on an EBCDIC machine
*/
#define ajp_msg_append_string(m, v) ajp_msg_append_string_ex(m, v, 1)
/**
- * Add a String in AJP message.
+ * Add a String in AJP message.
*/
#define ajp_msg_append_string_ascii(m, v) ajp_msg_append_string_ex(m, v, 0)
*/
apr_status_t ajp_msg_serialize_ping(ajp_msg_t *msg);
-/**
+/**
* Serialize in an AJP Message a CPING command
*
* +-----------------------+
*/
apr_status_t ajp_msg_log(request_rec *r, ajp_msg_t *msg, char *err);
-/**
+/**
* Send an AJP message to backend
*
* @param sock backend socket
*/
apr_status_t ajp_ilink_send(apr_socket_t *sock, ajp_msg_t *msg);
-/**
+/**
* Receive an AJP message from backend
*
* @param sock backend socket
* Send the data message
* @param sock backend socket
* @param msg AJP message to send
- * @param len AJP message length
+ * @param len AJP message length
* @return APR_SUCCESS or error
*/
apr_status_t ajp_send_data_msg(apr_socket_t *sock,
ajp_msg_t *msg, apr_size_t len);
/**
- * Parse the message type
+ * Parse the message type
* @param r current request
* @param msg AJP message
* @return AJP message type.
int ajp_parse_type(request_rec *r, ajp_msg_t *msg);
/**
- * Parse the header message from container
+ * Parse the header message from container
* @param r current request
* @param conf proxy config
* @param msg AJP message
apr_status_t ajp_parse_header(request_rec *r, proxy_dir_conf *conf,
ajp_msg_t *msg);
-/**
- * Parse the message body and return data address and length
+/**
+ * Parse the message body and return data address and length
* @param r current request
* @param msg AJP message
- * @param len returned AJP message length
+ * @param len returned AJP message length
* @param ptr returned data
* @return APR_SUCCESS or error
*/
apr_byte_t *reuse);
-/**
+/**
* Handle the CPING/CPONG messages
* @param sock backend socket
* @param r current request
/*
* Conditional request attributes
- *
+ *
*/
#define SC_A_CONTEXT (unsigned char)1
#define SC_A_SERVLET_PATH (unsigned char)2
* The list of methods was taken from Section 5.1.1 of RFC 2616,
* RFC 2518, the ACL IETF draft, and the DeltaV IESG Proposed Standard.
* Method = "OPTIONS"
- * | "GET"
- * | "HEAD"
- * | "POST"
- * | "PUT"
- * | "DELETE"
- * | "TRACE"
+ * | "GET"
+ * | "HEAD"
+ * | "POST"
+ * | "PUT"
+ * | "DELETE"
+ * | "TRACE"
* | "PROPFIND"
* | "PROPPATCH"
* | "MKCOL"
* | "MERGE"
* | "BASELINE-CONTROL"
* | "MKACTIVITY"
- *
+ *
*/
#define SC_M_OPTIONS (unsigned char)1
#define SC_M_GET (unsigned char)2
/*
* Frequent request headers, these headers are coded as numbers
* instead of strings.
- *
+ *
* Accept
* Accept-Charset
* Accept-Encoding
* Pragma
* Referer
* User-Agent
- *
+ *
*/
#define SC_ACCEPT (unsigned short)0xA001
#define SC_CONNECTION (unsigned short)0xA006
#define SC_CONTENT_TYPE (unsigned short)0xA007
#define SC_CONTENT_LENGTH (unsigned short)0xA008
-#define SC_COOKIE (unsigned short)0xA009
+#define SC_COOKIE (unsigned short)0xA009
#define SC_COOKIE2 (unsigned short)0xA00A
#define SC_HOST (unsigned short)0xA00B
#define SC_PRAGMA (unsigned short)0xA00C
/*
* Frequent response headers, these headers are coded as numbers
* instead of strings.
- *
+ *
* Content-Type
* Content-Language
* Content-Length
* Servlet-Engine
* Status
* WWW-Authenticate
- *
+ *
*/
#define SC_RESP_CONTENT_TYPE (unsigned short)0xA001
*/
void *baton;
/**
- * Check that the key/value pairs used to configure the
+ * Check that the key/value pairs used to configure the
* cluster are valid.
*
* Return non-NULL on failure with an error message, like standard httpd
/**
* Provide an ordered array of ap_serf_server_t in the order that
* mod_serf should attempt to use them. If a server on the list
- * is known to be not responding, it may be skipped. If mod_serf is
- * unable to contact any of the servers, a 502 will be returned to the
+ * is known to be not responding, it may be skipped. If mod_serf is
+ * unable to contact any of the servers, a 502 will be returned to the
* client.
*
* Returns OK on sucess, all other return codes will result in a 500.
#ifndef MOD_SESSION_H
#define MOD_SESSION_H
-/* Create a set of SESSION_DECLARE(type), SESSION_DECLARE_NONSTD(type) and
+/* Create a set of SESSION_DECLARE(type), SESSION_DECLARE_NONSTD(type) and
* SESSION_DECLARE_DATA with appropriate export and import tags for the platform
*/
#if !defined(WIN32)
char *));
/** The ssl_ext_list() optional function attempts to build an array
- * of all the values contained in the named X.509 extension. The
+ * of all the values contained in the named X.509 extension. The
* returned array will be created in the supplied pool.
- * The client certificate is used if peer is non-zero; the server
+ * The client certificate is used if peer is non-zero; the server
* certificate is used otherwise.
* Extension specifies the extensions to use as a string. This can be
* one of the "known" long or short names, or a numeric OID,
#define SSL_PRIVATE_H
/**
- * @file ssl_private.h
+ * @file ssl_private.h
* @brief Internal interfaces private to mod_ssl.
*
* @defgroup MOD_SSL_PRIVATE Private
#ifndef PEM_F_DEF_CALLBACK
#ifdef PEM_F_PEM_DEF_CALLBACK
/** In OpenSSL 0.9.8 PEM_F_DEF_CALLBACK was renamed */
-#define PEM_F_DEF_CALLBACK PEM_F_PEM_DEF_CALLBACK
+#define PEM_F_DEF_CALLBACK PEM_F_PEM_DEF_CALLBACK
#endif
#endif
/* Track the handshake/renegotiation state for the connection so
* that all client-initiated renegotiations can be rejected, as a
* partial fix for CVE-2009-3555. */
- enum {
+ enum {
RENEG_INIT = 0, /* Before initial handshake */
RENEG_REJECT, /* After initial handshake; any client-initiated
* renegotiation should be rejected */
RENEG_ABORT /* Renegotiation initiated by client, abort the
* connection */
} reneg_state;
-
+
server_rec *server;
} SSLConnRec;
void ssl_init_Engine(server_rec *, apr_pool_t *);
void ssl_init_ConfigureServer(server_rec *, apr_pool_t *, apr_pool_t *, SSLSrvConfigRec *);
void ssl_init_CheckServers(server_rec *, apr_pool_t *);
-STACK_OF(X509_NAME)
+STACK_OF(X509_NAME)
*ssl_init_FindCAList(server_rec *, apr_pool_t *, const char *, const char *);
void ssl_init_Child(apr_pool_t *, server_rec *);
apr_status_t ssl_init_ModuleKill(void *data);
char *ssl_util_readfilter(server_rec *, apr_pool_t *, const char *,
const char * const *);
BOOL ssl_util_path_check(ssl_pathcheck_t, const char *, apr_pool_t *);
-ssl_algo_t ssl_util_algotypeof(X509 *, EVP_PKEY *);
+ssl_algo_t ssl_util_algotypeof(X509 *, EVP_PKEY *);
char *ssl_util_algotypestr(ssl_algo_t);
void ssl_util_thread_setup(apr_pool_t *);
int ssl_init_ssl_connection(conn_rec *c, request_rec *r);
* additional argument (whose details are appended to the log message).
* The other arguments are interpreted exactly as with their ap_log_*error
* counterparts. */
-void ssl_log_xerror(const char *file, int line, int level,
+void ssl_log_xerror(const char *file, int line, int level,
apr_status_t rv, apr_pool_t *p, server_rec *s,
X509 *cert, const char *format, ...)
__attribute__((format(printf,8,9)));
-void ssl_log_cxerror(const char *file, int line, int level,
+void ssl_log_cxerror(const char *file, int line, int level,
apr_status_t rv, conn_rec *c, X509 *cert,
const char *format, ...)
__attribute__((format(printf,7,8)));
-void ssl_log_rxerror(const char *file, int line, int level,
+void ssl_log_rxerror(const char *file, int line, int level,
apr_status_t rv, request_rec *r, X509 *cert,
const char *format, ...)
__attribute__((format(printf,7,8)));
/* Perform OCSP validation of the current cert in the given context.
* Returns non-zero on success or zero on failure. On failure, the
* context error code is set. */
-int modssl_verify_ocsp(X509_STORE_CTX *ctx, SSLSrvConfigRec *sc,
+int modssl_verify_ocsp(X509_STORE_CTX *ctx, SSLSrvConfigRec *sc,
server_rec *s, conn_rec *c, apr_pool_t *pool);
/* OCSP helper interface; dispatches the given OCSP request to the
#define SSL_SESSION_ID_STRING_LEN \
((SSL_MAX_SSL_SESSION_ID_LENGTH + 1) * 2)
-/**
+/**
* Additional Functions
*/
void SSL_init_app_data2_idx(void);
#define getpid NXThreadGetId
/* Hold the screen open if there is an exit code and the hold_screen_on_exit flag >= 0 or the
- hold_screen_on_exit > 0. If the hold_screen_on_exit flag is < 0 then close the screen no
+ hold_screen_on_exit > 0. If the hold_screen_on_exit flag is < 0 then close the screen no
matter what the exit code is. */
#define exit(s) {if((s||hold_screen_on_exit)&&(hold_screen_on_exit>=0)){pressanykey();}apr_terminate();exit(s);}
/* hint for MSL C++ that we're on NetWare platform */
#define __NETWARE__
-/* the FAR keyword has no meaning in a 32-bit environment
+/* the FAR keyword has no meaning in a 32-bit environment
but is used in the SDK headers so we take it out */
#define FAR
#define far
-/* no-op for Codewarrior C compiler; a functions are cdecl
+/* no-op for Codewarrior C compiler; a functions are cdecl
by default */
#define cdecl
/**
* @file unixd.h
- * @brief common stuff that unix MPMs will want
+ * @brief common stuff that unix MPMs will want
*
* @addtogroup APACHE_OS_UNIX
* @{
#if defined(RLIMIT_CPU) || defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_NPROC) || defined(RLIMIT_AS)
AP_DECLARE(void) ap_unixd_set_rlimit(cmd_parms *cmd, struct rlimit **plimit,
- const char *arg,
+ const char *arg,
const char * arg2, int type);
#endif
/**
* One of the functions to set mutex permissions should be called in
- * the parent process on platforms that switch identity when the
+ * the parent process on platforms that switch identity when the
* server is started as root.
* If the child init logic is performed before switching identity
* (e.g., MPM setup for an accept mutex), it should only be called
* @brief This file in included in all Apache source code. It contains definitions
* of facilities available on _this_ operating system (HAVE_* macros),
* and prototypes of OS specific functions defined in os.c or os-inline.c
- *
+ *
* @defgroup APACHE_OS_WIN32 win32
* @ingroup APACHE_OS
* @{
/* Win2K kernel only */
AP_DECLARE_LATE_DLL_FUNC(AP_DLL_WINADVAPI, BOOL, WINAPI, ChangeServiceConfig2A, 0, (
- SC_HANDLE hService,
- DWORD dwInfoLevel,
+ SC_HANDLE hService,
+ DWORD dwInfoLevel,
LPVOID lpInfo),
(hService, dwInfoLevel, lpInfo));
#undef ChangeServiceConfig2
typedef struct fd_queue_t fd_queue_t;
void ap_pop_pool(apr_pool_t ** recycled_pool, fd_queue_info_t * queue_info);
-void ap_push_pool(fd_queue_info_t * queue_info,
+void ap_push_pool(fd_queue_info_t * queue_info,
apr_pool_t * pool_to_recycle);
apr_status_t ap_queue_init(fd_queue_t * queue, int queue_capacity,
/**
* @file mpmt_os2/mpm_default.h
* @brief os2 MPM defaults
- *
+ *
* @addtogroup APACHE_MPM_OS2
* @{
*/
simple_register_timer(simple_core_t * sc,
simple_timer_cb cb,
void *baton,
- apr_time_t relative_time,
+ apr_time_t relative_time,
apr_pool_t *shutdown_pool);
void
/**
* @file mpm_winnt.h
- * @brief WinNT MPM specific
+ * @brief WinNT MPM specific
*
* @addtogroup APACHE_MPM_WINNT
* @{
#define SERVICECONFIG "System\\CurrentControlSet\\Services\\%s"
#define SERVICEPARAMS "System\\CurrentControlSet\\Services\\%s\\Parameters"
-apr_status_t mpm_service_set_name(apr_pool_t *p, const char **display_name,
+apr_status_t mpm_service_set_name(apr_pool_t *p, const char **display_name,
const char *set_name);
-apr_status_t mpm_merge_service_args(apr_pool_t *p, apr_array_header_t *args,
+apr_status_t mpm_merge_service_args(apr_pool_t *p, apr_array_header_t *args,
int fixed_args);
apr_status_t mpm_service_to_start(const char **display_name, apr_pool_t *p);
apr_status_t mpm_service_started(void);
-apr_status_t mpm_service_install(apr_pool_t *ptemp, int argc,
+apr_status_t mpm_service_install(apr_pool_t *ptemp, int argc,
char const* const* argv, int reconfig);
apr_status_t mpm_service_uninstall(void);
-apr_status_t mpm_service_start(apr_pool_t *ptemp, int argc,
+apr_status_t mpm_service_start(apr_pool_t *ptemp, int argc,
char const* const* argv);
void mpm_signal_service(apr_pool_t *ptemp, int signal);
/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton interface for Bison's Yacc-like parsers in C
-
+
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#endif
/*
- * USERDIR_SUFFIX -- Define to be the subdirectory under users'
+ * USERDIR_SUFFIX -- Define to be the subdirectory under users'
* home directories where suEXEC access should
* be allowed. All executables under this directory
- * will be executable by suEXEC as the user so
- * they should be "safe" programs. If you are
- * using a "simple" UserDir directive (ie. one
- * without a "*" in it) this should be set to
+ * will be executable by suEXEC as the user so
+ * they should be "safe" programs. If you are
+ * using a "simple" UserDir directive (ie. one
+ * without a "*" in it) this should be set to
* the same value. suEXEC will not work properly
- * in cases where the UserDir directive points to
+ * in cases where the UserDir directive points to
* a location that is not the same as the user's
* home directory as referenced in the passwd file.
*