diff options
| author | Stefan Fritsch <sf@sfritsch.de> | 2015-08-02 00:19:16 +0200 |
|---|---|---|
| committer | Stefan Fritsch <sf@sfritsch.de> | 2015-08-02 00:19:16 +0200 |
| commit | 48802c25dc82a8b13ac351c0c2137ef748256bbd (patch) | |
| tree | dcaa03f7f34153303fe5afbc9c99dbb8c44b22b3 /include | |
| parent | 080d5e16db802902200a9ce5b6c40f8f1fdc1f73 (diff) | |
| download | apache2-48802c25dc82a8b13ac351c0c2137ef748256bbd.tar.gz | |
Imported Upstream version 2.4.16
Diffstat (limited to 'include')
| -rw-r--r-- | include/ap_config_auto.h.in | 3 | ||||
| -rw-r--r-- | include/ap_mmn.h | 10 | ||||
| -rw-r--r-- | include/ap_release.h | 2 | ||||
| -rw-r--r-- | include/http_core.h | 23 | ||||
| -rw-r--r-- | include/http_protocol.h | 17 | ||||
| -rw-r--r-- | include/http_request.h | 23 | ||||
| -rw-r--r-- | include/httpd.h | 11 |
7 files changed, 77 insertions, 12 deletions
diff --git a/include/ap_config_auto.h.in b/include/ap_config_auto.h.in index 7dda56e7..dc3481c5 100644 --- a/include/ap_config_auto.h.in +++ b/include/ap_config_auto.h.in @@ -130,6 +130,9 @@ /* Define to 1 if you have the <pwd.h> header file. */ #undef HAVE_PWD_H +/* Define to 1 if you have the `RAND_egd' function. */ +#undef HAVE_RAND_EGD + /* Define to 1 if you have the `setsid' function. */ #undef HAVE_SETSID diff --git a/include/ap_mmn.h b/include/ap_mmn.h index ca433d6d..7e609e3e 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -437,6 +437,14 @@ * 20120211.39 (2.4.11-dev) Add ap_proxy_connect_uds(). * 20120211.40 (2.4.11-dev) Add ap_log_data(), ap_log_rdata(), etc. * 20120211.41 (2.4.11-dev) Add ap_proxy_de_socketfy to mod_proxy.h + * 20120211.42 (2.4.13-dev) Add response_code_exprs to http_core.h + * 20120211.43 (2.4.13-dev) Add keep_alive_timeout_set to server_rec + * 20120211.44 (2.4.13-dev) Add cgi_pass_auth and AP_CGI_PASS_AUTH_* to + * core_dir_config + * 20120211.45 (2.4.13-dev) Add ap_proxy_connection_reusable() + * 20120211.46 (2.4.13-dev) Add ap_map_http_request_error() + * 20120211.47 (2.4.13-dev) Add ap_some_authn_required, ap_force_authn hook. + * Deprecate broken ap_some_auth_required. */ #define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */ @@ -444,7 +452,7 @@ #ifndef MODULE_MAGIC_NUMBER_MAJOR #define MODULE_MAGIC_NUMBER_MAJOR 20120211 #endif -#define MODULE_MAGIC_NUMBER_MINOR 41 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 47 /* 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 c71cbc6e..f7542cf8 100644 --- a/include/ap_release.h +++ b/include/ap_release.h @@ -43,7 +43,7 @@ #define AP_SERVER_MAJORVERSION_NUMBER 2 #define AP_SERVER_MINORVERSION_NUMBER 4 -#define AP_SERVER_PATCHLEVEL_NUMBER 12 +#define AP_SERVER_PATCHLEVEL_NUMBER 16 #define AP_SERVER_DEVBUILD_BOOLEAN 0 /* Synchronize the above with docs/manual/style/version.ent */ diff --git a/include/http_core.h b/include/http_core.h index 5cef6224..8171823a 100644 --- a/include/http_core.h +++ b/include/http_core.h @@ -497,12 +497,7 @@ typedef struct { 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(). - */ - + /* Used to be the custom response config. No longer used. */ char **response_code_strings; /* from ErrorDocument, not from * ap_custom_response() */ @@ -617,10 +612,24 @@ typedef struct { /** Max number of Range reversals (eg: 200-300, 100-125) allowed **/ int max_reversals; - /** Named back references */ apr_array_header_t *refs; + /** Custom response config with expression support. The hash table + * contains compiled expressions keyed against the custom response + * code. + */ + apr_hash_t *response_code_exprs; + +#define AP_CGI_PASS_AUTH_OFF (0) +#define AP_CGI_PASS_AUTH_ON (1) +#define AP_CGI_PASS_AUTH_UNSET (2) + /** CGIPassAuth: Whether HTTP authorization headers will be passed to + * scripts as CGI variables; affects all modules calling + * ap_add_common_vars(), as well as any others using this field as + * advice + */ + unsigned int cgi_pass_auth : 2; } core_dir_config; /* macro to implement off by default behaviour */ diff --git a/include/http_protocol.h b/include/http_protocol.h index cdf8f589..ee61b687 100644 --- a/include/http_protocol.h +++ b/include/http_protocol.h @@ -502,6 +502,23 @@ 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: + * + * return ap_map_http_request_error(rv, HTTP_BAD_REQUEST); + * + * If the filter has already handled the error, AP_FILTER_ERROR will + * be returned, which is cleanly passed through. + * + * These mappings imply that the filter stack is reading from the + * downstream client, the proxy will map these codes differently. + * @param rv APR status code + * @param status Default HTTP code should the APR code not be recognised + * @return Mapped HTTP status code + */ +AP_DECLARE(int) ap_map_http_request_error(apr_status_t rv, int status); + /** * In HTTP/1.1, any method can have a body. However, most GET handlers * wouldn't know what to do with a request body if they received one. diff --git a/include/http_request.h b/include/http_request.h index e7b0a3a7..fabb4c84 100644 --- a/include/http_request.h +++ b/include/http_request.h @@ -185,6 +185,8 @@ AP_DECLARE(void) ap_internal_fast_redirect(request_rec *sub_req, request_rec *r) * is required for the current request * @param r The current request * @return 1 if authentication is required, 0 otherwise + * @bug Behavior changed in 2.4.x refactoring, API no longer usable + * @deprecated @see ap_some_authn_required() */ AP_DECLARE(int) ap_some_auth_required(request_rec *r); @@ -539,6 +541,16 @@ AP_DECLARE_HOOK(void,insert_filter,(request_rec *r)) AP_DECLARE_HOOK(int,post_perdir_config,(request_rec *r)) /** + * This hook allows a module to force authn to be required when + * processing a request. + * This hook should be registered with ap_hook_force_authn(). + * @param r The current request + * @return OK (force authn), DECLINED (let later modules decide) + * @ingroup hooks + */ +AP_DECLARE_HOOK(int,force_authn,(request_rec *r)) + +/** * This hook allows modules to handle/emulate the apr_stat() calls * needed for directory walk. * @param finfo where to put the stat data @@ -584,6 +596,17 @@ AP_DECLARE(apr_bucket *) ap_bucket_eor_make(apr_bucket *b, request_rec *r); AP_DECLARE(apr_bucket *) ap_bucket_eor_create(apr_bucket_alloc_t *list, request_rec *r); +/** + * Can be used within any handler to determine if any authentication + * is required for the current request. Note that if used with an + * access_checker hook, an access_checker_ex hook or an authz provider; the + * caller should take steps to avoid a loop since this function is + * implemented by calling these hooks. + * @param r The current request + * @return TRUE if authentication is required, FALSE otherwise + */ +AP_DECLARE(int) ap_some_authn_required(request_rec *r); + #ifdef __cplusplus } #endif diff --git a/include/httpd.h b/include/httpd.h index c6cd8279..64ab325d 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -953,8 +953,9 @@ struct request_rec { char *uri; /** The filename on disk corresponding to this response */ char *filename; - /* XXX: What does this mean? Please define "canonicalize" -aaron */ - /** The true filename, we canonicalize r->filename if these don't match */ + /** The true filename stored in the filesystem, as in the true alpha case + * and alias correction, e.g. "Image.jpeg" not "IMAGE$1.JPE" on Windows. + * The core map_to_storage canonicalizes r->filename when they mismatch */ char *canonical_filename; /** The PATH_INFO extracted from this request */ char *path_info; @@ -1309,9 +1310,13 @@ struct server_rec { /** limit on number of request header fields */ int limit_req_fields; - /** Opaque storage location */ void *context; + + /** Whether the keepalive timeout is explicit (1) or + * inherited (0) from the base server (either first + * server on the same IP:port or main server) */ + unsigned int keep_alive_timeout_set:1; }; /** |
