summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ap_mmn.h5
-rw-r--r--include/ap_provider.h14
-rw-r--r--include/ap_release.h2
-rw-r--r--include/http_log.h13
-rw-r--r--include/http_protocol.h2
-rw-r--r--include/httpd.h146
-rw-r--r--include/mpm_common.h5
-rw-r--r--include/util_ldap.h2
8 files changed, 113 insertions, 76 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h
index 3487067d..1022f57b 100644
--- a/include/ap_mmn.h
+++ b/include/ap_mmn.h
@@ -393,6 +393,9 @@
* 20120211.1 (2.4.2-dev) Add AP_HAVE_C99
* 20120211.2 (2.4.2-dev) Add ap_runtime_dir_relative
* 20120211.3 (2.4.2-dev) Add forcerecovery to proxy_balancer_shared struct
+ * 20120211.4 (2.4.3-dev) Add ap_list_provider_groups()
+ * 20120211.5 (2.4.3-dev) Add missing HTTP status codes registered with IANA.
+ * 20120211.6 (2.4.3-dev) Add ap_proxy_checkproxyblock2.
*/
#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
@@ -400,7 +403,7 @@
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20120211
#endif
-#define MODULE_MAGIC_NUMBER_MINOR 3 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 6 /* 0...n */
/**
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
diff --git a/include/ap_provider.h b/include/ap_provider.h
index adfc69ca..0a6c10cf 100644
--- a/include/ap_provider.h
+++ b/include/ap_provider.h
@@ -36,6 +36,10 @@ typedef struct {
const char *provider_name;
} ap_list_provider_names_t;
+typedef struct {
+ const char *provider_group;
+ const char *provider_version;
+} ap_list_provider_groups_t;
/**
* This function is used to register a provider with the global
@@ -78,6 +82,16 @@ AP_DECLARE(apr_array_header_t *) ap_list_provider_names(apr_pool_t *pool,
const char *provider_group,
const char *provider_version);
+/**
+ * This function is used to retrieve a list (array) of provider groups and versions
+ * @param pool The pool to create any storage from
+ * @return pointer to array of ap_list_provider_groups_t of provider groups
+ * and versions (could be empty)
+ */
+
+AP_DECLARE(apr_array_header_t *) ap_list_provider_groups(apr_pool_t *pool);
+
+
#ifdef __cplusplus
}
#endif
diff --git a/include/ap_release.h b/include/ap_release.h
index da8f53d4..cb15fd1a 100644
--- a/include/ap_release.h
+++ b/include/ap_release.h
@@ -45,7 +45,7 @@
#define AP_SERVER_MAJORVERSION_NUMBER 2
#define AP_SERVER_MINORVERSION_NUMBER 4
-#define AP_SERVER_PATCHLEVEL_NUMBER 2
+#define AP_SERVER_PATCHLEVEL_NUMBER 3
#define AP_SERVER_DEVBUILD_BOOLEAN 0
#define AP_SERVER_ADD_STRING "-dev"
diff --git a/include/http_log.h b/include/http_log.h
index 922500f1..acad0328 100644
--- a/include/http_log.h
+++ b/include/http_log.h
@@ -363,8 +363,8 @@ AP_DECLARE(void) ap_log_error(const char *file, int line, int module_index,
#define ap_log_error(...) ap_log_error__(__VA_ARGS__)
/* need server_rec *sr = ... for the case if s is verbatim NULL */
#define ap_log_error__(file, line, mi, level, status, s, ...) \
- do { const server_rec *sr = s; if (APLOG_MODULE_IS_LEVEL(sr, mi, level)) \
- ap_log_error_(file, line, mi, level, status, sr, __VA_ARGS__); \
+ do { const server_rec *sr__ = s; if (APLOG_MODULE_IS_LEVEL(sr__, mi, level)) \
+ ap_log_error_(file, line, mi, level, status, sr__, __VA_ARGS__); \
} while(0)
#else
#define ap_log_error ap_log_error_
@@ -569,21 +569,24 @@ AP_DECLARE(void) ap_log_command_line(apr_pool_t *p, server_rec *s);
/**
* Log the current pid of the parent process
* @param p The pool to use for processing
- * @param fname The name of the file to log to
+ * @param fname The name of the file to log to. If the filename is not
+ * absolute then it is assumed to be relative to ServerRoot.
*/
AP_DECLARE(void) ap_log_pid(apr_pool_t *p, const char *fname);
/**
* Remove the pidfile.
* @param p The pool to use for processing
- * @param fname The name of the pid file to remove
+ * @param fname The name of the pid file to remove. If the filename is not
+ * absolute then it is assumed to be relative to ServerRoot.
*/
AP_DECLARE(void) ap_remove_pid(apr_pool_t *p, const char *fname);
/**
* Retrieve the pid from a pidfile.
* @param p The pool to use for processing
- * @param filename The name of the file containing the pid
+ * @param filename The name of the file containing the pid. If the filename is not
+ * absolute then it is assumed to be relative to ServerRoot.
* @param mypid Pointer to pid_t (valid only if return APR_SUCCESS)
*/
AP_DECLARE(apr_status_t) ap_read_pid(apr_pool_t *p, const char *filename, pid_t *mypid);
diff --git a/include/http_protocol.h b/include/http_protocol.h
index d0d1f27a..fd95379d 100644
--- a/include/http_protocol.h
+++ b/include/http_protocol.h
@@ -379,7 +379,7 @@ AP_DECLARE_NONSTD(int) ap_rprintf(request_rec *r, const char *fmt,...)
/**
* Flush all of the data for the current request to the client
* @param r The current request
- * @return The number of bytes sent
+ * @return 0 on success, -1 if an error occurred
*/
AP_DECLARE(int) ap_rflush(request_rec *r);
diff --git a/include/httpd.h b/include/httpd.h
index 6ffdef2e..461cf5ee 100644
--- a/include/httpd.h
+++ b/include/httpd.h
@@ -312,9 +312,9 @@ extern "C" {
#define AP_MAX_SENDFILE 16777216 /* 2^24 */
/**
- * Special Apache error codes. These are basically used
- * in http_main.c so we can keep track of various errors.
- *
+ * MPM child process exit status values
+ * The MPM parent process may check the status to see if special
+ * error handling is required.
*/
/** a normal exit */
#define APEXIT_OK 0x0
@@ -472,61 +472,70 @@ AP_DECLARE(const char *) ap_get_server_built(void);
* @{
*/
/**
- * The size of the static array in http_protocol.c for storing
- * all of the potential response status-lines (a sparse table).
+ * The size of the static status_lines array in http_protocol.c for
+ * storing all of the potential response status-lines (a sparse table).
+ * When adding a new code here add it to status_lines as well.
* A future version should dynamically generate the apr_table_t at startup.
*/
-#define RESPONSE_CODES 57
-
-#define HTTP_CONTINUE 100
-#define HTTP_SWITCHING_PROTOCOLS 101
-#define HTTP_PROCESSING 102
-#define HTTP_OK 200
-#define HTTP_CREATED 201
-#define HTTP_ACCEPTED 202
-#define HTTP_NON_AUTHORITATIVE 203
-#define HTTP_NO_CONTENT 204
-#define HTTP_RESET_CONTENT 205
-#define HTTP_PARTIAL_CONTENT 206
-#define HTTP_MULTI_STATUS 207
-#define HTTP_MULTIPLE_CHOICES 300
-#define HTTP_MOVED_PERMANENTLY 301
-#define HTTP_MOVED_TEMPORARILY 302
-#define HTTP_SEE_OTHER 303
-#define HTTP_NOT_MODIFIED 304
-#define HTTP_USE_PROXY 305
-#define HTTP_TEMPORARY_REDIRECT 307
-#define HTTP_BAD_REQUEST 400
-#define HTTP_UNAUTHORIZED 401
-#define HTTP_PAYMENT_REQUIRED 402
-#define HTTP_FORBIDDEN 403
-#define HTTP_NOT_FOUND 404
-#define HTTP_METHOD_NOT_ALLOWED 405
-#define HTTP_NOT_ACCEPTABLE 406
-#define HTTP_PROXY_AUTHENTICATION_REQUIRED 407
-#define HTTP_REQUEST_TIME_OUT 408
-#define HTTP_CONFLICT 409
-#define HTTP_GONE 410
-#define HTTP_LENGTH_REQUIRED 411
-#define HTTP_PRECONDITION_FAILED 412
-#define HTTP_REQUEST_ENTITY_TOO_LARGE 413
-#define HTTP_REQUEST_URI_TOO_LARGE 414
-#define HTTP_UNSUPPORTED_MEDIA_TYPE 415
-#define HTTP_RANGE_NOT_SATISFIABLE 416
-#define HTTP_EXPECTATION_FAILED 417
-#define HTTP_UNPROCESSABLE_ENTITY 422
-#define HTTP_LOCKED 423
-#define HTTP_FAILED_DEPENDENCY 424
-#define HTTP_UPGRADE_REQUIRED 426
-#define HTTP_INTERNAL_SERVER_ERROR 500
-#define HTTP_NOT_IMPLEMENTED 501
-#define HTTP_BAD_GATEWAY 502
-#define HTTP_SERVICE_UNAVAILABLE 503
-#define HTTP_GATEWAY_TIME_OUT 504
-#define HTTP_VERSION_NOT_SUPPORTED 505
-#define HTTP_VARIANT_ALSO_VARIES 506
-#define HTTP_INSUFFICIENT_STORAGE 507
-#define HTTP_NOT_EXTENDED 510
+#define RESPONSE_CODES 83
+
+#define HTTP_CONTINUE 100
+#define HTTP_SWITCHING_PROTOCOLS 101
+#define HTTP_PROCESSING 102
+#define HTTP_OK 200
+#define HTTP_CREATED 201
+#define HTTP_ACCEPTED 202
+#define HTTP_NON_AUTHORITATIVE 203
+#define HTTP_NO_CONTENT 204
+#define HTTP_RESET_CONTENT 205
+#define HTTP_PARTIAL_CONTENT 206
+#define HTTP_MULTI_STATUS 207
+#define HTTP_ALREADY_REPORTED 208
+#define HTTP_IM_USED 226
+#define HTTP_MULTIPLE_CHOICES 300
+#define HTTP_MOVED_PERMANENTLY 301
+#define HTTP_MOVED_TEMPORARILY 302
+#define HTTP_SEE_OTHER 303
+#define HTTP_NOT_MODIFIED 304
+#define HTTP_USE_PROXY 305
+#define HTTP_TEMPORARY_REDIRECT 307
+#define HTTP_PERMANENT_REDIRECT 308
+#define HTTP_BAD_REQUEST 400
+#define HTTP_UNAUTHORIZED 401
+#define HTTP_PAYMENT_REQUIRED 402
+#define HTTP_FORBIDDEN 403
+#define HTTP_NOT_FOUND 404
+#define HTTP_METHOD_NOT_ALLOWED 405
+#define HTTP_NOT_ACCEPTABLE 406
+#define HTTP_PROXY_AUTHENTICATION_REQUIRED 407
+#define HTTP_REQUEST_TIME_OUT 408
+#define HTTP_CONFLICT 409
+#define HTTP_GONE 410
+#define HTTP_LENGTH_REQUIRED 411
+#define HTTP_PRECONDITION_FAILED 412
+#define HTTP_REQUEST_ENTITY_TOO_LARGE 413
+#define HTTP_REQUEST_URI_TOO_LARGE 414
+#define HTTP_UNSUPPORTED_MEDIA_TYPE 415
+#define HTTP_RANGE_NOT_SATISFIABLE 416
+#define HTTP_EXPECTATION_FAILED 417
+#define HTTP_UNPROCESSABLE_ENTITY 422
+#define HTTP_LOCKED 423
+#define HTTP_FAILED_DEPENDENCY 424
+#define HTTP_UPGRADE_REQUIRED 426
+#define HTTP_PRECONDITION_REQUIRED 428
+#define HTTP_TOO_MANY_REQUESTS 429
+#define HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE 431
+#define HTTP_INTERNAL_SERVER_ERROR 500
+#define HTTP_NOT_IMPLEMENTED 501
+#define HTTP_BAD_GATEWAY 502
+#define HTTP_SERVICE_UNAVAILABLE 503
+#define HTTP_GATEWAY_TIME_OUT 504
+#define HTTP_VERSION_NOT_SUPPORTED 505
+#define HTTP_VARIANT_ALSO_VARIES 506
+#define HTTP_INSUFFICIENT_STORAGE 507
+#define HTTP_LOOP_DETECTED 508
+#define HTTP_NOT_EXTENDED 510
+#define HTTP_NETWORK_AUTHENTICATION_REQUIRED 511
/** is the status code informational */
#define ap_is_HTTP_INFO(x) (((x) >= 100)&&((x) < 200))
@@ -595,7 +604,7 @@ AP_DECLARE(const char *) ap_get_server_built(void);
#define M_MKACTIVITY 23
#define M_BASELINE_CONTROL 24
#define M_MERGE 25
-#define M_INVALID 26 /** RFC 3253: WebDAV Versioning */
+#define M_INVALID 26 /** no valid method */
/**
* METHODS needs to be equal to the number of bits
@@ -1019,6 +1028,7 @@ struct request_rec {
/** remote address information from conn_rec, can be overridden if
* necessary by a module.
+ * This is the address that originated the request.
*/
apr_sockaddr_t *useragent_addr;
char *useragent_ip;
@@ -1064,10 +1074,14 @@ struct conn_rec {
/* Information about the connection itself */
/** local address */
apr_sockaddr_t *local_addr;
- /** remote address */
+ /** remote address; this is the end-point of the next hop, for the address
+ * of the request creator, see useragent_addr in request_rec
+ */
apr_sockaddr_t *client_addr;
- /** Client's IP address */
+ /** Client's IP address; this is the end-point of the next hop, for the
+ * IP of the request creator, see useragent_ip in request_rec
+ */
char *client_ip;
/** Client's DNS name, if known. NULL if DNS hasn't been checked,
* "" if it has and no address was found. N.B. Only access this though
@@ -1147,6 +1161,8 @@ struct conn_rec {
/**
* Enumeration of connection states
+ * The two states CONN_STATE_LINGER_NORMAL and CONN_STATE_LINGER_SHORT may
+ * only be set by the MPM. Use CONN_STATE_LINGER outside of the MPM.
*/
typedef enum {
CONN_STATE_CHECK_REQUEST_LINE_READABLE,
@@ -1154,9 +1170,9 @@ typedef enum {
CONN_STATE_HANDLER,
CONN_STATE_WRITE_COMPLETION,
CONN_STATE_SUSPENDED,
- CONN_STATE_LINGER,
- CONN_STATE_LINGER_NORMAL,
- CONN_STATE_LINGER_SHORT
+ CONN_STATE_LINGER, /* connection may be closed with lingering */
+ CONN_STATE_LINGER_NORMAL, /* MPM has started lingering close with normal timeout */
+ CONN_STATE_LINGER_SHORT /* MPM has started lingering close with short timeout */
} conn_state_e;
/**
@@ -1671,7 +1687,7 @@ AP_DECLARE(char *) ap_make_dirstr_parent(apr_pool_t *p, const char *s);
/**
* Given a directory and filename, create a single path from them. This
- * function is smart enough to ensure that there is a sinlge '/' between the
+ * function is smart enough to ensure that there is a single '/' between the
* directory and file names
* @param a The pool to allocate from
* @param dir The directory name
@@ -1706,7 +1722,7 @@ AP_DECLARE(int) ap_is_matchexp(const char *str);
* Determine if a string matches a patterm containing the wildcards '?' or '*'
* @param str The string to check
* @param expected The pattern to match against
- * @return 1 if the two strings match, 0 otherwise
+ * @return 0 if the two strings match, 1 otherwise
*/
AP_DECLARE(int) ap_strcmp_match(const char *str, const char *expected);
@@ -1715,7 +1731,7 @@ AP_DECLARE(int) ap_strcmp_match(const char *str, const char *expected);
* ignoring case
* @param str The string to check
* @param expected The pattern to match against
- * @return 1 if the two strings match, 0 otherwise
+ * @return 0 if the two strings match, 1 otherwise
*/
AP_DECLARE(int) ap_strcasecmp_match(const char *str, const char *expected);
diff --git a/include/mpm_common.h b/include/mpm_common.h
index 99b1945c..0a98d700 100644
--- a/include/mpm_common.h
+++ b/include/mpm_common.h
@@ -89,7 +89,7 @@ extern "C" {
typedef void ap_reclaim_callback_fn_t(int childnum, pid_t pid,
ap_generation_t gen);
-#ifndef NETWARE
+#if (!defined(WIN32) && !defined(NETWARE)) || defined(DOXYGEN)
/**
* Make sure all child processes that have been spawned by the parent process
* have died. This includes process registered as "other_children".
@@ -164,7 +164,8 @@ AP_DECLARE(int) ap_process_child_status(apr_proc_t *pid, apr_exit_why_e why, int
AP_DECLARE(apr_status_t) ap_fatal_signal_setup(server_rec *s, apr_pool_t *in_pconf);
AP_DECLARE(apr_status_t) ap_fatal_signal_child_setup(server_rec *s);
-#endif /* !NETWARE */
+
+#endif /* (!WIN32 && !NETWARE) || DOXYGEN */
/**
* Pool cleanup for end-generation hook implementation
diff --git a/include/util_ldap.h b/include/util_ldap.h
index fd60ba9b..3d44ba32 100644
--- a/include/util_ldap.h
+++ b/include/util_ldap.h
@@ -45,7 +45,7 @@
/* this whole thing disappears if LDAP is not enabled */
#if APR_HAS_LDAP
-#if APR_HAS_MICROSOFT_LDAPSDK
+#ifdef LDAP_UNAVAILABLE
#define AP_LDAP_IS_SERVER_DOWN(s) ((s) == LDAP_SERVER_DOWN \
||(s) == LDAP_UNAVAILABLE)
#else