summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStefan Fritsch <sf@sfritsch.de>2016-04-09 13:46:36 +0200
committerStefan Fritsch <sf@sfritsch.de>2016-04-09 13:46:36 +0200
commit48eddd3d39fa2668ee29198ebfb33c41d4738c21 (patch)
tree247d4f813b86ea354d18d337b09bb137caab8e15 /include
parentd5325781b38052fbdf4cc28a6c6d3052b9424b51 (diff)
downloadapache2-48eddd3d39fa2668ee29198ebfb33c41d4738c21.tar.gz
Imported Upstream version 2.4.20
Diffstat (limited to 'include')
-rw-r--r--include/ap_mmn.h13
-rw-r--r--include/ap_release.h4
-rw-r--r--include/http_connection.h14
-rw-r--r--include/http_core.h32
-rw-r--r--include/http_protocol.h2
-rw-r--r--include/httpd.h13
-rw-r--r--include/scoreboard.h5
7 files changed, 74 insertions, 9 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h
index 3233ef80..8a28919a 100644
--- a/include/ap_mmn.h
+++ b/include/ap_mmn.h
@@ -457,6 +457,17 @@
* ap_get_protocol(). Add HTTP_MISDIRECTED_REQUEST.
* Added ap_parse_token_list_strict() to httpd.h
* 20120211.52 (2.4.17-dev) Add master conn_rec* member in conn_rec.
+ * 20120211.53 (2.4.19-dev) Add epxr_hander to core_dir_config.
+ * 20120211.54 (2.4.19-dev) Add ap_proxy_buckets_lifetime_transform and
+ * ap_proxy_transfer_between_connections to
+ * mod_proxy.h
+ * 20120211.55 (2.4.19-dev) Add new ap_update_child_status...() methods,
+ * add protocol to worker_score in scoreboard.h,
+ * Add pre_close connection hook and
+ * ap_prep_lingering_close().
+ * 20120211.56 (2.4.19-dev) Split useragent_host from the conn_rec into
+ * the request_rec, with ap_get_useragent_host()
+ * 20120211.57 (2.4.19-dev) Add mod_ssl_openssl.h and OpenSSL-specific hooks
*/
#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
@@ -464,7 +475,7 @@
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20120211
#endif
-#define MODULE_MAGIC_NUMBER_MINOR 52 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 57 /* 0...n */
/**
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
diff --git a/include/ap_release.h b/include/ap_release.h
index 79eeee39..becf09cf 100644
--- a/include/ap_release.h
+++ b/include/ap_release.h
@@ -23,7 +23,7 @@
#define AP_RELEASE_H
#define AP_SERVER_COPYRIGHT \
- "Copyright 2015 The Apache Software Foundation."
+ "Copyright 2016 The Apache Software Foundation."
/*
* The below defines the base string of the Server: header. Additional
@@ -43,7 +43,7 @@
#define AP_SERVER_MAJORVERSION_NUMBER 2
#define AP_SERVER_MINORVERSION_NUMBER 4
-#define AP_SERVER_PATCHLEVEL_NUMBER 18
+#define AP_SERVER_PATCHLEVEL_NUMBER 20
#define AP_SERVER_DEVBUILD_BOOLEAN 0
/* Synchronize the above with docs/manual/style/version.ent */
diff --git a/include/http_connection.h b/include/http_connection.h
index 58389a4f..8bc009da 100644
--- a/include/http_connection.h
+++ b/include/http_connection.h
@@ -75,6 +75,8 @@ AP_CORE_DECLARE(void) ap_flush_conn(conn_rec *c);
*/
AP_DECLARE(void) ap_lingering_close(conn_rec *c);
+AP_DECLARE(int) ap_prep_lingering_close(conn_rec *c);
+
AP_DECLARE(int) ap_start_lingering_close(conn_rec *c);
/* Hooks */
@@ -121,6 +123,18 @@ AP_DECLARE_HOOK(int,pre_connection,(conn_rec *c, void *csd))
*/
AP_DECLARE_HOOK(int,process_connection,(conn_rec *c))
+/**
+ * This hook implements different protocols. Before a connection is closed,
+ * protocols might have to perform some housekeeping actions, such as
+ * sending one last goodbye packet. The connection is, unless some other
+ * error already happened before, still open and operational.
+ * All pre-close-connection hooks are run until one returns something
+ * other than ok or decline
+ * @param c The connection on which the request has been received.
+ * @return OK or DECLINED
+ */
+AP_DECLARE_HOOK(int,pre_close_connection,(conn_rec *c))
+
/** End Of Connection (EOC) bucket */
AP_DECLARE_DATA extern const apr_bucket_type_t ap_bucket_type_eoc;
diff --git a/include/http_core.h b/include/http_core.h
index 85354552..d39546f7 100644
--- a/include/http_core.h
+++ b/include/http_core.h
@@ -159,6 +159,32 @@ AP_DECLARE(int) ap_allow_overrides(request_rec *r);
AP_DECLARE(const char *) ap_document_root(request_rec *r);
/**
+ * Lookup the remote user agent's DNS name or IP address
+ * @ingroup get_remote_hostname
+ * @param req The current request
+ * @param type The type of lookup to perform. One of:
+ * <pre>
+ * REMOTE_HOST returns the hostname, or NULL if the hostname
+ * lookup fails. It will force a DNS lookup according to the
+ * HostnameLookups setting.
+ * REMOTE_NAME returns the hostname, or the dotted quad if the
+ * hostname lookup fails. It will force a DNS lookup according
+ * to the HostnameLookups setting.
+ * REMOTE_NOLOOKUP is like REMOTE_NAME except that a DNS lookup is
+ * 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)
+ * 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 string is returned
+ * @return The remote hostname (based on the request useragent_ip)
+ */
+AP_DECLARE(const char *) ap_get_useragent_host(request_rec *req, int type,
+ int *str_is_ip);
+
+/**
* Lookup the remote client's DNS name or IP address
* @ingroup get_remote_host
* @param conn The current connection
@@ -180,7 +206,7 @@ AP_DECLARE(const char *) ap_document_root(request_rec *r);
* </pre>
* @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
+ * @return The remote hostname (based on the connection client_ip)
*/
AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip);
@@ -565,7 +591,7 @@ typedef struct {
ap_regex_t *r;
const char *mime_type; /* forced with ForceType */
- const char *handler; /* forced with SetHandler */
+ const char *handler; /* forced by something other than SetHandler */
const char *output_filters; /* forced with SetOutputFilters */
const char *input_filters; /* forced with SetInputFilters */
int accept_path_info; /* forced with AcceptPathInfo */
@@ -642,7 +668,7 @@ typedef struct {
*/
unsigned int cgi_pass_auth : 2;
unsigned int qualify_redirect_url :2;
-
+ ap_expr_info_t *expr_handler; /* forced with SetHandler */
} core_dir_config;
/* macro to implement off by default behaviour */
diff --git a/include/http_protocol.h b/include/http_protocol.h
index 316850e3..447e3a8c 100644
--- a/include/http_protocol.h
+++ b/include/http_protocol.h
@@ -502,7 +502,7 @@ AP_DECLARE(int) ap_should_client_block(request_rec *r);
*/
AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, apr_size_t bufsiz);
-/*
+/**
* Map specific APR codes returned by the filter stack to HTTP error
* codes, or the default status code provided. Use it as follows:
*
diff --git a/include/httpd.h b/include/httpd.h
index 1cd71d66..69e6e3a2 100644
--- a/include/httpd.h
+++ b/include/httpd.h
@@ -1046,6 +1046,15 @@ struct request_rec {
apr_table_t *trailers_in;
/** MIME trailer environment from the response */
apr_table_t *trailers_out;
+
+ /** Originator'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
+ * ap_get_useragent_host() */
+ char *useragent_host;
+ /** have we done double-reverse DNS? -1 yes/failure, 0 not yet,
+ * 1 yes/success
+ */
+ int double_reverse;
};
/**
@@ -1813,7 +1822,7 @@ AP_DECLARE(int) ap_os_is_path_absolute(apr_pool_t *p, const char *dir);
AP_DECLARE(int) ap_is_matchexp(const char *str);
/**
- * Determine if a string matches a patterm containing the wildcards '?' or '*'
+ * Determine if a string matches a pattern containing the wildcards '?' or '*'
* @param str The string to check
* @param expected The pattern to match against
* @return 0 if the two strings match, 1 otherwise
@@ -1821,7 +1830,7 @@ AP_DECLARE(int) ap_is_matchexp(const char *str);
AP_DECLARE(int) ap_strcmp_match(const char *str, const char *expected);
/**
- * Determine if a string matches a patterm containing the wildcards '?' or '*',
+ * Determine if a string matches a pattern containing the wildcards '?' or '*',
* ignoring case
* @param str The string to check
* @param expected The pattern to match against
diff --git a/include/scoreboard.h b/include/scoreboard.h
index 99d6ba74..d712bd43 100644
--- a/include/scoreboard.h
+++ b/include/scoreboard.h
@@ -115,6 +115,7 @@ struct worker_score {
char client[32]; /* Keep 'em small... */
char request[64]; /* We just want an idea... */
char vhost[32]; /* What virtual host is being accessed? */
+ char protocol[16]; /* What protocol is used on the connection? */
};
typedef struct {
@@ -181,6 +182,10 @@ AP_DECLARE(int) ap_update_child_status(ap_sb_handle_t *sbh, int status, request_
AP_DECLARE(int) ap_update_child_status_from_indexes(int child_num, int thread_num,
int status, request_rec *r);
AP_DECLARE(int) ap_update_child_status_from_conn(ap_sb_handle_t *sbh, int status, conn_rec *c);
+AP_DECLARE(int) ap_update_child_status_from_server(ap_sb_handle_t *sbh, int status,
+ conn_rec *c, server_rec *s);
+AP_DECLARE(int) ap_update_child_status_descr(ap_sb_handle_t *sbh, int status, const char *descr);
+
AP_DECLARE(void) ap_time_process_request(ap_sb_handle_t *sbh, int status);
AP_DECLARE(worker_score *) ap_get_scoreboard_worker(ap_sb_handle_t *sbh);