fix a misleading comment about s->defn_name
use the provided types via the macro
* modules/metadata/mod_mime_magic.c: Constify some constant
data, remove unused "suf_recursion" field. No functional
change.
Axe some dead code + slighly improve a comment
Fix a typo
Fix a typo
* modules/ssl/ssl_engine_log.c (ssl_log_cert_error): Use string
length returned by apr_vsnprintf. No functional change.
mod_authz_core: follow up to r1864759.
We should at least log the unexpected provider_name == NULL condition.
Submitted by: covener, jorton, jailletc36, jailletc36, jailletc36, jorton, ylavic
Reviewed by: jailletc36, jim, ylavic
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1872789 13f79535-47bb-0310-9956-
ffa450edef68
This program may be used and copied freely providing this copyright notice
is not removed.
-This software is provided "as is" and any express or implied waranties,
+This software is provided "as is" and any express or implied warranties,
including but not limited to, the implied warranties of merchantability and
fitness for a particular purpose are disclaimed. In no event shall
Zeus Technology Ltd. be liable for any direct, indirect, incidental, special,
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- *) Easy patches: synch 2.4.x and trunk
- - core: Fix a comment
- - mod_auth_form: use the provided types via the macro
- - mod_mime_magic: Constify some constant data
- - mod_authz_core: Axe some dead code + slighly improve a comment
- - core: Fix a typo
- - mod_remoteip: Fix a typo
- - mod_ssl: save a few cycles
- trunk patch:
- - http://svn.apache.org/r1851332
- - http://svn.apache.org/r1861432
- - http://svn.apache.org/r1862202
- - http://svn.apache.org/r1864759
- - http://svn.apache.org/r1867254
- - http://svn.apache.org/r1867255
- - http://svn.apache.org/r1867569
- 2.4.x patch: svn merge -c 1851332,1861432,1862202,1864759,1867254,1867255,1867569 ^/httpd/httpd/trunk .
- +1: jailletc36, jim
- ylavic: +1 with r1869512, follow up to r1864759
-
*) mod_proxy: Fix crash by resolving pool concurrency problems. PR 63503
trunk patch: http://svn.apache.org/r1822531
http://svn.apache.org/r1829676
/** MIME type info, etc., before we start checking per-directory info */
struct ap_conf_vector_t *lookup_defaults;
- /** The name of the server */
+ /** The path to the config file that the server was defined in */
const char *defn_name;
/** The line of the config file that the server was defined on */
unsigned defn_line_number;
#define FORM_REDIRECT_HANDLER "form-redirect-handler"
#define MOD_AUTH_FORM_HASH "site"
-static int (*ap_session_load_fn) (request_rec * r, session_rec ** z) = NULL;
-static apr_status_t (*ap_session_get_fn)(request_rec * r, session_rec * z,
- const char *key, const char **value) = NULL;
-static apr_status_t (*ap_session_set_fn)(request_rec * r, session_rec * z,
- const char *key, const char *value) = NULL;
+static APR_OPTIONAL_FN_TYPE(ap_session_load) *ap_session_load_fn = NULL;
+static APR_OPTIONAL_FN_TYPE(ap_session_get) *ap_session_get_fn = NULL;
+static APR_OPTIONAL_FN_TYPE(ap_session_set) *ap_session_set_fn = NULL;
+
static void (*ap_request_insert_filter_fn) (request_rec * r) = NULL;
static void (*ap_request_remove_filter_fn) (request_rec * r) = NULL;
const void *parsed_require_args)
{
const char *provider_name;
- authz_status ret = AUTHZ_DENIED;
/* Look up the provider alias in the alias list.
- * Get the dir_config and call ap_Merge_per_dir_configs()
+ * Get the dir_config and call ap_merge_per_dir_configs()
* Call the real provider->check_authorization() function
- * return the result of the above function call
+ * Return the result of the above function call
*/
provider_name = apr_table_get(r->notes, AUTHZ_PROVIDER_NAME_NOTE);
configurations and call the real provider */
if (prvdraliasrec) {
ap_conf_vector_t *orig_dir_config = r->per_dir_config;
+ authz_status ret;
r->per_dir_config =
ap_merge_per_dir_configs(r->pool, orig_dir_config,
prvdraliasrec->provider_parsed_args);
r->per_dir_config = orig_dir_config;
+
+ return ret;
}
- else {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02305)
- "no alias provider found for '%s' (BUG?)",
- provider_name);
- }
- }
- else {
- ap_assert(provider_name != NULL);
}
- return ret;
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02305)
+ "no alias provider found for '%s' (BUG?)",
+ provider_name ? provider_name : "n/a");
+
+ return AUTHZ_DENIED;
}
static const authz_provider authz_alias_provider =
#define L_MAIL 8 /* Electronic mail */
#define L_NEWS 9 /* Usenet Netnews */
-static const char *types[] =
+static const char *const types[] =
{
"text/html", /* HTML */
"text/plain", /* "c program text", */
typedef struct {
magic_rsl *head; /* result string list */
magic_rsl *tail;
- unsigned suf_recursion; /* recursion depth in suffix check */
} magic_req_rec;
/*
* - uncompress old into new, using method, return sizeof new
*/
-static struct {
- char *magic;
+static const struct {
+ const char *magic;
apr_size_t maglen;
- char *argv[3];
+ const char *argv[3];
int silent;
- char *encoding; /* MUST be lowercase */
+ const char *encoding; /* MUST be lowercase */
} compr[] = {
/* we use gzip here rather than uncompress because we have to pass
},
};
-static int ncompr = sizeof(compr) / sizeof(compr[0]);
+#define ncompr (sizeof(compr) / sizeof(compr[0]))
static int zmagic(request_rec *r, unsigned char *buf, apr_size_t nbytes)
{
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, new, APLOGNO(03491)
"RemoteIPProxyProtocol: previous setting for %s:%hu from virtual "
- "host {%s:%hu in %s} is being overriden by virtual host "
+ "host {%s:%hu in %s} is being overridden by virtual host "
"{%s:%hu in %s}; new setting is '%s'",
buf, prev->addr->port, prev->source->server_hostname,
prev->source->addrs->host_port, prev->source->defn_name,
int msglen, n;
char *name;
- apr_vsnprintf(buf, sizeof buf, format, ap);
-
- msglen = strlen(buf);
-
+ msglen = apr_vsnprintf(buf, sizeof buf, format, ap);
+
if (cert) {
BIO *bio = BIO_new(BIO_s_mem());