summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorJim Jagielski <jim@apache.org>2005-11-10 15:11:44 +0000
committerJim Jagielski <jim@apache.org>2005-11-10 15:11:44 +0000
commit5061d9fa920cb1821a51495fc42833c54e5bd714 (patch)
tree212a163a8ebdf03be40d91175bc632e5331a70c4 /modules
parent5d2fae4818e5eca5c32f439da1dbaed1bb2dad1b (diff)
downloadhttpd-5061d9fa920cb1821a51495fc42833c54e5bd714.tar.gz
No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or tabs are now really blank lines git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules')
-rw-r--r--modules/aaa/mod_auth_basic.c4
-rw-r--r--modules/aaa/mod_auth_digest.c58
-rw-r--r--modules/aaa/mod_authn_alias.c26
-rw-r--r--modules/aaa/mod_authn_anon.c10
-rw-r--r--modules/aaa/mod_authn_dbd.c2
-rw-r--r--modules/aaa/mod_authn_dbm.c14
-rw-r--r--modules/aaa/mod_authnz_ldap.c150
-rw-r--r--modules/aaa/mod_authz_dbm.c8
-rw-r--r--modules/aaa/mod_authz_default.c4
-rw-r--r--modules/aaa/mod_authz_groupfile.c22
-rw-r--r--modules/aaa/mod_authz_host.c6
-rw-r--r--modules/aaa/mod_authz_owner.c2
-rw-r--r--modules/aaa/mod_authz_user.c6
-rw-r--r--modules/arch/netware/libprews.c4
-rw-r--r--modules/arch/netware/mod_netware.c12
-rw-r--r--modules/arch/netware/mod_nw_ssl.c166
-rw-r--r--modules/arch/win32/mod_isapi.c246
-rw-r--r--modules/arch/win32/mod_win32.c60
-rw-r--r--modules/cache/cache_hash.c4
-rw-r--r--modules/cache/cache_storage.c18
-rw-r--r--modules/cache/cache_util.c32
-rw-r--r--modules/cache/mod_cache.c88
-rw-r--r--modules/cache/mod_disk_cache.c28
-rw-r--r--modules/cache/mod_file_cache.c40
-rw-r--r--modules/cache/mod_mem_cache.c134
-rw-r--r--modules/dav/fs/dbm.c4
-rw-r--r--modules/dav/fs/lock.c26
-rw-r--r--modules/dav/fs/repos.c44
-rw-r--r--modules/dav/lock/locks.c4
-rw-r--r--modules/dav/main/liveprop.c2
-rw-r--r--modules/dav/main/mod_dav.c20
-rw-r--r--modules/dav/main/util.c70
-rw-r--r--modules/dav/main/util_lock.c12
-rw-r--r--modules/debug/mod_bucketeer.c12
-rw-r--r--modules/debug/mod_dumpio.c16
-rw-r--r--modules/echo/mod_echo.c4
-rw-r--r--modules/experimental/mod_case_filter.c2
-rw-r--r--modules/experimental/mod_case_filter_in.c8
-rw-r--r--modules/experimental/mod_example.c24
-rw-r--r--modules/filters/mod_charset_lite.c114
-rw-r--r--modules/filters/mod_deflate.c22
-rw-r--r--modules/filters/mod_ext_filter.c78
-rw-r--r--modules/filters/mod_filter.c8
-rw-r--r--modules/filters/mod_include.c40
-rw-r--r--modules/generators/mod_asis.c4
-rw-r--r--modules/generators/mod_autoindex.c4
-rw-r--r--modules/generators/mod_cgi.c54
-rw-r--r--modules/generators/mod_cgid.c798
-rw-r--r--modules/generators/mod_info.c14
-rw-r--r--modules/generators/mod_status.c28
-rw-r--r--modules/http/byterange_filter.c10
-rw-r--r--modules/http/chunk_filter.c2
-rw-r--r--modules/http/http_core.c26
-rw-r--r--modules/http/http_etag.c4
-rw-r--r--modules/http/http_filters.c40
-rw-r--r--modules/http/http_protocol.c20
-rw-r--r--modules/http/http_request.c30
-rw-r--r--modules/http/mod_mime.c80
-rw-r--r--modules/ldap/util_ldap.c388
-rw-r--r--modules/ldap/util_ldap_cache.c18
-rw-r--r--modules/ldap/util_ldap_cache_mgr.c52
-rw-r--r--modules/loggers/mod_log_config.c58
-rw-r--r--modules/loggers/mod_log_forensic.c2
-rw-r--r--modules/loggers/mod_logio.c2
-rw-r--r--modules/mappers/mod_actions.c12
-rw-r--r--modules/mappers/mod_alias.c16
-rw-r--r--modules/mappers/mod_dir.c16
-rw-r--r--modules/mappers/mod_imagemap.c8
-rw-r--r--modules/mappers/mod_negotiation.c2
-rw-r--r--modules/mappers/mod_rewrite.c10
-rw-r--r--modules/mappers/mod_so.c58
-rw-r--r--modules/mappers/mod_speling.c12
-rw-r--r--modules/mappers/mod_userdir.c10
-rw-r--r--modules/mappers/mod_vhost_alias.c28
-rw-r--r--modules/metadata/mod_cern_meta.c20
-rw-r--r--modules/metadata/mod_env.c8
-rw-r--r--modules/metadata/mod_expires.c24
-rw-r--r--modules/metadata/mod_headers.c44
-rw-r--r--modules/metadata/mod_mime_magic.c20
-rw-r--r--modules/metadata/mod_setenvif.c10
-rw-r--r--modules/metadata/mod_unique_id.c18
-rw-r--r--modules/metadata/mod_usertrack.c6
-rw-r--r--modules/metadata/mod_version.c4
-rw-r--r--modules/proxy/ajp_header.c46
-rw-r--r--modules/proxy/ajp_link.c12
-rw-r--r--modules/proxy/ajp_msg.c44
-rw-r--r--modules/proxy/mod_proxy.c120
-rw-r--r--modules/proxy/mod_proxy_ajp.c2
-rw-r--r--modules/proxy/mod_proxy_balancer.c94
-rw-r--r--modules/proxy/mod_proxy_connect.c12
-rw-r--r--modules/proxy/mod_proxy_ftp.c28
-rw-r--r--modules/proxy/mod_proxy_http.c90
-rw-r--r--modules/proxy/proxy_util.c46
-rw-r--r--modules/ssl/mod_ssl.c16
-rw-r--r--modules/ssl/ssl_engine_config.c26
-rw-r--r--modules/ssl/ssl_engine_dh.c6
-rw-r--r--modules/ssl/ssl_engine_init.c22
-rw-r--r--modules/ssl/ssl_engine_io.c86
-rw-r--r--modules/ssl/ssl_engine_kernel.c60
-rw-r--r--modules/ssl/ssl_engine_log.c6
-rw-r--r--modules/ssl/ssl_engine_mutex.c2
-rw-r--r--modules/ssl/ssl_engine_pphrase.c24
-rw-r--r--modules/ssl/ssl_engine_rand.c4
-rw-r--r--modules/ssl/ssl_engine_vars.c30
-rw-r--r--modules/ssl/ssl_expr_eval.c2
-rw-r--r--modules/ssl/ssl_expr_parse.c10
-rw-r--r--modules/ssl/ssl_expr_scan.c18
-rw-r--r--modules/ssl/ssl_scache.c2
-rw-r--r--modules/ssl/ssl_scache_dbm.c6
-rw-r--r--modules/ssl/ssl_scache_dc.c6
-rw-r--r--modules/ssl/ssl_scache_shmcb.c44
-rw-r--r--modules/ssl/ssl_util.c28
-rw-r--r--modules/ssl/ssl_util_ssl.c20
113 files changed, 2263 insertions, 2263 deletions
diff --git a/modules/aaa/mod_auth_basic.c b/modules/aaa/mod_auth_basic.c
index ee296a4491..c6192b36ef 100644
--- a/modules/aaa/mod_auth_basic.c
+++ b/modules/aaa/mod_auth_basic.c
@@ -256,7 +256,7 @@ static int authenticate_basic_user(request_rec *r)
current_provider = current_provider->next;
} while (current_provider);
-
+
if (auth_result != AUTH_GRANTED) {
int return_code;
@@ -280,7 +280,7 @@ static int authenticate_basic_user(request_rec *r)
break;
case AUTH_GENERAL_ERROR:
default:
- /* We'll assume that the module has already said what its error
+ /* We'll assume that the module has already said what its error
* was in the logs.
*/
return_code = HTTP_INTERNAL_SERVER_ERROR;
diff --git a/modules/aaa/mod_auth_digest.c b/modules/aaa/mod_auth_digest.c
index 395fee0711..8a0ee5a130 100644
--- a/modules/aaa/mod_auth_digest.c
+++ b/modules/aaa/mod_auth_digest.c
@@ -51,7 +51,7 @@
* The only problem is that it allows replay attacks when somebody
* captures a packet sent to one server and sends it to another
* one. Should we add "AuthDigestNcCheck Strict"?
- * - expired nonces give amaya fits.
+ * - expired nonces give amaya fits.
*/
#include "apr_sha1.h"
@@ -80,8 +80,8 @@
#include "mod_auth.h"
-/* Disable shmem until pools/init gets sorted out
- * remove following two lines when fixed
+/* Disable shmem until pools/init gets sorted out
+ * remove following two lines when fixed
*/
#undef APR_HAS_SHARED_MEMORY
#define APR_HAS_SHARED_MEMORY 0
@@ -200,7 +200,7 @@ module AP_MODULE_DECLARE_DATA auth_digest_module;
static apr_status_t cleanup_tables(void *not_used)
{
- ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
+ ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
"Digest: cleaning up shared memory");
fflush(stderr);
@@ -238,7 +238,7 @@ static apr_status_t initialize_secret(server_rec *s)
if (status != APR_SUCCESS) {
char buf[120];
ap_log_error(APLOG_MARK, APLOG_CRIT, status, s,
- "Digest: error generating secret: %s",
+ "Digest: error generating secret: %s",
apr_strerror(status, buf, sizeof(buf)));
return status;
}
@@ -447,13 +447,13 @@ static const char *add_authn_provider(cmd_parms *cmd, void *config,
digest_config_rec *conf = (digest_config_rec*)config;
authn_provider_list *newp;
const char *provider_name;
-
+
if (strcasecmp(arg, "on") == 0) {
provider_name = AUTHN_DEFAULT_PROVIDER;
}
else if (strcasecmp(arg, "off") == 0) {
/* Clear all configured providers and return. */
- conf->providers = NULL;
+ conf->providers = NULL;
return NULL;
}
else {
@@ -540,7 +540,7 @@ static const char *set_nonce_lifetime(cmd_parms *cmd, void *config,
char *endptr;
long lifetime;
- lifetime = strtol(t, &endptr, 10);
+ lifetime = strtol(t, &endptr, 10);
if (endptr < (t+strlen(t)) && !apr_isspace(*endptr)) {
return apr_pstrcat(cmd->pool,
"Invalid time in AuthDigestNonceLifetime: ",
@@ -608,7 +608,7 @@ static const char *set_shmem_size(cmd_parms *cmd, void *config,
char *endptr;
long size, min;
- size = strtol(size_str, &endptr, 10);
+ size = strtol(size_str, &endptr, 10);
while (apr_isspace(*endptr)) endptr++;
if (*endptr == '\0' || *endptr == 'b' || *endptr == 'B') {
;
@@ -645,23 +645,23 @@ static const char *set_shmem_size(cmd_parms *cmd, void *config,
static const command_rec digest_cmds[] =
{
- AP_INIT_TAKE1("AuthName", set_realm, NULL, OR_AUTHCFG,
+ AP_INIT_TAKE1("AuthName", set_realm, NULL, OR_AUTHCFG,
"The authentication realm (e.g. \"Members Only\")"),
AP_INIT_ITERATE("AuthDigestProvider", add_authn_provider, NULL, OR_AUTHCFG,
"specify the auth providers for a directory or location"),
- AP_INIT_ITERATE("AuthDigestQop", set_qop, NULL, OR_AUTHCFG,
+ AP_INIT_ITERATE("AuthDigestQop", set_qop, NULL, OR_AUTHCFG,
"A list of quality-of-protection options"),
- AP_INIT_TAKE1("AuthDigestNonceLifetime", set_nonce_lifetime, NULL, OR_AUTHCFG,
+ AP_INIT_TAKE1("AuthDigestNonceLifetime", set_nonce_lifetime, NULL, OR_AUTHCFG,
"Maximum lifetime of the server nonce (seconds)"),
- AP_INIT_TAKE1("AuthDigestNonceFormat", set_nonce_format, NULL, OR_AUTHCFG,
+ AP_INIT_TAKE1("AuthDigestNonceFormat", set_nonce_format, NULL, OR_AUTHCFG,
"The format to use when generating the server nonce"),
- AP_INIT_FLAG("AuthDigestNcCheck", set_nc_check, NULL, OR_AUTHCFG,
+ AP_INIT_FLAG("AuthDigestNcCheck", set_nc_check, NULL, OR_AUTHCFG,
"Whether or not to check the nonce-count sent by the client"),
- AP_INIT_TAKE1("AuthDigestAlgorithm", set_algorithm, NULL, OR_AUTHCFG,
+ AP_INIT_TAKE1("AuthDigestAlgorithm", set_algorithm, NULL, OR_AUTHCFG,
"The algorithm used for the hash calculation"),
- AP_INIT_ITERATE("AuthDigestDomain", set_uri_list, NULL, OR_AUTHCFG,
+ AP_INIT_ITERATE("AuthDigestDomain", set_uri_list, NULL, OR_AUTHCFG,
"A list of URI's which belong to the same protection space as the current URI"),
- AP_INIT_TAKE1("AuthDigestShmemSize", set_shmem_size, NULL, RSRC_CONF,
+ AP_INIT_TAKE1("AuthDigestShmemSize", set_shmem_size, NULL, RSRC_CONF,
"The amount of shared memory to allocate for keeping track of clients"),
{NULL}
};
@@ -1300,13 +1300,13 @@ static void note_digest_auth_failure(request_rec *r,
* unneccessarily (it's usually > 200 bytes!).
*/
-
+
/* don't send domain
* - for proxy requests
* - if it's no specified
*/
if (r->proxyreq || !conf->uri_list) {
- domain = NULL;
+ domain = NULL;
}
else {
domain = conf->uri_list;
@@ -1464,7 +1464,7 @@ static int check_nonce(request_rec *r, digest_header_rec *resp,
if (dt > conf->nonce_lifetime) {
ap_log_rerror(APLOG_MARK, APLOG_INFO, 0,r,
"Digest: user %s: nonce expired (%.2f seconds old "
- "- max lifetime %.2f) - sending new nonce",
+ "- max lifetime %.2f) - sending new nonce",
r->user, (double)apr_time_sec(dt),
(double)apr_time_sec(conf->nonce_lifetime));
note_digest_auth_failure(r, conf, resp, 1);
@@ -1536,7 +1536,7 @@ static const char *new_digest(const request_rec *r,
}
-static void copy_uri_components(apr_uri_t *dst,
+static void copy_uri_components(apr_uri_t *dst,
apr_uri_t *src, request_rec *r) {
if (src->scheme && src->scheme[0] != '\0') {
dst->scheme = src->scheme;
@@ -1684,30 +1684,30 @@ static int authenticate_digest_user(request_rec *r)
ap_unescape_url(d_uri.query);
}
else if (r_uri.query) {
- /* MSIE compatibility hack. MSIE has some RFC issues - doesn't
+ /* MSIE compatibility hack. MSIE has some RFC issues - doesn't
* include the query string in the uri Authorization component
* or when computing the response component. the second part
* works out ok, since we can hash the header and get the same
* result. however, the uri from the request line won't match
- * the uri Authorization component since the header lacks the
+ * the uri Authorization component since the header lacks the
* query string, leaving us incompatable with a (broken) MSIE.
- *
+ *
* the workaround is to fake a query string match if in the proper
* environment - BrowserMatch MSIE, for example. the cool thing
- * is that if MSIE ever fixes itself the simple match ought to
+ * is that if MSIE ever fixes itself the simple match ought to
* work and this code won't be reached anyway, even if the
* environment is set.
*/
- if (apr_table_get(r->subprocess_env,
+ if (apr_table_get(r->subprocess_env,
"AuthDigestEnableQueryStringHack")) {
-
+
ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "Digest: "
"applying AuthDigestEnableQueryStringHack "
"to uri <%s>", resp->raw_request_uri);
d_uri.query = r_uri.query;
- }
+ }
}
if (r->method_number == M_CONNECT) {
@@ -1800,7 +1800,7 @@ static int authenticate_digest_user(request_rec *r)
*/
return HTTP_INTERNAL_SERVER_ERROR;
}
-
+
if (resp->message_qop == NULL) {
/* old (rfc-2069) style digest */
if (strcmp(resp->digest, old_digest(r, resp, conf->ha1))) {
diff --git a/modules/aaa/mod_authn_alias.c b/modules/aaa/mod_authn_alias.c
index 83d067774f..648ab059b9 100644
--- a/modules/aaa/mod_authn_alias.c
+++ b/modules/aaa/mod_authn_alias.c
@@ -51,19 +51,19 @@ static authn_status authn_alias_check_password(request_rec *r, const char *user,
const char *provider_name = apr_table_get(r->notes, AUTHN_PROVIDER_NAME_NOTE);
authn_status ret = AUTH_USER_NOT_FOUND;
- authn_alias_srv_conf *authcfg =
- (authn_alias_srv_conf *)ap_get_module_config(r->server->module_config,
+ authn_alias_srv_conf *authcfg =
+ (authn_alias_srv_conf *)ap_get_module_config(r->server->module_config,
&authn_alias_module);
if (provider_name) {
- provider_alias_rec *prvdraliasrec = apr_hash_get(authcfg->alias_rec,
+ provider_alias_rec *prvdraliasrec = apr_hash_get(authcfg->alias_rec,
provider_name, APR_HASH_KEY_STRING);
ap_conf_vector_t *orig_dir_config = r->per_dir_config;
- /* If we found the alias provider in the list, then merge the directory
+ /* If we found the alias provider in the list, then merge the directory
configurations and call the real provider */
if (prvdraliasrec) {
- r->per_dir_config = ap_merge_per_dir_configs(r->pool, orig_dir_config,
+ r->per_dir_config = ap_merge_per_dir_configs(r->pool, orig_dir_config,
prvdraliasrec->sec_auth);
ret = prvdraliasrec->provider->check_password(r,user,password);
r->per_dir_config = orig_dir_config;
@@ -83,19 +83,19 @@ static authn_status authn_alias_get_realm_hash(request_rec *r, const char *user,
const char *provider_name = apr_table_get(r->notes, AUTHN_PROVIDER_NAME_NOTE);
authn_status ret = AUTH_USER_NOT_FOUND;
- authn_alias_srv_conf *authcfg =
- (authn_alias_srv_conf *)ap_get_module_config(r->server->module_config,
+ authn_alias_srv_conf *authcfg =
+ (authn_alias_srv_conf *)ap_get_module_config(r->server->module_config,
&authn_alias_module);
if (provider_name) {
- provider_alias_rec *prvdraliasrec = apr_hash_get(authcfg->alias_rec,
+ provider_alias_rec *prvdraliasrec = apr_hash_get(authcfg->alias_rec,
provider_name, APR_HASH_KEY_STRING);
ap_conf_vector_t *orig_dir_config = r->per_dir_config;
- /* If we found the alias provider in the list, then merge the directory
+ /* If we found the alias provider in the list, then merge the directory
configurations and call the real provider */
if (prvdraliasrec) {
- r->per_dir_config = ap_merge_per_dir_configs(r->pool, orig_dir_config,
+ r->per_dir_config = ap_merge_per_dir_configs(r->pool, orig_dir_config,
prvdraliasrec->sec_auth);
ret = prvdraliasrec->provider->get_realm_hash(r,user,realm,rethash);
r->per_dir_config = orig_dir_config;
@@ -131,8 +131,8 @@ static const char *authaliassection(cmd_parms *cmd, void *mconfig, const char *a
char *provider_name;
const char *errmsg;
ap_conf_vector_t *new_auth_config = ap_create_per_dir_config(cmd->pool);
- authn_alias_srv_conf *authcfg =
- (authn_alias_srv_conf *)ap_get_module_config(cmd->server->module_config,
+ authn_alias_srv_conf *authcfg =
+ (authn_alias_srv_conf *)ap_get_module_config(cmd->server->module_config,
&authn_alias_module);
const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
@@ -170,7 +170,7 @@ static const char *authaliassection(cmd_parms *cmd, void *mconfig, const char *a
provider_alias_rec *prvdraliasrec = apr_pcalloc(cmd->pool, sizeof(provider_alias_rec));
const authn_provider *provider = ap_lookup_provider(AUTHN_PROVIDER_GROUP, provider_name,"0");
- /* Save off the new directory config along with the original provider name
+ /* Save off the new directory config along with the original provider name
and function pointer data */
prvdraliasrec->sec_auth = new_auth_config;
prvdraliasrec->provider_name = provider_name;
diff --git a/modules/aaa/mod_authn_anon.c b/modules/aaa/mod_authn_anon.c
index b0e48fbbdd..e3c308d651 100644
--- a/modules/aaa/mod_authn_anon.c
+++ b/modules/aaa/mod_authn_anon.c
@@ -20,7 +20,7 @@
* as the password.
*
* Just add the following tokes to your <directory> setup:
- *
+ *
* Anonymous magic-userid [magic-userid]...
*
* Anonymous_MustGiveEmail [ on | off ] default = on
@@ -28,8 +28,8 @@
* Anonymous_VerifyEmail [ on | off ] default = off
* Anonymous_NoUserId [ on | off ] default = off
*
- * The magic user id is something like 'anonymous', it is NOT case sensitive.
- *
+ * The magic user id is something like 'anonymous', it is NOT case sensitive.
+ *
* The MustGiveEmail flag can be used to force users to enter something
* in the password field (like an email address). Default is on.
*
@@ -38,7 +38,7 @@
* in broken GUIs like W95 is often given by the user. The Default is off.
*
* Dirk.vanGulik@jrc.it; http://ewse.ceo.org; http://me-www.jrc.it/~dirkx
- *
+ *
*/
#include "apr_strings.h"
@@ -113,7 +113,7 @@ static const char *anon_set_string_slots(cmd_parms *cmd,
static const command_rec authn_anon_cmds[] =
{
- AP_INIT_ITERATE("Anonymous", anon_set_string_slots, NULL, OR_AUTHCFG,
+ AP_INIT_ITERATE("Anonymous", anon_set_string_slots, NULL, OR_AUTHCFG,
"a space-separated list of user IDs"),
AP_INIT_FLAG("Anonymous_MustGiveEmail", ap_set_flag_slot,
(void *)APR_OFFSETOF(authn_anon_config_rec, mustemail),
diff --git a/modules/aaa/mod_authn_dbd.c b/modules/aaa/mod_authn_dbd.c
index 39e75621ab..15d1ae4bb2 100644
--- a/modules/aaa/mod_authn_dbd.c
+++ b/modules/aaa/mod_authn_dbd.c
@@ -202,7 +202,7 @@ static void authn_dbd_hooks(apr_pool_t *p)
&authn_dbd_password,
&authn_dbd_realm
};
-
+
ap_register_provider(p, AUTHN_PROVIDER_GROUP, "dbd", "0", &authn_dbd_provider);
}
module AP_MODULE_DECLARE_DATA authn_dbd_module =
diff --git a/modules/aaa/mod_authn_dbm.c b/modules/aaa/mod_authn_dbm.c
index 2f66203212..d9ed980bc1 100644
--- a/modules/aaa/mod_authn_dbm.c
+++ b/modules/aaa/mod_authn_dbm.c
@@ -16,9 +16,9 @@
/*
* http_auth: authentication
- *
+ *
* Rob McCool & Brian Behlendorf.
- *
+ *
* Adapted to Apache by rst.
*
*/
@@ -54,12 +54,12 @@ static void *create_authn_dbm_dir_config(apr_pool_t *p, char *d)
return conf;
}
-static const char *set_dbm_type(cmd_parms *cmd,
- void *dir_config,
+static const char *set_dbm_type(cmd_parms *cmd,
+ void *dir_config,
const char *arg)
{
authn_dbm_config_rec *conf = dir_config;
-
+
conf->dbmtype = apr_pstrdup(cmd->pool, arg);
return NULL;
}
@@ -85,7 +85,7 @@ static apr_status_t fetch_dbm_value(const char *dbmtype, const char *dbmfile,
apr_datum_t key, val;
apr_status_t rv;
- rv = apr_dbm_open_ex(&f, dbmtype, dbmfile, APR_DBM_READONLY,
+ rv = apr_dbm_open_ex(&f, dbmtype, dbmfile, APR_DBM_READONLY,
APR_OS_DEFAULT, pool);
if (rv != APR_SUCCESS) {
@@ -106,7 +106,7 @@ static apr_status_t fetch_dbm_value(const char *dbmtype, const char *dbmfile,
}
apr_dbm_close(f);
-
+
return rv;
}
diff --git a/modules/aaa/mod_authnz_ldap.c b/modules/aaa/mod_authnz_ldap.c
index e1ef01bb01..586f80bf43 100644
--- a/modules/aaa/mod_authnz_ldap.c
+++ b/modules/aaa/mod_authnz_ldap.c
@@ -67,9 +67,9 @@ typedef struct {
int compare_dn_on_server; /* If true, will use server to do DN compare */
int have_ldap_url; /* Set if we have found an LDAP url */
-
+
apr_array_header_t *groupattr; /* List of Group attributes */
- int group_attrib_is_dn; /* If true, the group attribute is the DN, otherwise,
+ int group_attrib_is_dn; /* If true, the group attribute is the DN, otherwise,
it's the exact string passed by the HTTP client */
int secure; /* True if SSL connections are requested */
@@ -106,12 +106,12 @@ static char* derive_codepage_from_lang (apr_pool_t *p, char *language)
{
int lang_len;
char *charset;
-
+
if (!language) /* our default codepage */
return apr_pstrdup(p, "ISO-8859-1");
else
lang_len = strlen(language);
-
+
charset = (char*) apr_hash_get(charset_conversions, language, APR_HASH_KEY_STRING);
if (!charset) {
@@ -163,14 +163,14 @@ static apr_xlate_t* get_conv_set (request_rec *r)
* combined with a filter made up of the attribute provided with the URL,
* and the actual username passed by the HTTP client. For example, assume
* that the LDAP URL is
- *
+ *
* ldap://ldap.airius.com/ou=People, o=Airius?uid??(posixid=*)
*
* Further, assume that the userid passed by the client was `userj'. The
* search filter will be (&(posixid=*)(uid=userj)).
*/
#define FILTER_LENGTH MAX_STRING_LEN
-static void authn_ldap_build_filter(char *filtbuf,
+static void authn_ldap_build_filter(char *filtbuf,
request_rec *r,
const char* sent_user,
const char* sent_filter,
@@ -210,13 +210,13 @@ static void authn_ldap_build_filter(char *filtbuf,
}
}
- /*
- * Create the first part of the filter, which consists of the
+ /*
+ * Create the first part of the filter, which consists of the
* config-supplied portions.
*/
apr_snprintf(filtbuf, FILTER_LENGTH, "(&(%s)(%s=", filter, sec->attribute);
- /*
+ /*
* Now add the client-supplied username to the filter, ensuring that any
* LDAP filter metachars are escaped.
*/
@@ -264,8 +264,8 @@ static void authn_ldap_build_filter(char *filtbuf,
#endif
*q = '\0';
- /*
- * Append the closing parens of the filter, unless doing so would
+ /*
+ * Append the closing parens of the filter, unless doing so would
* overrun the buffer.
*/
if (q + 2 <= filtbuf_end)
@@ -274,7 +274,7 @@ static void authn_ldap_build_filter(char *filtbuf,
static void *create_authnz_ldap_dir_config(apr_pool_t *p, char *d)
{
- authn_ldap_config_t *sec =
+ authn_ldap_config_t *sec =
(authn_ldap_config_t *)apr_pcalloc(p, sizeof(authn_ldap_config_t));
sec->pool = p;
@@ -284,7 +284,7 @@ static void *create_authnz_ldap_dir_config(apr_pool_t *p, char *d)
/*
sec->authz_enabled = 1;
*/
- sec->groupattr = apr_array_make(p, GROUPATTR_MAX_ELTS,
+ sec->groupattr = apr_array_make(p, GROUPATTR_MAX_ELTS,
sizeof(struct mod_auth_ldap_groupattr_entry_t));
sec->have_ldap_url = 0;
@@ -347,9 +347,9 @@ static authn_status authn_ldap_check_password(request_rec *r, const char *user,
if (!sec->enabled) {
return AUTH_USER_NOT_FOUND;
}
-*/
+*/
- /*
+ /*
* Basic sanity checks before any LDAP operations even happen.
*/
if (!sec->have_ldap_url) {
@@ -365,7 +365,7 @@ start_over:
sec->secure);
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authenticate: no sec->host - weird...?", getpid());
return AUTH_GENERAL_ERROR;
}
@@ -405,7 +405,7 @@ start_over:
/* handle bind failure */
if (result != LDAP_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authenticate: "
"user %s authentication failed; URI %s [%s][%s]",
getpid(), user, r->uri, ldc->reason, ldap_err2string(result));
@@ -442,7 +442,7 @@ start_over:
}
}
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authenticate: accepting %s", getpid(), user);
return AUTH_GRANTED;
@@ -491,7 +491,7 @@ static int authz_ldap_check_user_access(request_rec *r)
if (!sec->enabled) {
return DECLINED;
}
-*/
+*/
if (!sec->have_ldap_url) {
return DECLINED;
@@ -506,12 +506,12 @@ static int authz_ldap_check_user_access(request_rec *r)
apr_pool_cleanup_null);
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: no sec->host - weird...?", getpid());
return sec->auth_authoritative? HTTP_UNAUTHORIZED : DECLINED;
}
- /*
+ /*
* If there are no elements in the group attribute array, the default should be
* member and uniquemember; populate the array now.
*/
@@ -583,49 +583,49 @@ static int authz_ldap_check_user_access(request_rec *r)
t = reqs[x].requirement;
w = ap_getword_white(r->pool, &t);
-
+
if (strcmp(w, "ldap-user") == 0) {
if (req->dn == NULL || strlen(req->dn) == 0) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: "
- "require user: user's DN has not been defined; failing authorisation",
+ "require user: user's DN has not been defined; failing authorisation",
getpid());
return sec->auth_authoritative? HTTP_UNAUTHORIZED : DECLINED;
}
- /*
+ /*
* First do a whole-line compare, in case it's something like
* require user Babs Jensen
*/
result = util_ldap_cache_compare(r, ldc, sec->url, req->dn, sec->attribute, t);
switch(result) {
case LDAP_COMPARE_TRUE: {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: "
"require user: authorisation successful", getpid());
return OK;
}
default: {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: require user: "
"authorisation failed [%s][%s]", getpid(),
ldc->reason, ldap_err2string(result));
}
}
- /*
- * Now break apart the line and compare each word on it
+ /*
+ * Now break apart the line and compare each word on it
*/
while (t[0]) {
w = ap_getword_conf(r->pool, &t);
result = util_ldap_cache_compare(r, ldc, sec->url, req->dn, sec->attribute, w);
switch(result) {
case LDAP_COMPARE_TRUE: {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: "
"require user: authorisation successful", getpid());
return OK;
}
default: {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: "
"require user: authorisation failed [%s][%s]",
getpid(), ldc->reason, ldap_err2string(result));
@@ -637,7 +637,7 @@ static int authz_ldap_check_user_access(request_rec *r)
if (req->dn == NULL || strlen(req->dn) == 0) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: "
- "require dn: user's DN has not been defined; failing authorisation",
+ "require dn: user's DN has not been defined; failing authorisation",
getpid());
return sec->auth_authoritative? HTTP_UNAUTHORIZED : DECLINED;
}
@@ -645,13 +645,13 @@ static int authz_ldap_check_user_access(request_rec *r)
result = util_ldap_cache_comparedn(r, ldc, sec->url, req->dn, t, sec->compare_dn_on_server);
switch(result) {
case LDAP_COMPARE_TRUE: {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: "
"require dn: authorisation successful", getpid());
return OK;
}
default: {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: "
"require dn \"%s\": LDAP error [%s][%s]",
getpid(), t, ldc->reason, ldap_err2string(result));
@@ -666,42 +666,42 @@ static int authz_ldap_check_user_access(request_rec *r)
if (req->dn == NULL || strlen(req->dn) == 0) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: require group: "
- "user's DN has not been defined; failing authorisation",
+ "user's DN has not been defined; failing authorisation",
getpid());
return sec->auth_authoritative? HTTP_UNAUTHORIZED : DECLINED;
}
}
else {
if (req->user == NULL || strlen(req->user) == 0) {
- /* We weren't called in the authentication phase, so we didn't have a
+ /* We weren't called in the authentication phase, so we didn't have a
* chance to set the user field. Do so now. */
req->user = r->user;
}
}
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: require group: "
- "testing for group membership in \"%s\"",
+ "testing for group membership in \"%s\"",
getpid(), t);
for (i = 0; i < sec->groupattr->nelts; i++) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: require group: "
"testing for %s: %s (%s)", getpid(),
ent[i].name, sec->group_attrib_is_dn ? req->dn : req->user, t);
- result = util_ldap_cache_compare(r, ldc, sec->url, t, ent[i].name,
+ result = util_ldap_cache_compare(r, ldc, sec->url, t, ent[i].name,
sec->group_attrib_is_dn ? req->dn : req->user);
switch(result) {
case LDAP_COMPARE_TRUE: {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: require group: "
"authorisation successful (attribute %s) [%s][%s]",
getpid(), ent[i].name, ldc->reason, ldap_err2string(result));
return OK;
}
default: {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: require group \"%s\": "
"authorisation failed [%s][%s]",
getpid(), t, ldc->reason, ldap_err2string(result));
@@ -713,7 +713,7 @@ static int authz_ldap_check_user_access(request_rec *r)
if (req->dn == NULL || strlen(req->dn) == 0) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: "
- "require ldap-attribute: user's DN has not been defined; failing authorisation",
+ "require ldap-attribute: user's DN has not been defined; failing authorisation",
getpid());
return sec->auth_authoritative? HTTP_UNAUTHORIZED : DECLINED;
}
@@ -728,17 +728,17 @@ static int authz_ldap_check_user_access(request_rec *r)
w, value);
switch(result) {
case LDAP_COMPARE_TRUE: {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG,
0, r, "[%" APR_PID_T_FMT "] auth_ldap authorise: "
"require attribute: authorisation "
"successful", getpid());
return OK;
}
default: {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG,
0, r, "[%" APR_PID_T_FMT "] auth_ldap authorise: "
"require attribute: authorisation "
- "failed [%s][%s]", getpid(),
+ "failed [%s][%s]", getpid(),
ldc->reason, ldap_err2string(result));
}
}
@@ -748,13 +748,13 @@ static int authz_ldap_check_user_access(request_rec *r)
if (req->dn == NULL || strlen(req->dn) == 0) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: "
- "require ldap-filter: user's DN has not been defined; failing authorisation",
+ "require ldap-filter: user's DN has not been defined; failing authorisation",
getpid());
return sec->auth_authoritative? HTTP_UNAUTHORIZED : DECLINED;
}
if (t[0]) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "[%" APR_PID_T_FMT "] auth_ldap authorise: checking filter %s",
+ "[%" APR_PID_T_FMT "] auth_ldap authorise: checking filter %s",
getpid(), t);
/* Build the username filter */
@@ -767,33 +767,33 @@ static int authz_ldap_check_user_access(request_rec *r)
/* Make sure that the filtered search returned the correct user dn */
if (result == LDAP_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "[%" APR_PID_T_FMT "] auth_ldap authorise: checking dn match %s",
+ "[%" APR_PID_T_FMT "] auth_ldap authorise: checking dn match %s",
getpid(), dn);
- result = util_ldap_cache_comparedn(r, ldc, sec->url, req->dn, dn,
+ result = util_ldap_cache_comparedn(r, ldc, sec->url, req->dn, dn,
sec->compare_dn_on_server);
}
switch(result) {
case LDAP_COMPARE_TRUE: {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG,
0, r, "[%" APR_PID_T_FMT "] auth_ldap authorise: "
"require ldap-filter: authorisation "
"successful", getpid());
return OK;
}
case LDAP_FILTER_ERROR: {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG,
0, r, "[%" APR_PID_T_FMT "] auth_ldap authorise: "
"require ldap-filter: %s authorisation "
- "failed [%s][%s]", getpid(),
+ "failed [%s][%s]", getpid(),
filtbuf, ldc->reason, ldap_err2string(result));
break;
}
default: {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG,
0, r, "[%" APR_PID_T_FMT "] auth_ldap authorise: "
"require ldap-filter: authorisation "
- "failed [%s][%s]", getpid(),
+ "failed [%s][%s]", getpid(),
ldc->reason, ldap_err2string(result));
}
}
@@ -802,19 +802,19 @@ static int authz_ldap_check_user_access(request_rec *r)
}
if (!method_restricted) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "[%" APR_PID_T_FMT "] auth_ldap authorise: agreeing because non-restricted",
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "[%" APR_PID_T_FMT "] auth_ldap authorise: agreeing because non-restricted",
getpid());
return OK;
}
if (!sec->auth_authoritative) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: declining to authorise", getpid());
return DECLINED;
}
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[%" APR_PID_T_FMT "] auth_ldap authorise: authorisation denied", getpid());
ap_note_basic_auth_failure (r);
@@ -822,11 +822,11 @@ static int authz_ldap_check_user_access(request_rec *r)
}
-/*
+/*
* Use the ldap url parsing routines to break up the ldap url into
* host and port.
*/
-static const char *mod_auth_ldap_parse_url(cmd_parms *cmd,
+static const char *mod_auth_ldap_parse_url(cmd_parms *cmd,
void *config,
const char *url,
const char *mode)
@@ -855,9 +855,9 @@ static const char *mod_auth_ldap_parse_url(cmd_parms *cmd,
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
cmd->server, "[%" APR_PID_T_FMT "] auth_ldap url parse: attrib: %s", getpid(), urld->lud_attrs? urld->lud_attrs[0] : "(null)");
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
- cmd->server, "[%" APR_PID_T_FMT "] auth_ldap url parse: scope: %s", getpid(),
- (urld->lud_scope == LDAP_SCOPE_SUBTREE? "subtree" :
- urld->lud_scope == LDAP_SCOPE_BASE? "base" :
+ cmd->server, "[%" APR_PID_T_FMT "] auth_ldap url parse: scope: %s", getpid(),
+ (urld->lud_scope == LDAP_SCOPE_SUBTREE? "subtree" :
+ urld->lud_scope == LDAP_SCOPE_BASE? "base" :
urld->lud_scope == LDAP_SCOPE_ONELEVEL? "onelevel" : "unknown"));
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
cmd->server, "[%" APR_PID_T_FMT "] auth_ldap url parse: filter: %s", getpid(), urld->lud_filter);
@@ -896,7 +896,7 @@ static const char *mod_auth_ldap_parse_url(cmd_parms *cmd,
if (urld->lud_filter) {
if (urld->lud_filter[0] == '(') {
- /*
+ /*
* Get rid of the surrounding parens; later on when generating the
* filter, they'll be put back.
*/
@@ -939,7 +939,7 @@ static const char *mod_auth_ldap_parse_url(cmd_parms *cmd,
else
{
sec->port = urld->lud_port? urld->lud_port : LDAP_PORT;
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
"LDAP: auth_ldap not using SSL connections");
}
@@ -981,7 +981,7 @@ static const char *mod_auth_ldap_add_group_attribute(cmd_parms *cmd, void *confi
new = apr_array_push(sec->groupattr);
new->name = apr_pstrdup(cmd->pool, arg);
-
+
return NULL;
}
@@ -994,7 +994,7 @@ static const char *set_charset_config(cmd_parms *cmd, void *config, const char *
static const command_rec authnz_ldap_cmds[] =
{
- AP_INIT_TAKE12("AuthLDAPURL", mod_auth_ldap_parse_url, NULL, OR_AUTHCFG,
+ AP_INIT_TAKE12("AuthLDAPURL", mod_auth_ldap_parse_url, NULL, OR_AUTHCFG,
"URL to define LDAP connection. This should be an RFC 2255 complaint\n"
"URL of the form ldap://host[:port]/basedn[?attrib[?scope[?filter]]].\n"
"<ul>\n"
@@ -1079,17 +1079,17 @@ static int authnz_ldap_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *
const char *charset_confname = ap_get_module_config(s->module_config,
&authnz_ldap_module);
apr_status_t status;
-
+
/*
authn_ldap_config_t *sec = (authn_ldap_config_t *)
- ap_get_module_config(s->module_config,
+ ap_get_module_config(s->module_config,
&authnz_ldap_module);
if (sec->secure)
{
if (!util_ldap_ssl_supported(s))
{
- ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s,
"LDAP: SSL connections (ldaps://) not supported by utilLDAP");
return(!OK);
}
@@ -1112,15 +1112,15 @@ static int authnz_ldap_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *
charset_confname = ap_server_root_relative(p, charset_confname);
if (!charset_confname) {
ap_log_error(APLOG_MARK, APLOG_ERR, APR_EBADPATH, s,
- "Invalid charset conversion config path %s",
+ "Invalid charset conversion config path %s",
(const char *)ap_get_module_config(s->module_config,
&authnz_ldap_module));
return HTTP_INTERNAL_SERVER_ERROR;
}
- if ((status = ap_pcfg_openfile(&f, ptemp, charset_confname))
+ if ((status = ap_pcfg_openfile(&f, ptemp, charset_confname))
!= APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, status, s,
- "could not open charset conversion config file %s.",
+ "could not open charset conversion config file %s.",
charset_confname);
return HTTP_INTERNAL_SERVER_ERROR;
}
@@ -1143,11 +1143,11 @@ static int authnz_ldap_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *
}
}
ap_cfg_closefile(f);
-
+
to_charset = derive_codepage_from_lang (p, "utf-8");
if (to_charset == NULL) {
ap_log_error(APLOG_MARK, APLOG_ERR, status, s,
- "could not find the UTF-8 charset in the file %s.",
+ "could not find the UTF-8 charset in the file %s.",
charset_confname);
return HTTP_INTERNAL_SERVER_ERROR;
}
diff --git a/modules/aaa/mod_authz_dbm.c b/modules/aaa/mod_authz_dbm.c
index 8c21112c22..a69c747272 100644
--- a/modules/aaa/mod_authz_dbm.c
+++ b/modules/aaa/mod_authz_dbm.c
@@ -90,7 +90,7 @@ module AP_MODULE_DECLARE_DATA authz_dbm_module;
* key=username value=":"groupname [":"anything here is ignored]
* otherwise we now (0.8.14+) assume that the format is
* key=username value=groupname
- * The first allows the password and group files to be the same
+ * The first allows the password and group files to be the same
* physical DBM file; key=username value=password":"groupname[":"anything]
*
* mark@telescope.org, 22Sep95
@@ -104,7 +104,7 @@ static apr_status_t get_dbm_grp(request_rec *r, char *key1, char *key2,
apr_status_t retval;
apr_dbm_t *f;
- retval = apr_dbm_open_ex(&f, dbtype, dbmgrpfile, APR_DBM_READONLY,
+ retval = apr_dbm_open_ex(&f, dbtype, dbmgrpfile, APR_DBM_READONLY,
APR_OS_DEFAULT, r->pool);
if (retval != APR_SUCCESS) {
@@ -166,10 +166,10 @@ static int dbm_check_auth(request_rec *r)
t = reqs[x].requirement;
w = ap_getword_white(r->pool, &t);
-
+
if (!strcasecmp(w, "file-group")) {
filegroup = apr_table_get(r->notes, AUTHZ_GROUP_NOTE);
-
+
if (!filegroup) {
/* mod_authz_owner is not present or not
* authoritative. We are just a helper module for testing
diff --git a/modules/aaa/mod_authz_default.c b/modules/aaa/mod_authz_default.c
index 88859b2061..0576a0c24b 100644
--- a/modules/aaa/mod_authz_default.c
+++ b/modules/aaa/mod_authz_default.c
@@ -59,7 +59,7 @@ static int check_user_access(request_rec *r)
const apr_array_header_t *reqs_arr = ap_requires(r);
require_line *reqs;
- /* BUG FIX: tadc, 11-Nov-1995. If there is no "requires" directive,
+ /* BUG FIX: tadc, 11-Nov-1995. If there is no "requires" directive,
* then any user will do.
*/
if (!reqs_arr) {
@@ -84,7 +84,7 @@ static int check_user_access(request_rec *r)
}
/* if we aren't authoritative, any require directive could be
- * considered valid even if noone groked it. However, if we are
+ * considered valid even if noone groked it. However, if we are
* authoritative, we can warn the user they did something wrong.
*
* That something could be a missing "AuthAuthoritative off", but
diff --git a/modules/aaa/mod_authz_groupfile.c b/modules/aaa/mod_authz_groupfile.c
index 9f8386699d..77a63b9644 100644
--- a/modules/aaa/mod_authz_groupfile.c
+++ b/modules/aaa/mod_authz_groupfile.c
@@ -21,24 +21,24 @@
* and the presense of a
*
* require group <list-of-groups>
- *
+ *
* In an applicable limit/directory block for that method.
*
- * If there are no AuthGroupFile directives valid for
+ * If there are no AuthGroupFile directives valid for
* the request; we DECLINED.
- *
+ *
* If the AuthGroupFile is defined; but somehow not
* accessible: we SERVER_ERROR (was DECLINED).
*
* If there are no 'require ' directives defined for
* this request then we DECLINED (was OK).
- *
+ *
* If there are no 'require ' directives valid for
* this request method then we DECLINED. (was OK)
*
* If there are any 'require group' blocks and we
* are not in any group - we HTTP_UNAUTHORIZE
- * unless we are non-authoritative; in which
+ * unless we are non-authoritative; in which
* case we DECLINED.
*
*/
@@ -65,12 +65,12 @@ static void *create_authz_groupfile_dir_config(apr_pool_t *p, char *d)
{
authz_groupfile_config_rec *conf = apr_palloc(p, sizeof(*conf));
- conf->groupfile = NULL;
+ conf->groupfile = NULL;
conf->authoritative = 1; /* keep the fortress secure by default */
return conf;
}
-static const char *set_authz_groupfile_slot(cmd_parms *cmd, void *offset, const char *f,
+static const char *set_authz_groupfile_slot(cmd_parms *cmd, void *offset, const char *f,
const char *t)
{
if (t && strcmp(t, "standard")) {
@@ -163,7 +163,7 @@ static int check_user_access(request_rec *r)
char *reason = NULL;
/* If there is no group file - then we are not
- * configured. So decline.
+ * configured. So decline.
*/
if (!(conf->groupfile)) {
return DECLINED;
@@ -171,8 +171,8 @@ static int check_user_access(request_rec *r)
if (!reqs_arr) {
return DECLINED; /* XXX change from legacy */
- }
-
+ }
+
reqs = (require_line *)reqs_arr->elts;
for (x = 0; x < reqs_arr->nelts; x++) {
@@ -187,7 +187,7 @@ static int check_user_access(request_rec *r)
/* needs mod_authz_owner to be present */
if (!strcasecmp(w, "file-group")) {
filegroup = apr_table_get(r->notes, AUTHZ_GROUP_NOTE);
-
+
if (!filegroup) {
/* mod_authz_owner is not present or not
* authoritative. We are just a helper module for testing
diff --git a/modules/aaa/mod_authz_host.c b/modules/aaa/mod_authz_host.c
index b817b9eb12..582f32c7ac 100644
--- a/modules/aaa/mod_authz_host.c
+++ b/modules/aaa/mod_authz_host.c
@@ -16,9 +16,9 @@
/*
* Security options etc.
- *
+ *
* Module derived from code originally written by Rob McCool
- *
+ *
*/
#include "apr_strings.h"
@@ -106,7 +106,7 @@ static const char *order(cmd_parms *cmd, void *dv, const char *arg)
return NULL;
}
-static const char *allow_cmd(cmd_parms *cmd, void *dv, const char *from,
+static const char *allow_cmd(cmd_parms *cmd, void *dv, const char *from,
const char *where_c)
{
authz_host_dir_conf *d = (authz_host_dir_conf *) dv;
diff --git a/modules/aaa/mod_authz_owner.c b/modules/aaa/mod_authz_owner.c
index 8f56879545..050860d896 100644
--- a/modules/aaa/mod_authz_owner.c
+++ b/modules/aaa/mod_authz_owner.c
@@ -195,7 +195,7 @@ static int check_file_owner(request_rec *r)
if (!required_owner || !conf->authoritative) {
return DECLINED;
}
-
+
/* allow file-group passed to group db modules either if this is the
* only applicable requirement here or if a file-owner failed but we're
* not authoritative.
diff --git a/modules/aaa/mod_authz_user.c b/modules/aaa/mod_authz_user.c
index 0296b35acd..cc6d808a3e 100644
--- a/modules/aaa/mod_authz_user.c
+++ b/modules/aaa/mod_authz_user.c
@@ -61,7 +61,7 @@ static int check_user_access(request_rec *r)
const apr_array_header_t *reqs_arr = ap_requires(r);
require_line *reqs;
- /* BUG FIX: tadc, 11-Nov-1995. If there is no "requires" directive,
+ /* BUG FIX: tadc, 11-Nov-1995. If there is no "requires" directive,
* then any user will do.
*/
if (!reqs_arr) {
@@ -81,7 +81,7 @@ static int check_user_access(request_rec *r)
return OK;
}
if (!strcasecmp(w, "user")) {
- /* And note that there are applicable requirements
+ /* And note that there are applicable requirements
* which we consider ourselves the owner of.
*/
required_user = 1;
@@ -107,7 +107,7 @@ static int check_user_access(request_rec *r)
"access to %s failed, reason: user '%s' does not meet "
"'require'ments for user/valid-user to be allowed access",
r->uri, user);
-
+
ap_note_auth_failure(r);
return HTTP_UNAUTHORIZED;
}
diff --git a/modules/arch/netware/libprews.c b/modules/arch/netware/libprews.c
index a76b02fc38..7654ee4aa0 100644
--- a/modules/arch/netware/libprews.c
+++ b/modules/arch/netware/libprews.c
@@ -19,7 +19,7 @@
stops. By using these functions instead of defining a main()
and calling ExitThread(TSR_THREAD, 0), the load time of the
shared NLM is faster and memory size reduced.
-
+
You may also want to override these in your own Apache module
to do any cleanup other than the mechanism Apache modules
provide.
@@ -58,7 +58,7 @@ int _NonAppStart
#ifdef USE_WINSOCK
WSADATA wsaData;
-
+
return WSAStartup((WORD) MAKEWORD(2, 0), &wsaData);
#else
return 0;
diff --git a/modules/arch/netware/mod_netware.c b/modules/arch/netware/mod_netware.c
index f7fd0b0594..0c296c42f7 100644
--- a/modules/arch/netware/mod_netware.c
+++ b/modules/arch/netware/mod_netware.c
@@ -75,9 +75,9 @@ static const char *set_extension_map(cmd_parms *cmd, netware_dir_config *m,
if (*ext == '.')
++ext;
-
+
if (CGIhdlr != NULL) {
- len = strlen(CGIhdlr);
+ len = strlen(CGIhdlr);
for (i=0; i<len; i++) {
if (CGIhdlr[i] == '\\') {
CGIhdlr[i] = '/';
@@ -94,7 +94,7 @@ static const char *set_extension_map(cmd_parms *cmd, netware_dir_config *m,
}
static 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)
{
char *ext = NULL;
@@ -104,7 +104,7 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
apr_file_t *fh;
const char *args = "";
- d = (netware_dir_config *)ap_get_module_config(r->per_dir_config,
+ d = (netware_dir_config *)ap_get_module_config(r->per_dir_config,
&netware_module);
if (e_info->process_cgi) {
@@ -135,7 +135,7 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
if (!ext) {
ext = "";
}
-
+
/* eliminate the '.' if there is one */
if (*ext == '.')
++ext;
@@ -173,7 +173,7 @@ static void register_hooks(apr_pool_t *p)
}
static const command_rec netware_cmds[] = {
-AP_INIT_TAKE23("CGIMapExtension", set_extension_map, NULL, OR_FILEINFO,
+AP_INIT_TAKE23("CGIMapExtension", set_extension_map, NULL, OR_FILEINFO,
"Full path to the CGI NLM module followed by a file extension. If the "
"first parameter is set to \"OS\" then the following file extension is "
"treated as NLM. The optional parameter \"detach\" can be specified if "
diff --git a/modules/arch/netware/mod_nw_ssl.c b/modules/arch/netware/mod_nw_ssl.c
index 54e81f290d..43ce874f5a 100644
--- a/modules/arch/netware/mod_nw_ssl.c
+++ b/modules/arch/netware/mod_nw_ssl.c
@@ -29,7 +29,7 @@
*
* Examples:
*
- * SecureListen 443 "SSL CertificateIP"
+ * SecureListen 443 "SSL CertificateIP"
* SecureListen 123.45.67.89:443 mycert
*/
@@ -183,7 +183,7 @@ static unsigned long parse_addr(const char *w, unsigned short *ports)
hep = gethostbyname(w);
if ((!hep) || (hep->h_addrtype != AF_INET || !hep->h_addr_list[0])) {
- /* XXX Should be echoing by h_errno the actual failure, no?
+ /* XXX Should be echoing by h_errno the actual failure, no?
* ap_log_error would be good here. Better yet - APRize.
*/
fprintf(stderr, "Cannot resolve host name %s --- exiting!\n", w);
@@ -212,7 +212,7 @@ static int find_secure_listener(seclisten_rec *lr)
sl->used = 1;
return sl->fd;
}
- }
+ }
return -1;
}
@@ -221,11 +221,11 @@ static char *get_port_key(conn_rec *c)
seclistenup_rec *sl;
for (sl = ap_seclistenersup; sl; sl = sl->next) {
- if ((sl->port == (c->local_addr)->port) &&
+ if ((sl->port == (c->local_addr)->port) &&
((strcmp(sl->addr, "0.0.0.0") == 0) || (strcmp(sl->addr, c->local_ip) == 0))) {
return sl->key;
}
- }
+ }
return NULL;
}
@@ -239,7 +239,7 @@ static int make_secure_socket(apr_pool_t *pconf, const struct sockaddr_in *serve
unsigned int optParam;
WSAPROTOCOL_INFO SecureProtoInfo;
int no = 1;
-
+
if (server->sin_addr.s_addr != htonl(INADDR_ANY))
apr_snprintf(addr, sizeof(addr), "address %s port %d",
inet_ntoa(server->sin_addr), ntohs(server->sin_port));
@@ -251,22 +251,22 @@ static int make_secure_socket(apr_pool_t *pconf, const struct sockaddr_in *serve
SecureProtoInfo.iAddressFamily = AF_INET;
SecureProtoInfo.iSocketType = SOCK_STREAM;
- SecureProtoInfo.iProtocol = IPPROTO_TCP;
+ SecureProtoInfo.iProtocol = IPPROTO_TCP;
SecureProtoInfo.iSecurityScheme = SECURITY_PROTOCOL_SSL;
s = WSASocket(AF_INET, SOCK_STREAM, IPPROTO_TCP,
(LPWSAPROTOCOL_INFO)&SecureProtoInfo, 0, 0);
-
+
if (s == INVALID_SOCKET) {
ap_log_error(APLOG_MARK, APLOG_CRIT, WSAGetLastError(), sconf,
- "make_secure_socket: failed to get a socket for %s",
+ "make_secure_socket: failed to get a socket for %s",
addr);
return -1;
}
-
+
if (!mutual) {
optParam = SO_SSL_ENABLE | SO_SSL_SERVER;
-
+
if (WSAIoctl(s, SO_SSL_SET_FLAGS, (char *)&optParam,
sizeof(optParam), NULL, 0, NULL, NULL, NULL)) {
ap_log_error(APLOG_MARK, APLOG_CRIT, WSAGetLastError(), sconf,
@@ -303,7 +303,7 @@ static int make_secure_socket(apr_pool_t *pconf, const struct sockaddr_in *serve
}
optParam = SO_TLS_UNCLEAN_SHUTDOWN;
- WSAIoctl(s, SO_SSL_SET_FLAGS, (char *)&optParam, sizeof(optParam),
+ WSAIoctl(s, SO_SSL_SET_FLAGS, (char *)&optParam, sizeof(optParam),
NULL, 0, NULL, NULL, NULL);
return s;
@@ -355,7 +355,7 @@ int convert_secure_socket(conn_rec *c, apr_socket_t *csd)
unicpy(keyFileName, L"SSL CertificateIP");
sWS2Opts.wallet = keyFileName; /* no client certificate */
sWS2Opts.walletlen = unilen(keyFileName);
-
+
sNWTLSOpts.walletProvider = WAL_PROV_KMO; //the wallet provider defined in wdefs.h
}
@@ -368,7 +368,7 @@ int convert_secure_socket(conn_rec *c, apr_socket_t *csd)
if(SOCKET_ERROR == rcode ){
ap_log_error(APLOG_MARK, APLOG_ERR, 0, c->base_server,
"Error: %d with ioctl (SO_TLS_SET_CLIENT)", WSAGetLastError());
- }
+ }
return rcode;
}
@@ -379,11 +379,11 @@ int SSLize_Socket(SOCKET socketHnd, char *key, request_rec *r)
struct nwtlsopts sNWTLSOpts;
unicode_t SASKey[512];
unsigned long ulFlag;
-
+
memset((char *)&sWS2Opts, 0, sizeof(struct tlsserveropts));
memset((char *)&sNWTLSOpts, 0, sizeof(struct nwtlsopts));
-
-
+
+
ulFlag = SO_TLS_ENABLE;
rcode = WSAIoctl(socketHnd, SO_TLS_SET_FLAGS, &ulFlag, sizeof(unsigned long), NULL, 0, NULL, NULL, NULL);
if(rcode)
@@ -392,18 +392,18 @@ int SSLize_Socket(SOCKET socketHnd, char *key, request_rec *r)
"Error: %d with WSAIoctl(SO_TLS_SET_FLAGS, SO_TLS_ENABLE)", WSAGetLastError());
goto ERR;
}
-
-
+
+
ulFlag = SO_TLS_SERVER;
rcode = WSAIoctl(socketHnd, SO_TLS_SET_FLAGS, &ulFlag, sizeof(unsigned long),NULL, 0, NULL, NULL, NULL);
-
+
if(rcode)
{
ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
"Error: %d with WSAIoctl(SO_TLS_SET_FLAGS, SO_TLS_SERVER)", WSAGetLastError());
goto ERR;
}
-
+
loc2uni(UNI_LOCAL_DEFAULT, SASKey, key, 0, 0);
//setup the tlsserveropts struct
@@ -413,9 +413,9 @@ int SSLize_Socket(SOCKET socketHnd, char *key, request_rec *r)
sWS2Opts.sidentries = 0;
sWS2Opts.siddir = NULL;
sWS2Opts.options = &sNWTLSOpts;
-
+
//setup the nwtlsopts structure
-
+
sNWTLSOpts.walletProvider = WAL_PROV_KMO;
sNWTLSOpts.keysList = NULL;
sNWTLSOpts.numElementsInKeyList = 0;
@@ -425,29 +425,29 @@ int SSLize_Socket(SOCKET socketHnd, char *key, request_rec *r)
sNWTLSOpts.reserved1 = NULL;
sNWTLSOpts.reserved2 = NULL;
sNWTLSOpts.reserved3 = NULL;
-
-
- rcode = WSAIoctl(socketHnd,
- SO_TLS_SET_SERVER,
- &sWS2Opts,
- sizeof(struct tlsserveropts),
- NULL,
- 0,
- NULL,
- NULL,
+
+
+ rcode = WSAIoctl(socketHnd,
+ SO_TLS_SET_SERVER,
+ &sWS2Opts,
+ sizeof(struct tlsserveropts),
+ NULL,
+ 0,
+ NULL,
+ NULL,
NULL);
if(SOCKET_ERROR == rcode) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
"Error: %d with WSAIoctl(SO_TLS_SET_SERVER)", WSAGetLastError());
goto ERR;
}
-
+
ERR:
return rcode;
}
-static const char *set_secure_listener(cmd_parms *cmd, void *dummy,
- const char *ips, const char* key,
+static const char *set_secure_listener(cmd_parms *cmd, void *dummy,
+ const char *ips, const char* key,
const char* mutual)
{
NWSSLSrvConfigRec* sc = get_nwssl_cfg(cmd->server);
@@ -459,27 +459,27 @@ static const char *set_secure_listener(cmd_parms *cmd, void *dummy,
apr_sockaddr_t *sa;
int found_listener = 0;
-
- if (err != NULL)
+
+ if (err != NULL)
return err;
ports = strchr(ips, ':');
-
- if (ports != NULL) {
+
+ if (ports != NULL) {
if (ports == ips)
return "Missing IP address";
else if (ports[1] == '\0')
return "Address must end in :<port-number>";
-
+
*(ports++) = '\0';
}
else {
ports = (char*)ips;
}
-
- new = apr_pcalloc(cmd->server->process->pool, sizeof(seclisten_rec));
+
+ new = apr_pcalloc(cmd->server->process->pool, sizeof(seclisten_rec));
new->local_addr.sin_family = AF_INET;
-
+
if (ports == ips) {
new->local_addr.sin_addr.s_addr = htonl(INADDR_ANY);
addr = apr_pstrdup(cmd->server->process->pool, "0.0.0.0");
@@ -488,12 +488,12 @@ static const char *set_secure_listener(cmd_parms *cmd, void *dummy,
new->local_addr.sin_addr.s_addr = parse_addr(ips, NULL);
addr = apr_pstrdup(cmd->server->process->pool, ips);
}
-
+
port = atoi(ports);
-
- if (!port)
+
+ if (!port)
return "Port must be numeric";
-
+
/* If the specified addr:port was created previously, put the listen
socket record back on the ap_listeners list so that the socket
will be reused rather than recreated */
@@ -529,7 +529,7 @@ static const char *set_secure_listener(cmd_parms *cmd, void *dummy,
}
apr_table_add(sc->sltable, ports, addr);
-
+
new->local_addr.sin_port = htons(port);
new->fd = -1;
new->used = 0;
@@ -542,7 +542,7 @@ static const char *set_secure_listener(cmd_parms *cmd, void *dummy,
return NULL;
}
-static const char *set_secure_upgradeable_listener(cmd_parms *cmd, void *dummy,
+static const char *set_secure_upgradeable_listener(cmd_parms *cmd, void *dummy,
const char *ips, const char* key)
{
NWSSLSrvConfigRec* sc = get_nwssl_cfg(cmd->server);
@@ -552,23 +552,23 @@ static const char *set_secure_upgradeable_listener(cmd_parms *cmd, void *dummy,
unsigned short port;
seclistenup_rec *new;
- if (err != NULL)
+ if (err != NULL)
return err;
ports = strchr(ips, ':');
-
- if (ports != NULL) {
+
+ if (ports != NULL) {
if (ports == ips)
return "Missing IP address";
else if (ports[1] == '\0')
return "Address must end in :<port-number>";
-
+
*(ports++) = '\0';
}
else {
ports = (char*)ips;
}
-
+
if (ports == ips) {
addr = apr_pstrdup(cmd->pool, "0.0.0.0");
}
@@ -577,13 +577,13 @@ static const char *set_secure_upgradeable_listener(cmd_parms *cmd, void *dummy,
}
port = atoi(ports);
-
- if (!port)
+
+ if (!port)
return "Port must be numeric";
apr_table_set(sc->slutable, ports, addr);
- new = apr_pcalloc(cmd->pool, sizeof(seclistenup_rec));
+ new = apr_pcalloc(cmd->pool, sizeof(seclistenup_rec));
new->next = ap_seclistenersup;
strcpy(new->key, key);
new->addr = addr;
@@ -632,8 +632,8 @@ static int nwssl_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
seclisten_rec **secwalk;
apr_sockaddr_t *sa;
int found;
-
- /* Pull all of the listeners that were created by mod_nw_ssl out of the
+
+ /* Pull all of the listeners that were created by mod_nw_ssl out of the
ap_listeners list so that the normal listen socket processing does
automatically close them */
nw_old_listeners = NULL;
@@ -647,7 +647,7 @@ static int nwssl_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
ap_listen_rec *new;
seclisten_rec *secnew;
apr_port_t oldport;
-
+
oldport = sa->port;
/* If both ports are equivalent, then if their names are equivalent,
* then we will re-use the existing record.
@@ -670,7 +670,7 @@ static int nwssl_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
break;
}
}
-
+
walk = &(*walk)->next;
}
if (!found && &(*secwalk)->next) {
@@ -684,10 +684,10 @@ static int nwssl_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
ap_seclistenersup = NULL;
certlist = apr_array_make(pconf, 1, sizeof(char *));
- /* Now that we have removed all of the mod_nw_ssl created socket records,
+ /* Now that we have removed all of the mod_nw_ssl created socket records,
allow the normal listen socket handling to occur.
NOTE: If for any reason mod_nw_ssl is removed as a built-in module,
- the following call must be put back into the pre-config handler of the
+ the following call must be put back into the pre-config handler of the
MPM. It is only here to ensure that mod_nw_ssl fixes up the listen
socket list before anything else looks at it. */
ap_listen_pre_config();
@@ -697,7 +697,7 @@ static int nwssl_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
static int nwssl_pre_connection(conn_rec *c, void *csd)
{
-
+
if (apr_table_get(c->notes, "nwconv-ssl")) {
convert_secure_socket(c, (apr_socket_t*)csd);
}
@@ -708,7 +708,7 @@ static int nwssl_pre_connection(conn_rec *c, void *csd)
csd_data->is_secure = 0;
ap_set_module_config(c->conn_config, &nwssl_module, (void*)csd_data);
}
-
+
return OK;
}
@@ -770,8 +770,8 @@ static int nwssl_post_config(apr_pool_t *pconf, apr_pool_t *plog,
}
if (sl->fd < 0)
- sl->fd = make_secure_socket(s->process->pool, &sl->local_addr, sl->key, sl->mutual, s);
-
+ sl->fd = make_secure_socket(s->process->pool, &sl->local_addr, sl->key, sl->mutual, s);
+
if (sl->fd >= 0) {
apr_os_sock_info_t sock_info;
@@ -784,10 +784,10 @@ static int nwssl_post_config(apr_pool_t *pconf, apr_pool_t *plog,
apr_os_sock_make(&sd, &sock_info, s->process->pool);
lr = apr_pcalloc(s->process->pool, sizeof(ap_listen_rec));
-
+
if (lr) {
lr->sd = sd;
- if ((status = apr_sockaddr_info_get(&lr->bind_addr, sl->addr, APR_UNSPEC, sl->port, 0,
+ if ((status = apr_sockaddr_info_get(&lr->bind_addr, sl->addr, APR_UNSPEC, sl->port, 0,
s->process->pool)) != APR_SUCCESS) {
ap_log_perror(APLOG_MARK, APLOG_CRIT, status, pconf,
"alloc_listener: failed to set up sockaddr for %s:%d", sl->addr, sl->port);
@@ -800,7 +800,7 @@ static int nwssl_post_config(apr_pool_t *pconf, apr_pool_t *plog,
} else {
return HTTP_INTERNAL_SERVER_ERROR;
}
- }
+ }
for (slu = ap_seclistenersup; slu; slu = slu->next) {
/* Check the listener list for a matching upgradeable listener */
@@ -815,7 +815,7 @@ static int nwssl_post_config(apr_pool_t *pconf, apr_pool_t *plog,
ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, plog,
"No Listen directive found for upgradeable listener %s:%d", slu->addr, slu->port);
}
- }
+ }
build_cert_list(s->process->pool);
@@ -842,8 +842,8 @@ static int compare_ipports(void *rec, const char *key, const char *value)
{
conn_rec *c = (conn_rec*)rec;
- if (value &&
- ((strcmp(value, "0.0.0.0") == 0) || (strcmp(value, c->local_ip) == 0)))
+ if (value &&
+ ((strcmp(value, "0.0.0.0") == 0) || (strcmp(value, c->local_ip) == 0)))
{
return 0;
}
@@ -998,7 +998,7 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
case 'R':
case 'r':
- if (strcEQ(var, "REQUEST_METHOD"))
+ if (strcEQ(var, "REQUEST_METHOD"))
result = r->method;
else if (strcEQ(var, "REQUEST_SCHEME"))
result = ap_http_scheme(r);
@@ -1007,7 +1007,7 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
else if (strcEQ(var, "REQUEST_FILENAME"))
result = r->filename;
else if (strcEQ(var, "REMOTE_HOST"))
- result = ap_get_remote_host(r->connection, r->per_dir_config,
+ result = ap_get_remote_host(r->connection, r->per_dir_config,
REMOTE_NAME, NULL);
else if (strcEQ(var, "REMOTE_IDENT"))
result = ap_get_remote_logname(r);
@@ -1018,7 +1018,7 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
case 'S':
case 's':
if (strcEQn(var, "SSL", 3)) break; /* shortcut common case */
-
+
if (strcEQ(var, "SERVER_ADMIN"))
result = r->server->server_admin;
else if (strcEQ(var, "SERVER_NAME"))
@@ -1030,7 +1030,7 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
else if (strcEQ(var, "SCRIPT_FILENAME"))
result = r->filename;
break;
-
+
default:
if (strcEQ(var, "PATH_INFO"))
result = r->path_info;
@@ -1055,7 +1055,7 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
/* XXX-Can't get specific SSL info from NetWare */
/* SSLConnRec *sslconn = myConnConfig(c);
- if (strlen(var) > 4 && strcEQn(var, "SSL_", 4)
+ if (strlen(var) > 4 && strcEQn(var, "SSL_", 4)
&& sslconn && sslconn->ssl)
result = ssl_var_lookup_ssl(p, c, var+4);*/
@@ -1196,7 +1196,7 @@ static apr_status_t ssl_io_filter_Upgrade(ap_filter_t *f,
}
key = get_port_key(r->connection);
-
+
if (csd && key) {
int sockdes;
apr_os_sock_get(&sockdes, csd);
@@ -1216,8 +1216,8 @@ static apr_status_t ssl_io_filter_Upgrade(ap_filter_t *f,
ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server,
"Awaiting re-negotiation handshake");
- /* Now that we have initialized the ssl connection which added the ssl_io_filter,
- pass the brigade off to the connection based output filters so that the
+ /* Now that we have initialized the ssl connection which added the ssl_io_filter,
+ pass the brigade off to the connection based output filters so that the
request can complete encrypted */
return ap_pass_brigade(f->c->output_filters, bb);
}
@@ -1258,7 +1258,7 @@ static void register_hooks(apr_pool_t *p)
APR_REGISTER_OPTIONAL_FN(ssl_is_https);
APR_REGISTER_OPTIONAL_FN(ssl_var_lookup);
-
+
APR_REGISTER_OPTIONAL_FN(ssl_proxy_enable);
APR_REGISTER_OPTIONAL_FN(ssl_engine_disable);
}
diff --git a/modules/arch/win32/mod_isapi.c b/modules/arch/win32/mod_isapi.c
index b7e061a7e8..bf99360e0f 100644
--- a/modules/arch/win32/mod_isapi.c
+++ b/modules/arch/win32/mod_isapi.c
@@ -20,19 +20,19 @@
* redesign by William Rowe <wrowe@covalent.net>, and hints from many
* other developer/users who have hit on specific flaws.
*
- * This module implements the ISAPI Handler architecture, allowing
+ * This module implements the ISAPI Handler architecture, allowing
* Apache to load Internet Server Applications (ISAPI extensions),
* similar to the support in IIS, Zope, O'Reilly's WebSite and others.
*
- * It is a complete implementation of the ISAPI 2.0 specification,
- * except for "Microsoft extensions" to the API which provide
+ * It is a complete implementation of the ISAPI 2.0 specification,
+ * except for "Microsoft extensions" to the API which provide
* asynchronous I/O. It is further extended to include additional
* "Microsoft extentions" through IIS 5.0, with some deficiencies
* where one-to-one mappings don't exist.
*
* Refer to /manual/mod/mod_isapi.html for additional details on
* configuration and use, but check this source for specific support
- * of the API,
+ * of the API,
*/
#include "ap_config.h"
@@ -77,13 +77,13 @@ typedef struct isapi_dir_conf {
typedef struct isapi_loaded isapi_loaded;
-apr_status_t isapi_lookup(apr_pool_t *p, server_rec *s, request_rec *r,
+apr_status_t isapi_lookup(apr_pool_t *p, server_rec *s, request_rec *r,
const char *fpath, isapi_loaded** isa);
static void *create_isapi_dir_config(apr_pool_t *p, char *dummy)
{
isapi_dir_conf *dir = apr_palloc(p, sizeof(isapi_dir_conf));
-
+
dir->read_ahead_buflen = ISAPI_UNDEF;
dir->log_unsupported = ISAPI_UNDEF;
dir->log_to_errlog = ISAPI_UNDEF;
@@ -98,7 +98,7 @@ static void *merge_isapi_dir_configs(apr_pool_t *p, void *base_, void *add_)
isapi_dir_conf *base = (isapi_dir_conf *) base_;
isapi_dir_conf *add = (isapi_dir_conf *) add_;
isapi_dir_conf *dir = apr_palloc(p, sizeof(isapi_dir_conf));
-
+
dir->read_ahead_buflen = (add->read_ahead_buflen == ISAPI_UNDEF)
? base->read_ahead_buflen
: add->read_ahead_buflen;
@@ -114,11 +114,11 @@ static void *merge_isapi_dir_configs(apr_pool_t *p, void *base_, void *add_)
dir->fake_async = (add->fake_async == ISAPI_UNDEF)
? base->fake_async
: add->fake_async;
-
+
return dir;
}
-static const char *isapi_cmd_cachefile(cmd_parms *cmd, void *dummy,
+static const char *isapi_cmd_cachefile(cmd_parms *cmd, void *dummy,
const char *filename)
{
isapi_loaded *isa;
@@ -140,8 +140,8 @@ static const char *isapi_cmd_cachefile(cmd_parms *cmd, void *dummy,
"ISAPI: invalid module path, skipping %s", filename);
return NULL;
}
- if ((rv = apr_stat(&tmp, fspec, APR_FINFO_TYPE,
- cmd->temp_pool)) != APR_SUCCESS) {
+ if ((rv = apr_stat(&tmp, fspec, APR_FINFO_TYPE,
+ cmd->temp_pool)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_WARNING, rv, cmd->server,
"ISAPI: unable to stat, skipping %s", fspec);
return NULL;
@@ -153,7 +153,7 @@ static const char *isapi_cmd_cachefile(cmd_parms *cmd, void *dummy,
}
/* Load the extention as cached (with null request_rec) */
- rv = isapi_lookup(cmd->pool, cmd->server, NULL, fspec, &isa);
+ rv = isapi_lookup(cmd->pool, cmd->server, NULL, fspec, &isa);
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_WARNING, rv, cmd->server,
"ISAPI: unable to cache, skipping %s", fspec);
@@ -165,26 +165,26 @@ static const char *isapi_cmd_cachefile(cmd_parms *cmd, void *dummy,
static const command_rec isapi_cmds[] = {
AP_INIT_TAKE1("ISAPIReadAheadBuffer", ap_set_int_slot,
- (void *)APR_OFFSETOF(isapi_dir_conf, read_ahead_buflen),
+ (void *)APR_OFFSETOF(isapi_dir_conf, read_ahead_buflen),
OR_FILEINFO, "Maximum client request body to initially pass to the"
" ISAPI handler (default: 49152)"),
AP_INIT_FLAG("ISAPILogNotSupported", ap_set_flag_slot,
- (void *)APR_OFFSETOF(isapi_dir_conf, log_unsupported),
+ (void *)APR_OFFSETOF(isapi_dir_conf, log_unsupported),
OR_FILEINFO, "Log requests not supported by the ISAPI server"
" on or off (default: off)"),
AP_INIT_FLAG("ISAPIAppendLogToErrors", ap_set_flag_slot,
- (void *)APR_OFFSETOF(isapi_dir_conf, log_to_errlog),
+ (void *)APR_OFFSETOF(isapi_dir_conf, log_to_errlog),
OR_FILEINFO, "Send all Append Log requests to the error log"
" on or off (default: off)"),
AP_INIT_FLAG("ISAPIAppendLogToQuery", ap_set_flag_slot,
- (void *)APR_OFFSETOF(isapi_dir_conf, log_to_query),
+ (void *)APR_OFFSETOF(isapi_dir_conf, log_to_query),
OR_FILEINFO, "Append Log requests are concatinated to the query args"
" on or off (default: on)"),
AP_INIT_FLAG("ISAPIFakeAsync", ap_set_flag_slot,
- (void *)APR_OFFSETOF(isapi_dir_conf, fake_async),
+ (void *)APR_OFFSETOF(isapi_dir_conf, fake_async),
OR_FILEINFO, "Fake Asynchronous support for isapi callbacks"
" on or off [Experimental] (default: off)"),
- AP_INIT_ITERATE("ISAPICacheFile", isapi_cmd_cachefile, NULL,
+ AP_INIT_ITERATE("ISAPICacheFile", isapi_cmd_cachefile, NULL,
RSRC_CONF, "Cache the specified ISAPI extension in-process"),
{NULL}
};
@@ -222,7 +222,7 @@ static apr_status_t isapi_unload(isapi_loaded *isa, int force)
/* All done with the DLL... get rid of it...
*
* If optionally cached, and we weren't asked to force the unload,
- * pass HSE_TERM_ADVISORY_UNLOAD, and if it returns 1, unload,
+ * pass HSE_TERM_ADVISORY_UNLOAD, and if it returns 1, unload,
* otherwise, leave it alone (it didn't choose to cooperate.)
*/
if (!isa->handle) {
@@ -245,7 +245,7 @@ static apr_status_t cleanup_isapi(void *isa_)
{
isapi_loaded* isa = (isapi_loaded*) isa_;
- /* We must force the module to unload, we are about
+ /* We must force the module to unload, we are about
* to lose the isapi structure's allocation entirely.
*/
return isapi_unload(isa, 1);
@@ -261,13 +261,13 @@ static apr_status_t isapi_load(apr_pool_t *p, server_rec *s, isapi_loaded *isa)
* assure a given isapi can be fooled into behaving well.
*
* The tricky bit, they aren't really a per-dir sort of
- * config, they will always be constant across every
+ * config, they will always be constant across every
* reference to the .dll no matter what context (vhost,
* location, etc) they apply to.
*/
isa->report_version = MAKELONG(0, 5); /* Revision 5.0 */
isa->timeout = 300 * 1000000; /* microsecs, not used */
-
+
rv = apr_dso_load(&isa->handle, isa->filename, p);
if (rv)
{
@@ -310,20 +310,20 @@ static apr_status_t isapi_load(apr_pool_t *p, server_rec *s, isapi_loaded *isa)
if (!(isa->GetExtensionVersion)(isa->isapi_version)) {
apr_status_t rv = apr_get_os_error();
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
- "ISAPI: failed call to GetExtensionVersion() in %s",
+ "ISAPI: failed call to GetExtensionVersion() in %s",
isa->filename);
apr_dso_unload(isa->handle);
isa->handle = NULL;
return rv;
}
- apr_pool_cleanup_register(p, isa, cleanup_isapi,
+ apr_pool_cleanup_register(p, isa, cleanup_isapi,
apr_pool_cleanup_null);
return APR_SUCCESS;
}
-apr_status_t isapi_lookup(apr_pool_t *p, server_rec *s, request_rec *r,
+apr_status_t isapi_lookup(apr_pool_t *p, server_rec *s, request_rec *r,
const char *fpath, isapi_loaded** isa)
{
apr_status_t rv;
@@ -338,7 +338,7 @@ apr_status_t isapi_lookup(apr_pool_t *p, server_rec *s, request_rec *r,
if (*isa) {
/* If we find this lock exists, use a set-aside copy of gainlock
- * to avoid race conditions on NULLing the in_progress variable
+ * to avoid race conditions on NULLing the in_progress variable
* when the load has completed. Release the global isapi hash
* lock so other requests can proceed, then rdlock for completion
* of loading our desired dll or wrlock if we would like to retry
@@ -355,10 +355,10 @@ apr_status_t isapi_lookup(apr_pool_t *p, server_rec *s, request_rec *r,
return rv;
}
-
+
if ((*isa)->last_load_rv == APR_SUCCESS) {
apr_thread_mutex_unlock(loaded.lock);
- if ((rv = apr_thread_rwlock_rdlock(gainlock))
+ if ((rv = apr_thread_rwlock_rdlock(gainlock))
!= APR_SUCCESS) {
return rv;
}
@@ -368,7 +368,7 @@ apr_status_t isapi_lookup(apr_pool_t *p, server_rec *s, request_rec *r,
}
if (apr_time_now() > (*isa)->last_load_time + ISAPI_RETRY) {
-
+
/* Remember last_load_time before releasing the global
* hash lock to avoid colliding with another thread
* that hit this exception at the same time as our
@@ -378,13 +378,13 @@ apr_status_t isapi_lookup(apr_pool_t *p, server_rec *s, request_rec *r,
apr_time_t check_time = (*isa)->last_load_time;
apr_thread_mutex_unlock(loaded.lock);
- if ((rv = apr_thread_rwlock_wrlock(gainlock))
+ if ((rv = apr_thread_rwlock_wrlock(gainlock))
!= APR_SUCCESS) {
return rv;
}
/* If last_load_time is unchanged, we still own this
- * retry, otherwise presume another thread provided
+ * retry, otherwise presume another thread provided
* our retry (for good or ill). Relock the global
* hash for updating last_load_ vars, so their update
* is always atomic to the global lock.
@@ -416,7 +416,7 @@ apr_status_t isapi_lookup(apr_pool_t *p, server_rec *s, request_rec *r,
}
/* If the module was not found, it's time to create a hash key entry
- * before releasing the hash lock to avoid multiple threads from
+ * before releasing the hash lock to avoid multiple threads from
* loading the same module.
*/
key = apr_pstrdup(loaded.pool, fpath);
@@ -437,8 +437,8 @@ apr_status_t isapi_lookup(apr_pool_t *p, server_rec *s, request_rec *r,
}
apr_hash_set(loaded.hash, key, APR_HASH_KEY_STRING, *isa);
-
- /* Now attempt to load the isapi on our own time,
+
+ /* Now attempt to load the isapi on our own time,
* allow other isapi processing to resume.
*/
apr_thread_mutex_unlock(loaded.lock);
@@ -457,7 +457,7 @@ apr_status_t isapi_lookup(apr_pool_t *p, server_rec *s, request_rec *r,
}
else if (!r && (rv != APR_SUCCESS)) {
/* We must leave a rwlock around for requests to retry
- * loading this dll after timeup... since we were in
+ * loading this dll after timeup... since we were in
* the setup code we had avoided creating this lock.
*/
apr_thread_rwlock_create(&(*isa)->in_progress, loaded.pool);
@@ -485,19 +485,19 @@ struct isapi_cid {
apr_thread_mutex_t *completed;
};
-int APR_THREAD_FUNC GetServerVariable (isapi_cid *cid,
+int APR_THREAD_FUNC GetServerVariable (isapi_cid *cid,
char *variable_name,
- void *buf_data,
+ void *buf_data,
apr_uint32_t *buf_size)
{
request_rec *r = cid->r;
const char *result;
apr_uint32_t len;
- if (!strcmp(variable_name, "ALL_HTTP"))
+ if (!strcmp(variable_name, "ALL_HTTP"))
{
- /* crlf delimited, colon split, comma separated and
- * null terminated list of HTTP_ vars
+ /* crlf delimited, colon split, comma separated and
+ * null terminated list of HTTP_ vars
*/
const apr_array_header_t *arr = apr_table_elts(r->subprocess_env);
const apr_table_entry_t *elts = (const apr_table_entry_t *)arr->elts;
@@ -508,13 +508,13 @@ int APR_THREAD_FUNC GetServerVariable (isapi_cid *cid,
len += strlen(elts[i].key) + strlen(elts[i].val) + 3;
}
}
-
+
if (*buf_size < len + 1) {
*buf_size = len + 1;
SetLastError(ERROR_INSUFFICIENT_BUFFER);
return 0;
}
-
+
for (i = 0; i < arr->nelts; i++) {
if (!strncmp(elts[i].key, "HTTP_", 5)) {
strcpy(buf_data, elts[i].key);
@@ -531,10 +531,10 @@ int APR_THREAD_FUNC GetServerVariable (isapi_cid *cid,
*buf_size = len + 1;
return 1;
}
-
- if (!strcmp(variable_name, "ALL_RAW"))
+
+ if (!strcmp(variable_name, "ALL_RAW"))
{
- /* crlf delimited, colon split, comma separated and
+ /* crlf delimited, colon split, comma separated and
* null terminated list of the raw request header
*/
const apr_array_header_t *arr = apr_table_elts(r->headers_in);
@@ -544,13 +544,13 @@ int APR_THREAD_FUNC GetServerVariable (isapi_cid *cid,
for (len = 0, i = 0; i < arr->nelts; i++) {
len += strlen(elts[i].key) + strlen(elts[i].val) + 4;
}
-
+
if (*buf_size < len + 1) {
*buf_size = len + 1;
SetLastError(ERROR_INSUFFICIENT_BUFFER);
return 0;
}
-
+
for (i = 0; i < arr->nelts; i++) {
strcpy(buf_data, elts[i].key);
((char*)buf_data) += strlen(elts[i].key);
@@ -565,7 +565,7 @@ int APR_THREAD_FUNC GetServerVariable (isapi_cid *cid,
*buf_size = len + 1;
return 1;
}
-
+
/* Not a special case */
result = apr_table_get(r->subprocess_env, variable_name);
@@ -586,8 +586,8 @@ int APR_THREAD_FUNC GetServerVariable (isapi_cid *cid,
return 0;
}
-int APR_THREAD_FUNC ReadClient(isapi_cid *cid,
- void *buf_data,
+int APR_THREAD_FUNC ReadClient(isapi_cid *cid,
+ void *buf_data,
apr_uint32_t *buf_size)
{
request_rec *r = cid->r;
@@ -611,7 +611,7 @@ int APR_THREAD_FUNC ReadClient(isapi_cid *cid,
return (res >= 0);
}
-/* Common code invoked for both HSE_REQ_SEND_RESPONSE_HEADER and
+/* Common code invoked for both HSE_REQ_SEND_RESPONSE_HEADER and
* the newer HSE_REQ_SEND_RESPONSE_HEADER_EX ServerSupportFunction(s)
* as well as other functions that write responses and presume that
* the support functions above are optional.
@@ -621,9 +621,9 @@ int APR_THREAD_FUNC ReadClient(isapi_cid *cid,
* get a proper count of bytes consumed. The argument passed to stat
* isn't counted as the head bytes are.
*/
-static apr_ssize_t send_response_header(isapi_cid *cid,
+static apr_ssize_t send_response_header(isapi_cid *cid,
const char *stat,
- const char *head,
+ const char *head,
apr_size_t statlen,
apr_size_t headlen)
{
@@ -675,8 +675,8 @@ static apr_ssize_t send_response_header(isapi_cid *cid,
while (toklen && apr_isspace(*stattok)) {
++stattok; --toklen;
}
- /* Now decide if we follow the xxx message
- * or the http/x.x xxx message format
+ /* Now decide if we follow the xxx message
+ * or the http/x.x xxx message format
*/
if (toklen && apr_isdigit(*stattok)) {
statlen -= toklen;
@@ -701,27 +701,27 @@ static apr_ssize_t send_response_header(isapi_cid *cid,
head = apr_pstrndup(cid->r->pool, head, headlen);
}
}
-
- /* Seems IIS does not enforce the requirement for \r\n termination
- * on HSE_REQ_SEND_RESPONSE_HEADER, but we won't panic...
+
+ /* Seems IIS does not enforce the requirement for \r\n termination
+ * on HSE_REQ_SEND_RESPONSE_HEADER, but we won't panic...
* ap_scan_script_header_err_strs handles this aspect for us.
*
- * Parse them out, or die trying
+ * Parse them out, or die trying
*/
if (stat) {
- cid->r->status = ap_scan_script_header_err_strs(cid->r, NULL,
+ cid->r->status = ap_scan_script_header_err_strs(cid->r, NULL,
&termch, &termarg, stat, head, NULL);
cid->ecb->dwHttpStatusCode = cid->r->status;
}
else {
- cid->r->status = ap_scan_script_header_err_strs(cid->r, NULL,
+ cid->r->status = ap_scan_script_header_err_strs(cid->r, NULL,
&termch, &termarg, head, NULL);
if (cid->ecb->dwHttpStatusCode && cid->r->status == HTTP_OK
&& cid->ecb->dwHttpStatusCode != HTTP_OK) {
/* We tried every way to Sunday to get the status...
* so now we fall back on dwHttpStatusCode if it appears
* ap_scan_script_header fell back on the default code.
- * Any other results set dwHttpStatusCode to the decoded
+ * Any other results set dwHttpStatusCode to the decoded
* status value.
*/
cid->r->status = cid->ecb->dwHttpStatusCode;
@@ -735,14 +735,14 @@ static apr_ssize_t send_response_header(isapi_cid *cid,
return -1;
}
- /* If only Status was passed, we consumed nothing
+ /* If only Status was passed, we consumed nothing
*/
if (!head_present)
return 0;
cid->headers_set = 1;
- /* If all went well, tell the caller we consumed the headers complete
+ /* If all went well, tell the caller we consumed the headers complete
*/
if (!termch)
return(ate + headlen);
@@ -759,9 +759,9 @@ static apr_ssize_t send_response_header(isapi_cid *cid,
return ate;
}
-int APR_THREAD_FUNC WriteClient(isapi_cid *cid,
- void *buf_data,
- apr_uint32_t *size_arg,
+int APR_THREAD_FUNC WriteClient(isapi_cid *cid,
+ void *buf_data,
+ apr_uint32_t *size_arg,
apr_uint32_t flags)
{
request_rec *r = cid->r;
@@ -800,20 +800,20 @@ int APR_THREAD_FUNC WriteClient(isapi_cid *cid,
if ((flags & HSE_IO_ASYNC) && cid->completion) {
if (rv == OK) {
- cid->completion(cid->ecb, cid->completion_arg,
+ cid->completion(cid->ecb, cid->completion_arg,
*size_arg, ERROR_SUCCESS);
}
else {
- cid->completion(cid->ecb, cid->completion_arg,
+ cid->completion(cid->ecb, cid->completion_arg,
*size_arg, ERROR_WRITE_FAULT);
}
}
return (rv == OK);
}
-int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
+int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
apr_uint32_t HSE_code,
- void *buf_data,
+ void *buf_data,
apr_uint32_t *buf_size,
apr_uint32_t *data_type)
{
@@ -874,7 +874,7 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
apr_bucket_brigade *bb;
apr_bucket *b;
bb = apr_brigade_create(cid->r->pool, c->bucket_alloc);
- b = apr_bucket_transient_create((char*) data_type + ate,
+ b = apr_bucket_transient_create((char*) data_type + ate,
headlen - ate, c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, b);
b = apr_bucket_flush_create(c->bucket_alloc);
@@ -931,7 +931,7 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
"is not supported: %s", r->filename);
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
-
+
case HSE_APPEND_LOG_PARAMETER:
/* Log buf_data, of buf_size bytes, in the URI Query (cs-uri-query) field
*/
@@ -947,10 +947,10 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
"ISAPI: %s: %s", cid->r->filename,
(char*) buf_data);
return 1;
-
+
case HSE_REQ_IO_COMPLETION:
- /* Emulates a completion port... Record callback address and
- * user defined arg, we will call this after any async request
+ /* Emulates a completion port... Record callback address and
+ * user defined arg, we will call this after any async request
* (e.g. transmitfile) as if the request executed async.
* Per MS docs... HSE_REQ_IO_COMPLETION replaces any prior call
* to HSE_REQ_IO_COMPLETION, and buf_data may be set to NULL.
@@ -988,12 +988,12 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
-
+
/* Presume the handle was opened with the CORRECT semantics
- * for TransmitFile
+ * for TransmitFile
*/
- if ((rv = apr_os_file_put(&fd, &tf->hFile,
- APR_READ | APR_XTHREAD, r->pool))
+ if ((rv = apr_os_file_put(&fd, &tf->hFile,
+ APR_READ | APR_XTHREAD, r->pool))
!= APR_SUCCESS) {
return 0;
}
@@ -1008,7 +1008,7 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
}
fsize = fi.size - tf->Offset;
}
-
+
/* apr_dupfile_oshandle (&fd, tf->hFile, r->pool); */
bb = apr_brigade_create(r->pool, c->bucket_alloc);
@@ -1022,12 +1022,12 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
* (handled after this case).
*/
if ((tf->dwFlags & HSE_IO_SEND_HEADERS) && tf->pszStatusCode) {
- ate = send_response_header(cid, tf->pszStatusCode,
+ ate = send_response_header(cid, tf->pszStatusCode,
(char*)tf->pHead,
strlen(tf->pszStatusCode),
tf->HeadLength);
}
- else if (!cid->headers_set && tf->pHead && tf->HeadLength
+ else if (!cid->headers_set && tf->pHead && tf->HeadLength
&& *(char*)tf->pHead) {
ate = send_response_header(cid, NULL, (char*)tf->pHead,
0, tf->HeadLength);
@@ -1040,7 +1040,7 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
}
if (tf->pHead && (apr_size_t)ate < tf->HeadLength) {
- b = apr_bucket_transient_create((char*)tf->pHead + ate,
+ b = apr_bucket_transient_create((char*)tf->pHead + ate,
tf->HeadLength - ate,
c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, b);
@@ -1054,7 +1054,7 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
* no greater than MAX(apr_size_t), and more granular than that
* in case the brigade code/filters attempt to read it directly.
*/
- b = apr_bucket_file_create(fd, tf->Offset, AP_MAX_SENDFILE,
+ b = apr_bucket_file_create(fd, tf->Offset, AP_MAX_SENDFILE,
r->pool, c->bucket_alloc);
while (fsize > AP_MAX_SENDFILE) {
apr_bucket *bc;
@@ -1067,17 +1067,17 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
}
else
#endif
- b = apr_bucket_file_create(fd, tf->Offset, (apr_size_t)fsize,
+ b = apr_bucket_file_create(fd, tf->Offset, (apr_size_t)fsize,
r->pool, c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, b);
-
+
if (tf->pTail && tf->TailLength) {
sent += tf->TailLength;
- b = apr_bucket_transient_create((char*)tf->pTail,
+ b = apr_bucket_transient_create((char*)tf->pTail,
tf->TailLength, c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, b);
}
-
+
b = apr_bucket_flush_create(c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, b);
ap_pass_brigade(r->output_filters, bb);
@@ -1089,21 +1089,21 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
if (tf->dwFlags & HSE_IO_ASYNC) {
if (tf->pfnHseIO) {
if (rv == OK) {
- tf->pfnHseIO(cid->ecb, tf->pContext,
+ tf->pfnHseIO(cid->ecb, tf->pContext,
ERROR_SUCCESS, sent);
}
else {
- tf->pfnHseIO(cid->ecb, tf->pContext,
+ tf->pfnHseIO(cid->ecb, tf->pContext,
ERROR_WRITE_FAULT, sent);
}
}
else if (cid->completion) {
if (rv == OK) {
- cid->completion(cid->ecb, cid->completion_arg,
+ cid->completion(cid->ecb, cid->completion_arg,
sent, ERROR_SUCCESS);
}
else {
- cid->completion(cid->ecb, cid->completion_arg,
+ cid->completion(cid->ecb, cid->completion_arg,
sent, ERROR_WRITE_FAULT);
}
}
@@ -1129,9 +1129,9 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
apr_uint32_t read = 0;
int res;
if (!cid->dconf.fake_async) {
- if (cid->dconf.log_unsupported)
+ if (cid->dconf.log_unsupported)
ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
- "ISAPI: asynchronous I/O not supported: %s",
+ "ISAPI: asynchronous I/O not supported: %s",
r->filename);
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
@@ -1149,11 +1149,11 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
if ((*data_type & HSE_IO_ASYNC) && cid->completion) {
if (res >= 0) {
- cid->completion(cid->ecb, cid->completion_arg,
+ cid->completion(cid->ecb, cid->completion_arg,
read, ERROR_SUCCESS);
}
else {
- cid->completion(cid->ecb, cid->completion_arg,
+ cid->completion(cid->ecb, cid->completion_arg,
read, ERROR_READ_FAULT);
}
}
@@ -1176,8 +1176,8 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
char* test_uri = apr_pstrndup(r->pool, (char *)buf_data, *buf_size);
subreq = ap_sub_req_lookup_uri(test_uri, r, NULL);
- info->cchMatchingURL = strlen(test_uri);
- info->cchMatchingPath = apr_cpystrn(info->lpszPath, subreq->filename,
+ info->cchMatchingURL = strlen(test_uri);
+ info->cchMatchingPath = apr_cpystrn(info->lpszPath, subreq->filename,
sizeof(info->lpszPath)) - info->lpszPath;
/* Mapping started with assuming both strings matched.
@@ -1185,8 +1185,8 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
* terminating slashes for directory matches.
*/
if (subreq->path_info && *subreq->path_info) {
- apr_cpystrn(info->lpszPath + info->cchMatchingPath,
- subreq->path_info,
+ apr_cpystrn(info->lpszPath + info->cchMatchingPath,
+ subreq->path_info,
sizeof(info->lpszPath) - info->cchMatchingPath);
info->cchMatchingURL -= strlen(subreq->path_info);
if (subreq->finfo.filetype == APR_DIR
@@ -1206,18 +1206,18 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
/* If the matched isn't a file, roll match back to the prior slash */
if (subreq->finfo.filetype == APR_NOFILE) {
while (info->cchMatchingPath && info->cchMatchingURL) {
- if (info->lpszPath[info->cchMatchingPath - 1] == '/')
+ if (info->lpszPath[info->cchMatchingPath - 1] == '/')
break;
--info->cchMatchingPath;
--info->cchMatchingURL;
}
}
-
+
/* Paths returned with back slashes */
for (test_uri = info->lpszPath; *test_uri; ++test_uri)
if (*test_uri == '/')
*test_uri = '\\';
-
+
/* is a combination of:
* HSE_URL_FLAGS_READ 0x001 Allow read
* HSE_URL_FLAGS_WRITE 0x002 Allow write
@@ -1232,7 +1232,7 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
*
* XxX: As everywhere, EXEC flags could use some work...
* and this could go further with more flags, as desired.
- */
+ */
info->dwFlags = (subreq->finfo.protection & APR_UREAD ? 0x001 : 0)
| (subreq->finfo.protection & APR_UWRITE ? 0x002 : 0)
| (subreq->finfo.protection & APR_UEXECUTE ? 0x204 : 0);
@@ -1252,7 +1252,7 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
"ISAPI: ServerSupportFunction "
"HSE_REQ_GET_CERT_INFO_EX "
- "is not supported: %s", r->filename);
+ "is not supported: %s", r->filename);
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
@@ -1262,9 +1262,9 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
/* Ignore shi->fKeepConn - we don't want the advise
*/
- apr_ssize_t ate = send_response_header(cid, shi->pszStatus,
+ apr_ssize_t ate = send_response_header(cid, shi->pszStatus,
shi->pszHeader,
- shi->cchStatus,
+ shi->cchStatus,
shi->cchHeader);
if (ate < 0) {
SetLastError(ERROR_INVALID_PARAMETER);
@@ -1274,7 +1274,7 @@ int APR_THREAD_FUNC ServerSupportFunction(isapi_cid *cid,
apr_bucket_brigade *bb;
apr_bucket *b;
bb = apr_brigade_create(cid->r->pool, c->bucket_alloc);
- b = apr_bucket_transient_create(shi->pszHeader + ate,
+ b = apr_bucket_transient_create(shi->pszHeader + ate,
shi->cchHeader - ate,
c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, b);
@@ -1339,14 +1339,14 @@ apr_status_t isapi_handler (request_rec *r)
const char *val;
apr_uint32_t read;
int res;
-
- if(strcmp(r->handler, "isapi-isa")
+
+ if(strcmp(r->handler, "isapi-isa")
&& strcmp(r->handler, "isapi-handler")) {
/* Hang on to the isapi-isa for compatibility with older docs
* (wtf did '-isa' mean in the first place?) but introduce
* a newer and clearer "isapi-handler" name.
*/
- return DECLINED;
+ return DECLINED;
}
dconf = ap_get_module_config(r->per_dir_config, &isapi_module);
e = r->subprocess_env;
@@ -1370,7 +1370,7 @@ apr_status_t isapi_handler (request_rec *r)
return HTTP_NOT_FOUND;
}
- if (isapi_lookup(r->pool, r->server, r, r->filename, &isa)
+ if (isapi_lookup(r->pool, r->server, r, r->filename, &isa)
!= APR_SUCCESS) {
return HTTP_INTERNAL_SERVER_ERROR;
}
@@ -1388,7 +1388,7 @@ apr_status_t isapi_handler (request_rec *r)
* NULL or zero out most fields.
*/
cid = apr_pcalloc(r->pool, sizeof(isapi_cid));
-
+
/* Fixup defaults for dconf */
cid->dconf.read_ahead_buflen = (dconf->read_ahead_buflen == ISAPI_UNDEF)
? 49152 : dconf->read_ahead_buflen;
@@ -1406,7 +1406,7 @@ apr_status_t isapi_handler (request_rec *r)
cid->isa = isa;
cid->r = r;
r->status = 0;
-
+
cid->ecb->cbSize = sizeof(EXTENSION_CONTROL_BLOCK);
cid->ecb->dwVersion = isa->report_version;
cid->ecb->dwHttpStatusCode = 0;
@@ -1418,7 +1418,7 @@ apr_status_t isapi_handler (request_rec *r)
cid->ecb->lpszPathInfo = (char*) apr_table_get(e, "PATH_INFO");
cid->ecb->lpszPathTranslated = (char*) apr_table_get(e, "PATH_TRANSLATED");
cid->ecb->lpszContentType = (char*) apr_table_get(e, "CONTENT_TYPE");
-
+
/* Set up the callbacks */
cid->ecb->GetServerVariable = GetServerVariable;
cid->ecb->WriteClient = WriteClient;
@@ -1491,8 +1491,8 @@ apr_status_t isapi_handler (request_rec *r)
* unlocked the mutex.
*/
if (cid->dconf.fake_async) {
- rv = apr_thread_mutex_create(&cid->completed,
- APR_THREAD_MUTEX_UNNESTED,
+ rv = apr_thread_mutex_create(&cid->completed,
+ APR_THREAD_MUTEX_UNNESTED,
r->pool);
if (cid->completed && (rv == APR_SUCCESS)) {
rv = apr_thread_mutex_lock(cid->completed);
@@ -1549,14 +1549,14 @@ apr_status_t isapi_handler (request_rec *r)
}
break;
- case HSE_STATUS_ERROR:
+ case HSE_STATUS_ERROR:
/* end response if we have yet to do so.
*/
r->status = HTTP_INTERNAL_SERVER_ERROR;
break;
default:
- /* TODO: log unrecognized retval for debugging
+ /* TODO: log unrecognized retval for debugging
*/
ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
"ISAPI: return code %d from HttpExtensionProc() "
@@ -1582,7 +1582,7 @@ apr_status_t isapi_handler (request_rec *r)
return OK; /* NOT r->status or cid->r->status, even if it has changed. */
}
-
+
/* As the client returned no error, and if we did not error out
* ourselves, trust dwHttpStatusCode to say something relevant.
*/
@@ -1612,7 +1612,7 @@ static int isapi_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte
"ISAPI: could not create the isapi cache pool");
return APR_EGENERAL;
}
-
+
loaded.hash = apr_hash_make(loaded.pool);
if (!loaded.hash) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
@@ -1620,7 +1620,7 @@ static int isapi_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte
return APR_EGENERAL;
}
- rv = apr_thread_mutex_create(&loaded.lock, APR_THREAD_MUTEX_DEFAULT,
+ rv = apr_thread_mutex_create(&loaded.lock, APR_THREAD_MUTEX_DEFAULT,
loaded.pool);
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, rv, 0, NULL,
diff --git a/modules/arch/win32/mod_win32.c b/modules/arch/win32/mod_win32.c
index e313ad92cc..a57397d765 100644
--- a/modules/arch/win32/mod_win32.c
+++ b/modules/arch/win32/mod_win32.c
@@ -35,15 +35,15 @@
extern OSVERSIONINFO osver; /* hiding in mpm_winnt.c */
static int win_nt;
-/*
+/*
* CGI Script stuff for Win32...
*/
-typedef enum { eFileTypeUNKNOWN, eFileTypeBIN, eFileTypeEXE16, eFileTypeEXE32,
+typedef enum { eFileTypeUNKNOWN, eFileTypeBIN, eFileTypeEXE16, eFileTypeEXE32,
eFileTypeSCRIPT } file_type_e;
-typedef enum { INTERPRETER_SOURCE_UNSET, INTERPRETER_SOURCE_REGISTRY_STRICT,
- INTERPRETER_SOURCE_REGISTRY, INTERPRETER_SOURCE_SHEBANG
+typedef enum { INTERPRETER_SOURCE_UNSET, INTERPRETER_SOURCE_REGISTRY_STRICT,
+ INTERPRETER_SOURCE_REGISTRY, INTERPRETER_SOURCE_SHEBANG
} interpreter_source_e;
-AP_DECLARE(file_type_e) ap_get_win32_interpreter(const request_rec *,
+AP_DECLARE(file_type_e) ap_get_win32_interpreter(const request_rec *,
char **interpreter,
char **arguments);
@@ -69,9 +69,9 @@ static void *merge_win32_dir_configs(apr_pool_t *p, void *basev, void *addv)
win32_dir_conf *add = (win32_dir_conf *) addv;
new = (win32_dir_conf *) apr_pcalloc(p, sizeof(win32_dir_conf));
- new->script_interpreter_source = (add->script_interpreter_source
+ new->script_interpreter_source = (add->script_interpreter_source
!= INTERPRETER_SOURCE_UNSET)
- ? add->script_interpreter_source
+ ? add->script_interpreter_source
: base->script_interpreter_source;
return new;
}
@@ -90,7 +90,7 @@ static const char *set_interpreter_source(cmd_parms *cmd, void *dv,
d->script_interpreter_source = INTERPRETER_SOURCE_SHEBANG;
}
else {
- return apr_pstrcat(cmd->temp_pool, "ScriptInterpreterSource \"", arg,
+ return apr_pstrcat(cmd->temp_pool, "ScriptInterpreterSource \"", arg,
"\" must be \"registry\", \"registry-strict\" or "
"\"script\"", NULL);
}
@@ -104,7 +104,7 @@ static const char *set_interpreter_source(cmd_parms *cmd, void *dv,
* varies between msdos and Windows applications.
* For subsystem 2 [GUI] the default is the system Ansi CP.
* For subsystem 3 [CLI] the default is the system OEM CP.
- */
+ */
static void prep_string(const char ** str, apr_pool_t *p)
{
const char *ch = *str;
@@ -141,7 +141,7 @@ static void prep_string(const char ** str, apr_pool_t *p)
/* Somewhat more exciting ... figure out where the registry has stashed the
* ExecCGI or Open command - it may be nested one level deep (or more???)
*/
-static char* get_interpreter_from_win32_registry(apr_pool_t *p,
+static char* get_interpreter_from_win32_registry(apr_pool_t *p,
const char* ext,
int strict)
{
@@ -153,11 +153,11 @@ static char* get_interpreter_from_win32_registry(apr_pool_t *p,
char execopen_path[] = "SHELL\\OPEN\\COMMAND";
char *type_name;
char *buffer;
-
+
if (!ext) {
return NULL;
}
- /*
+ /*
* Future optimization:
* When the registry is successfully searched, store the strings for
* interpreter and arguments in an ext hash to speed up subsequent look-ups
@@ -175,12 +175,12 @@ static char* get_interpreter_from_win32_registry(apr_pool_t *p,
if (rv == APR_SUCCESS && type_name[0]) {
/* Open the key associated with the script filetype extension */
- rv = ap_regkey_open(&name_key, AP_REGKEY_CLASSES_ROOT, type_name,
+ rv = ap_regkey_open(&name_key, AP_REGKEY_CLASSES_ROOT, type_name,
APR_READ, p);
}
/* Open the key for the script command path by:
- *
+ *
* 1) the 'named' filetype key for ExecCGI/Command
* 2) the extension's type key for ExecCGI/Command
*
@@ -241,7 +241,7 @@ static apr_array_header_t *split_argv(apr_pool_t *p, const char *interp,
{
apr_array_header_t *args = apr_array_make(p, 8, sizeof(char*));
char *d = apr_palloc(p, strlen(interp)+1);
- const char *ch = interp;
+ const char *ch = interp;
const char **arg;
int prgtaken = 0;
int argtaken = 0;
@@ -289,8 +289,8 @@ static apr_array_header_t *split_argv(apr_pool_t *p, const char *interp,
ch += 2;
continue;
}
- if ((*ch == '\"') && ((*(ch + 1) == '$')
- || (*(ch + 1) == '%')) && (*(ch + 2) == '1')
+ if ((*ch == '\"') && ((*(ch + 1) == '$')
+ || (*(ch + 1) == '%')) && (*(ch + 2) == '1')
&& (*(ch + 3) == '\"')) {
prgtaken = 1;
arg = (const char**)apr_array_push(args);
@@ -374,7 +374,7 @@ static apr_array_header_t *split_argv(apr_pool_t *p, const char *interp,
static 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)
{
const apr_array_header_t *elts_arr = apr_table_elts(r->subprocess_env);
@@ -386,7 +386,7 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
const char *args = "";
int i;
- d = (win32_dir_conf *)ap_get_module_config(r->per_dir_config,
+ d = (win32_dir_conf *)ap_get_module_config(r->per_dir_config,
&win32_module);
if (e_info->cmd_type) {
@@ -406,7 +406,7 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
* we will consider.
*/
ext = strrchr(apr_filepath_name_get(*cmd), '.');
-
+
/* If the file has an extension and it is not .com and not .exe and
* we've been instructed to search the registry, then do so.
* Let apr_proc_create do all of the .bat/.cmd dirty work.
@@ -415,13 +415,13 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
|| !strcasecmp(ext,".bat") || !strcasecmp(ext,".cmd"))) {
interpreter = "";
}
- if (!interpreter && ext
- && (d->script_interpreter_source
+ if (!interpreter && ext
+ && (d->script_interpreter_source
== INTERPRETER_SOURCE_REGISTRY
- || d->script_interpreter_source
+ || d->script_interpreter_source
== INTERPRETER_SOURCE_REGISTRY_STRICT)) {
/* Check the registry */
- int strict = (d->script_interpreter_source
+ int strict = (d->script_interpreter_source
== INTERPRETER_SOURCE_REGISTRY_STRICT);
interpreter = get_interpreter_from_win32_registry(r->pool, ext,
strict);
@@ -431,7 +431,7 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
else {
ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server,
strict ? "No ExecCGI verb found for files of type '%s'."
- : "No ExecCGI or Open verb found for files of type '%s'.",
+ : "No ExecCGI or Open verb found for files of type '%s'.",
ext);
}
}
@@ -441,7 +441,7 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
apr_size_t bytes = sizeof(buffer);
apr_size_t i;
- /* Need to peek into the file figure out what it really is...
+ /* Need to peek into the file figure out what it really is...
* ### aught to go back and build a cache for this one of these days.
*/
if ((rv = apr_file_open(&fh, *cmd, APR_READ | APR_BUFFERED,
@@ -464,7 +464,7 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
* would signify utf-8 text files.
*
* Since MS configuration files are all protecting utf-8 encoded
- * Unicode path, file and resource names, we already have the correct
+ * Unicode path, file and resource names, we already have the correct
* WinNT encoding. But at least eat the stupid three bytes up front.
*
* ### A more thorough check would also allow UNICODE text in buf, and
@@ -496,7 +496,7 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
}
else if (bytes >= sizeof(IMAGE_DOS_HEADER)) {
/* Not a script, is it an executable? */
- IMAGE_DOS_HEADER *hdr = (IMAGE_DOS_HEADER*)buffer;
+ IMAGE_DOS_HEADER *hdr = (IMAGE_DOS_HEADER*)buffer;
if (hdr->e_magic == IMAGE_DOS_SIGNATURE) {
if (hdr->e_lfarlc < 0x40) {
/* Ought to invoke this 16 bit exe by a stub, (cmd /c?) */
@@ -528,7 +528,7 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
* application (following the OEM or Ansi code page in effect.)
*/
for (i = 0; i < elts_arr->nelts; ++i) {
- if (win_nt && elts[i].key && *elts[i].key
+ if (win_nt && elts[i].key && *elts[i].key
&& (strncmp(elts[i].key, "HTTP_", 5) == 0
|| strncmp(elts[i].key, "SERVER_", 7) == 0
|| strncmp(elts[i].key, "REQUEST_", 8) == 0
@@ -541,7 +541,7 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
return APR_SUCCESS;
}
-static int win32_pre_config(apr_pool_t *pconf_, apr_pool_t *plog, apr_pool_t *ptemp)
+static int win32_pre_config(apr_pool_t *pconf_, apr_pool_t *plog, apr_pool_t *ptemp)
{
win_nt = (osver.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS);
return OK;
diff --git a/modules/cache/cache_hash.c b/modules/cache/cache_hash.c
index b5c1adb3f8..efbfa40d26 100644
--- a/modules/cache/cache_hash.c
+++ b/modules/cache/cache_hash.c
@@ -213,7 +213,7 @@ static cache_hash_entry_t **find_entry(cache_hash_t *ht,
hash = hash * 33 + *p;
}
}
-
+
/* scan linked list */
for (hep = &ht->array[hash % ht->max], he = *hep;
he;
@@ -275,7 +275,7 @@ CACHE_DECLARE(void *) cache_hash_set(cache_hash_t *ht,
tval = (*hep)->val;
(*hep)->val = val;
}
- /* Return the object just removed from the cache to let the
+ /* Return the object just removed from the cache to let the
* caller clean it up. Cast the constness away upon return.
*/
return (void *) tval;
diff --git a/modules/cache/cache_storage.c b/modules/cache/cache_storage.c
index 8c83149306..3dc757027c 100644
--- a/modules/cache/cache_storage.c
+++ b/modules/cache/cache_storage.c
@@ -36,7 +36,7 @@ int cache_remove_url(cache_request_rec *cache, apr_pool_t *p)
list = cache->providers;
/* Remove the stale cache entry if present. If not, we're
- * being called from outside of a request; remove the
+ * being called from outside of a request; remove the
* non-stalle handle.
*/
h = cache->stale_handle ? cache->stale_handle : cache->handle;
@@ -72,7 +72,7 @@ int cache_create_entity(request_rec *r, apr_off_t size)
cache_handle_t *h = apr_pcalloc(r->pool, sizeof(cache_handle_t));
char *key;
apr_status_t rv;
- cache_request_rec *cache = (cache_request_rec *)
+ cache_request_rec *cache = (cache_request_rec *)
ap_get_module_config(r->request_config, &cache_module);
rv = cache_generate_key(r, r->pool, &key);
@@ -175,7 +175,7 @@ int cache_select(request_rec *r)
apr_status_t rv;
cache_handle_t *h;
char *key;
- cache_request_rec *cache = (cache_request_rec *)
+ cache_request_rec *cache = (cache_request_rec *)
ap_get_module_config(r->request_config, &cache_module);
rv = cache_generate_key(r, r->pool, &key);
@@ -200,7 +200,7 @@ int cache_select(request_rec *r)
/*
* Check Content-Negotiation - Vary
- *
+ *
* At this point we need to make sure that the object we found in
* the cache is the same object that would be delivered to the
* client, when the effects of content negotiation are taken into
@@ -286,7 +286,7 @@ int cache_select(request_rec *r)
if (etag) {
apr_table_set(r->headers_in, "If-None-Match", etag);
}
-
+
if (lastmod) {
apr_table_set(r->headers_in, "If-Modified-Since",
lastmod);
@@ -325,8 +325,8 @@ apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p,
int i;
/* Use the canonical name to improve cache hit rate, but only if this is
- * not a proxy request.
- */
+ * not a proxy request.
+ */
if (!r->proxyreq) {
/* Use _default_ as the hostname if none present, as in mod_vhost */
hostname = ap_get_server_name(r);
@@ -386,8 +386,8 @@ apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p,
* entities.
*/
port_str = "";
- }
- }
+ }
+ }
else {
/* Use the server port */
port_str = apr_psprintf(p, ":%u", ap_get_server_port(r));
diff --git a/modules/cache/cache_util.c b/modules/cache/cache_util.c
index eed63f7f0e..f01bddfec3 100644
--- a/modules/cache/cache_util.c
+++ b/modules/cache/cache_util.c
@@ -72,7 +72,7 @@ static int uri_meets_conditions(apr_uri_t filter, int pathlen, apr_uri_t url)
}
CACHE_DECLARE(cache_provider_list *)ap_cache_get_providers(request_rec *r,
- cache_server_conf *conf,
+ cache_server_conf *conf,
apr_uri_t uri)
{
cache_provider_list *providers = NULL;
@@ -80,7 +80,7 @@ CACHE_DECLARE(cache_provider_list *)ap_cache_get_providers(request_rec *r,
/* loop through all the cacheenable entries */
for (i = 0; i < conf->cacheenable->nelts; i++) {
- struct cache_enable *ent =
+ struct cache_enable *ent =
(struct cache_enable *)conf->cacheenable->elts;
if (uri_meets_conditions(ent[i].url, ent[i].pathlen, uri)) {
/* Fetch from global config and add to the list. */
@@ -117,7 +117,7 @@ CACHE_DECLARE(cache_provider_list *)ap_cache_get_providers(request_rec *r,
* This means we are disabling cachedisable url and below...
*/
for (i = 0; i < conf->cachedisable->nelts; i++) {
- struct cache_disable *ent =
+ struct cache_disable *ent =
(struct cache_disable *)conf->cachedisable->elts;
if (uri_meets_conditions(ent[i].url, ent[i].pathlen, uri)) {
/* Stop searching now. */
@@ -176,29 +176,29 @@ CACHE_DECLARE(int) ap_cache_check_freshness(cache_handle_t *h,
* either the request or the cached response means that we must
* revalidate the request unconditionally, overriding any expiration
* mechanism. It's equivalent to max-age=0,must-revalidate.
- *
+ *
* - RFC2616 14.32 Pragma: no-cache This is treated the same as
* Cache-Control: no-cache.
- *
+ *
* - RFC2616 14.9.3 Cache-Control: max-stale, must-revalidate,
* proxy-revalidate if the max-stale request header exists, modify the
* stale calculations below so that an object can be at most <max-stale>
* seconds stale before we request a revalidation, _UNLESS_ a
* must-revalidate or proxy-revalidate cached response header exists to
* stop us doing this.
- *
+ *
* - RFC2616 14.9.3 Cache-Control: s-maxage the origin server specifies the
* maximum age an object can be before it is considered stale. This
* directive has the effect of proxy|must revalidate, which in turn means
* simple ignore any max-stale setting.
- *
+ *
* - RFC2616 14.9.4 Cache-Control: max-age this header can appear in both
* requests and responses. If both are specified, the smaller of the two
* takes priority.
- *
+ *
* - RFC2616 14.21 Expires: if this request header exists in the cached
* entity, and it's value is in the past, it has expired.
- *
+ *
*/
/* This value comes from the client's initial request. */
@@ -322,10 +322,10 @@ CACHE_DECLARE(int) ap_cache_check_freshness(cache_handle_t *h,
"110 Response is stale");
}
}
- /*
- * If none of Expires, Cache-Control: max-age, or Cache-Control:
- * s-maxage appears in the response, and the respose header age
- * calculated is more than 24 hours add the warning 113
+ /*
+ * If none of Expires, Cache-Control: max-age, or Cache-Control:
+ * s-maxage appears in the response, and the respose header age
+ * calculated is more than 24 hours add the warning 113
*/
if ((maxage_cresp == -1) && (smaxage == -1) &&
(expstr == NULL) && (age > 86400)) {
@@ -451,7 +451,7 @@ CACHE_DECLARE(const char *)ap_cache_tokstr(apr_pool_t *p, const char *list,
}
/*
- * Converts apr_time_t expressed as hex digits to
+ * Converts apr_time_t expressed as hex digits to
* a true apr_time_t.
*/
CACHE_DECLARE(apr_time_t) ap_cache_hex2usec(const char *x)
@@ -503,8 +503,8 @@ static void cache_hash(const char *it, char *val, int ndepth, int nlength)
apr_md5_update(&context, (const unsigned char *) it, strlen(it));
apr_md5_final(digest, &context);
- /* encode 128 bits as 22 characters, using a modified uuencoding
- * the encoding is 3 bytes -> 4 characters* i.e. 128 bits is
+ /* encode 128 bits as 22 characters, using a modified uuencoding
+ * the encoding is 3 bytes -> 4 characters* i.e. 128 bits is
* 5 x 3 bytes + 1 byte -> 5 * 4 characters + 2 characters
*/
for (i = 0, k = 0; i < 15; i += 3) {
diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c
index 6dc59445de..c89f50358e 100644
--- a/modules/cache/mod_cache.c
+++ b/modules/cache/mod_cache.c
@@ -129,12 +129,12 @@ static int cache_url_handler(request_rec *r, int lookup)
ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS,
r->server, "Adding CACHE_SAVE filter for %s",
r->uri);
- ap_add_output_filter_handle(cache_save_filter_handle,
+ ap_add_output_filter_handle(cache_save_filter_handle,
NULL, r, r->connection);
}
ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r->server,
- "Adding CACHE_REMOVE_URL filter for %s",
+ "Adding CACHE_REMOVE_URL filter for %s",
r->uri);
/* Add cache_remove_url filter to this request to remove a
@@ -144,18 +144,18 @@ static int cache_url_handler(request_rec *r, int lookup)
* different due to an internal redirect.
*/
cache->remove_url_filter =
- ap_add_output_filter_handle(cache_remove_url_filter_handle,
+ ap_add_output_filter_handle(cache_remove_url_filter_handle,
cache, r, r->connection);
}
else {
if (cache->stale_headers) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS,
- r->server, "Restoring request headers for %s",
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS,
+ r->server, "Restoring request headers for %s",
r->uri);
r->headers_in = cache->stale_headers;
}
-
+
/* Delete our per-request configuration. */
ap_set_module_config(r->request_config, &cache_module, NULL);
}
@@ -168,12 +168,12 @@ static int cache_url_handler(request_rec *r, int lookup)
}
return DECLINED;
}
-
+
/* if we are a lookup, we are exiting soon one way or another; Restore
* the headers. */
if (lookup) {
if (cache->stale_headers) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r->server,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r->server,
"Restoring request headers.");
r->headers_in = cache->stale_headers;
}
@@ -185,7 +185,7 @@ static int cache_url_handler(request_rec *r, int lookup)
rv = ap_meets_conditions(r);
if (rv != OK) {
/* If we are a lookup, we have to return DECLINED as we have no
- * way of knowing if we will be able to serve the content.
+ * way of knowing if we will be able to serve the content.
*/
if (lookup) {
return DECLINED;
@@ -227,7 +227,7 @@ static int cache_url_handler(request_rec *r, int lookup)
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
"cache: error returned while trying to return %s "
- "cached data",
+ "cached data",
cache->provider_name);
return rv;
}
@@ -246,7 +246,7 @@ static int cache_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
request_rec *r = f->r;
cache_request_rec *cache;
- cache = (cache_request_rec *) ap_get_module_config(r->request_config,
+ cache = (cache_request_rec *) ap_get_module_config(r->request_config,
&cache_module);
if (!cache) {
@@ -262,7 +262,7 @@ static int cache_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
"cache: running CACHE_OUT filter");
/* restore status of cached response */
- /* XXX: This exposes a bug in mem_cache, since it does not
+ /* XXX: This exposes a bug in mem_cache, since it does not
* restore the status into it's handle. */
r->status = cache->handle->cache_obj->info.status;
@@ -339,7 +339,7 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
}
/* have we already run the cachability check and set up the
- * cached file handle?
+ * cached file handle?
*/
if (cache->in_checked) {
/* pass the brigades into the cache, then pass them
@@ -363,7 +363,7 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
*/
/* read expiry date; if a bad date, then leave it so the client can
- * read it
+ * read it
*/
exps = apr_table_get(r->err_headers_out, "Expires");
if (exps == NULL) {
@@ -409,7 +409,7 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
* At this point we decide based on the response headers whether it
* is appropriate _NOT_ to cache the data from the server. There are
* a whole lot of conditions that prevent us from caching this data.
- * They are tested here one by one to be clear and unambiguous.
+ * They are tested here one by one to be clear and unambiguous.
*/
if (r->status != HTTP_OK && r->status != HTTP_NON_AUTHORITATIVE
&& r->status != HTTP_MULTIPLE_CHOICES
@@ -421,7 +421,7 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
* telling us to serve the cached copy.
*/
reason = apr_psprintf(p, "Response status %d", r->status);
- }
+ }
else if (exps != NULL && exp == APR_DATE_BAD) {
/* if a broken Expires header is present, don't cache it */
reason = apr_pstrcat(p, "Broken expires header: ", exps, NULL);
@@ -439,13 +439,13 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
*/
reason = "HTTP Status 304 Not Modified";
}
- else if (r->status == HTTP_OK && lastmods == NULL && etag == NULL
+ else if (r->status == HTTP_OK && lastmods == NULL && etag == NULL
&& (exps == NULL) && (conf->no_last_mod_ignore ==0)) {
/* 200 OK response from HTTP/1.0 and up without Last-Modified,
* Etag, or Expires headers.
*/
/* Note: mod-include clears last_modified/expires/etags - this
- * is why we have an optional function for a key-gen ;-)
+ * is why we have an optional function for a key-gen ;-)
*/
reason = "No Last-Modified, Etag, or Expires headers";
}
@@ -488,7 +488,7 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
*/
reason = "Authorization required";
}
- else if (ap_cache_liststr(NULL,
+ else if (ap_cache_liststr(NULL,
apr_table_get(r->headers_out, "Vary"),
"*", NULL)) {
reason = "Vary header contains '*'";
@@ -500,7 +500,7 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
if (reason) {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "cache: %s not cached. Reason: %s", r->unparsed_uri,
+ "cache: %s not cached. Reason: %s", r->unparsed_uri,
reason);
/* remove this filter from the chain */
@@ -513,7 +513,7 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
/* Make it so that we don't execute this path again. */
cache->in_checked = 1;
- /* Set the content length if known.
+ /* Set the content length if known.
*/
cl = apr_table_get(r->err_headers_out, "Content-Length");
if (cl == NULL) {
@@ -527,8 +527,8 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
}
if (!cl) {
- /* if we don't get the content-length, see if we have all the
- * buckets and use their length to calculate the size
+ /* if we don't get the content-length, see if we have all the
+ * buckets and use their length to calculate the size
*/
apr_bucket *e;
int all_buckets_here=0;
@@ -639,7 +639,7 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
char *dates;
/* no date header (or bad header)! */
/* add one; N.B. use the time _now_ rather than when we were checking
- * the cache
+ * the cache
*/
if (date_in_errhdr == 1) {
apr_table_unset(r->err_headers_out, "Date");
@@ -667,7 +667,7 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
/* if it's in the future, then replace by date */
lastmod = date;
lastmods = dates;
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
r->server,
"cache: Last modified is in the future, "
"replacing with now");
@@ -733,7 +733,7 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
* trying to update headers for an entity which has already been cached.
*
* This may fail, due to an unwritable cache area. E.g. filesystem full,
- * permissions problems or a read-only (re)mount. This must be handled
+ * permissions problems or a read-only (re)mount. This must be handled
* later.
*/
rv = cache->provider->store_headers(cache->handle, r, info);
@@ -771,7 +771,7 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
/* Before returning we need to handle the possible case of an
* unwritable cache. Rather than leaving the entity in the cache
- * and having it constantly re-validated, now that we have recalled
+ * and having it constantly re-validated, now that we have recalled
* the body it is safe to try and remove the url from the cache.
*/
if (rv != APR_SUCCESS) {
@@ -781,8 +781,8 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
rv = cache->provider->remove_url(cache->stale_handle, r->pool);
if (rv != OK) {
- /* Probably a mod_disk_cache cache area has been (re)mounted
- * read-only, or that there is a permissions problem.
+ /* Probably a mod_disk_cache cache area has been (re)mounted
+ * read-only, or that there is a permissions problem.
*/
ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, r->server,
"cache: attempt to remove url from cache unsuccessful.");
@@ -840,9 +840,9 @@ static int cache_remove_url_filter(ap_filter_t *f, apr_bucket_brigade *in)
cache = (cache_request_rec *) f->ctx;
if (!cache) {
- /* user likely configured CACHE_REMOVE_URL manually; they should really
+ /* user likely configured CACHE_REMOVE_URL manually; they should really
* use mod_cache configuration to do that. So:
- * 1. Remove ourselves
+ * 1. Remove ourselves
* 2. Do nothing and bail out
*/
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
@@ -899,12 +899,12 @@ static void * merge_cache_config(apr_pool_t *p, void *basev, void *overridesv)
cache_server_conf *overrides = (cache_server_conf *) overridesv;
/* array of URL prefixes for which caching is disabled */
- ps->cachedisable = apr_array_append(p,
- base->cachedisable,
+ ps->cachedisable = apr_array_append(p,
+ base->cachedisable,
overrides->cachedisable);
/* array of URL prefixes for which caching is enabled */
- ps->cacheenable = apr_array_append(p,
- base->cacheenable,
+ ps->cacheenable = apr_array_append(p,
+ base->cacheenable,
overrides->cacheenable);
/* maximum time to cache a document */
ps->maxex = (overrides->maxex_set == 0) ? base->maxex : overrides->maxex;
@@ -1017,8 +1017,8 @@ static const char *add_ignore_header(cmd_parms *parms, void *dummy,
return NULL;
}
-static const char *add_cache_enable(cmd_parms *parms, void *dummy,
- const char *type,
+static const char *add_cache_enable(cmd_parms *parms, void *dummy,
+ const char *type,
const char *url)
{
cache_server_conf *conf;
@@ -1172,7 +1172,7 @@ static void register_hooks(apr_pool_t *p)
/* cache initializer */
/* cache handler */
ap_hook_quick_handler(cache_url_handler, NULL, NULL, APR_HOOK_FIRST);
- /* cache filters
+ /* cache filters
* XXX The cache filters need to run right after the handlers and before
* any other filters. Consider creating AP_FTYPE_CACHE for this purpose.
*
@@ -1189,9 +1189,9 @@ static void register_hooks(apr_pool_t *p)
* filter to ensure that the compressed content is stored.
* Incrementing filter type by 1 ensures his happens.
*/
- cache_save_filter_handle =
- ap_register_output_filter("CACHE_SAVE",
- cache_save_filter,
+ cache_save_filter_handle =
+ ap_register_output_filter("CACHE_SAVE",
+ cache_save_filter,
NULL,
AP_FTYPE_CONTENT_SET+1);
/*
@@ -1210,9 +1210,9 @@ static void register_hooks(apr_pool_t *p)
* get compressed again. Incrementing filter type by 1 ensures
* his happens.
*/
- cache_out_filter_handle =
- ap_register_output_filter("CACHE_OUT",
- cache_out_filter,
+ cache_out_filter_handle =
+ ap_register_output_filter("CACHE_OUT",
+ cache_out_filter,
NULL,
AP_FTYPE_CONTENT_SET+1);
/*
diff --git a/modules/cache/mod_disk_cache.c b/modules/cache/mod_disk_cache.c
index 7c33c02feb..33c32d548c 100644
--- a/modules/cache/mod_disk_cache.c
+++ b/modules/cache/mod_disk_cache.c
@@ -36,13 +36,13 @@
* regenerate <hash> using HeaderName+HeaderValue+.../foo/bar/baz
* re-read in <hash>.header (must be format #2)
* read in <hash>.data
- *
+ *
* Format #1:
* apr_uint32_t format;
* apr_time_t expire;
* apr_array_t vary_headers (delimited by CRLF)
*
- * Format #2:
+ * Format #2:
* disk_cache_info_t (first sizeof(apr_uint32_t) bytes is the format)
* entity name (dobj->name) [length is in disk_cache_info_t->name_len]
* r->headers_out (delimited by CRLF)
@@ -59,7 +59,7 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info
static apr_status_t store_body(cache_handle_t *h, request_rec *r, apr_bucket_brigade *b);
static apr_status_t recall_headers(cache_handle_t *h, request_rec *r);
static apr_status_t recall_body(cache_handle_t *h, apr_pool_t *p, apr_bucket_brigade *bb);
-static apr_status_t read_array(request_rec *r, apr_array_header_t* arr,
+static apr_status_t read_array(request_rec *r, apr_array_header_t* arr,
apr_file_t *file);
/*
@@ -70,7 +70,7 @@ static char *header_file(apr_pool_t *p, disk_cache_conf *conf,
disk_cache_object_t *dobj, const char *name)
{
if (!dobj->hashfile) {
- dobj->hashfile = ap_cache_generate_name(p, conf->dirlevels,
+ dobj->hashfile = ap_cache_generate_name(p, conf->dirlevels,
conf->dirlength, name);
}
@@ -88,7 +88,7 @@ static char *data_file(apr_pool_t *p, disk_cache_conf *conf,
disk_cache_object_t *dobj, const char *name)
{
if (!dobj->hashfile) {
- dobj->hashfile = ap_cache_generate_name(p, conf->dirlevels,
+ dobj->hashfile = ap_cache_generate_name(p, conf->dirlevels,
conf->dirlength, name);
}
@@ -251,12 +251,12 @@ static const char* regen_key(apr_pool_t *p, apr_table_t *headers,
iov = apr_palloc(p, sizeof(struct iovec) * nvec);
elts = (const char **) varray->elts;
- /* TODO:
+ /* TODO:
* - Handle multiple-value headers better. (sort them?)
* - Handle Case in-sensitive Values better.
- * This isn't the end of the world, since it just lowers the cache
+ * This isn't the end of the world, since it just lowers the cache
* hit rate, but it would be nice to fix.
- *
+ *
* The majority are case insenstive if they are values (encoding etc).
* Most of rfc2616 is case insensitive on header contents.
*
@@ -411,7 +411,7 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
rc = read_array(r, varray, dobj->hfd);
if (rc != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server,
- "disk_cache: Cannot parse vary header file: %s",
+ "disk_cache: Cannot parse vary header file: %s",
dobj->hdrsfile);
return DECLINED;
}
@@ -437,8 +437,8 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
}
else {
apr_off_t offset = 0;
- /* This wasn't a Vary Format file, so we must seek to the
- * start of the file again, so that later reads work.
+ /* This wasn't a Vary Format file, so we must seek to the
+ * start of the file again, so that later reads work.
*/
apr_file_seek(dobj->hfd, APR_SET, &offset);
nkey = key;
@@ -573,7 +573,7 @@ static int remove_url(cache_handle_t *h, apr_pool_t *p)
return OK;
}
-static apr_status_t read_array(request_rec *r, apr_array_header_t* arr,
+static apr_status_t read_array(request_rec *r, apr_array_header_t* arr,
apr_file_t *file)
{
char w[MAX_STRING_LEN];
@@ -821,7 +821,7 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info
if (tmp) {
apr_array_header_t* varray;
- apr_uint32_t format = VARY_FORMAT_VERSION;
+ apr_uint32_t format = VARY_FORMAT_VERSION;
mkdir_structure(conf, dobj->hdrsfile, r->pool);
@@ -929,7 +929,7 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info
return rv;
}
}
-
+
apr_file_close(dobj->hfd); /* flush and close */
/* Remove old file with the same name. If remove fails, then
diff --git a/modules/cache/mod_file_cache.c b/modules/cache/mod_file_cache.c
index 54d0ff5d2d..c98c6437ed 100644
--- a/modules/cache/mod_file_cache.c
+++ b/modules/cache/mod_file_cache.c
@@ -15,7 +15,7 @@
*/
/*
- * Author: mod_file_cache by Bill Stoddard <stoddard apache.org>
+ * Author: mod_file_cache by Bill Stoddard <stoddard apache.org>
* Based on mod_mmap_static by Dean Gaudet <dgaudet arctic.org>
*
* v0.01: initial implementation
@@ -24,22 +24,22 @@
/*
Documentation:
- Some sites have a set of static files that are really busy, and
- change infrequently (or even on a regular schedule). Save time
- by caching open handles to these files. This module, unlike
- mod_mmap_static, caches open file handles, not file content.
+ Some sites have a set of static files that are really busy, and
+ change infrequently (or even on a regular schedule). Save time
+ by caching open handles to these files. This module, unlike
+ mod_mmap_static, caches open file handles, not file content.
On systems (like Windows) with heavy system call overhead and
that have an efficient sendfile implementation, caching file handles
offers several advantages over caching content. First, the file system
can manage the memory, allowing infrequently hit cached files to
be paged out. Second, since caching open handles does not consume
significant resources, it will be possible to enable an AutoLoadCache
- feature where static files are dynamically loaded in the cache
+ feature where static files are dynamically loaded in the cache
as the server runs. On systems that have file change notification,
- this module can be enhanced to automatically garbage collect
+ this module can be enhanced to automatically garbage collect
cached files that change on disk.
- This module should work on Unix systems that have sendfile. Place
+ This module should work on Unix systems that have sendfile. Place
cachefile directives into your configuration to direct files to
be cached.
@@ -47,14 +47,14 @@
cachefile /path/to/file2
...
- These files are only cached when the server is restarted, so if you
- change the list, or if the files are changed, then you'll need to
+ These files are only cached when the server is restarted, so if you
+ change the list, or if the files are changed, then you'll need to
restart the server.
To reiterate that point: if the files are modified *in place*
without restarting the server you may end up serving requests that
are completely bogus. You should update files by unlinking the old
- copy and putting a new copy in place.
+ copy and putting a new copy in place.
There's no such thing as inheriting these files across vhosts or
whatever... place the directives in the main server only.
@@ -108,7 +108,7 @@ typedef struct {
apr_mmap_t *mm;
#endif
char mtimestr[APR_RFC822_DATE_LEN];
- char sizestr[21]; /* big enough to hold any 64-bit file size + null */
+ char sizestr[21]; /* big enough to hold any 64-bit file size + null */
} a_file;
typedef struct {
@@ -140,7 +140,7 @@ static void cache_the_file(cmd_parms *cmd, const char *filename, int mmap)
"%s, skipping", filename);
return;
}
- if ((rc = apr_stat(&tmp.finfo, fspec, APR_FINFO_MIN,
+ if ((rc = apr_stat(&tmp.finfo, fspec, APR_FINFO_MIN,
cmd->temp_pool)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server,
"mod_file_cache: unable to stat(%s), skipping", fspec);
@@ -176,9 +176,9 @@ static void cache_the_file(cmd_parms *cmd, const char *filename, int mmap)
* XXX: APR_HAS_LARGE_FILES issue; need to reject this request if
* size is greater than MAX(apr_size_t) (perhaps greater than 1M?).
*/
- if ((rc = apr_mmap_create(&new_file->mm, fd, 0,
+ if ((rc = apr_mmap_create(&new_file->mm, fd, 0,
(apr_size_t)new_file->finfo.size,
- APR_MMAP_READ, cmd->pool)) != APR_SUCCESS) {
+ APR_MMAP_READ, cmd->pool)) != APR_SUCCESS) {
apr_file_close(fd);
ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server,
"mod_file_cache: unable to mmap %s, skipping", filename);
@@ -216,7 +216,7 @@ static const char *cachefilehandle(cmd_parms *cmd, void *dummy, const char *file
#endif
return NULL;
}
-static const char *cachefilemmap(cmd_parms *cmd, void *dummy, const char *filename)
+static const char *cachefilemmap(cmd_parms *cmd, void *dummy, const char *filename)
{
#if APR_HAS_MMAP
cache_the_file(cmd, filename, 1);
@@ -309,7 +309,7 @@ static int sendfile_handler(request_rec *r, a_file *file)
return OK;
}
-static int file_cache_handler(request_rec *r)
+static int file_cache_handler(request_rec *r)
{
a_file *match;
int errstatus;
@@ -373,7 +373,7 @@ static int file_cache_handler(request_rec *r)
apr_table_setn(r->headers_out, "Content-Length", match->sizestr);
/* Call appropriate handler */
- if (!r->header_only) {
+ if (!r->header_only) {
if (match->is_mmapped == TRUE)
rc = mmap_handler(r, match);
else
@@ -398,9 +398,9 @@ static void register_hooks(apr_pool_t *p)
ap_hook_post_config(file_cache_post_config, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_translate_name(file_cache_xlat, NULL, NULL, APR_HOOK_MIDDLE);
/* This trick doesn't work apparently because the translate hooks
- are single shot. If the core_hook returns OK, then our hook is
+ are single shot. If the core_hook returns OK, then our hook is
not called.
- ap_hook_translate_name(file_cache_xlat, aszPre, NULL, APR_HOOK_MIDDLE);
+ ap_hook_translate_name(file_cache_xlat, aszPre, NULL, APR_HOOK_MIDDLE);
*/
}
diff --git a/modules/cache/mod_mem_cache.c b/modules/cache/mod_mem_cache.c
index 2d45c2cd8e..e61d190e43 100644
--- a/modules/cache/mod_mem_cache.c
+++ b/modules/cache/mod_mem_cache.c
@@ -16,14 +16,14 @@
/*
* Rules for managing obj->refcount:
- * refcount should be incremented when an object is placed in the cache. Insertion
- * of an object into the cache and the refcount increment should happen under
+ * refcount should be incremented when an object is placed in the cache. Insertion
+ * of an object into the cache and the refcount increment should happen under
* protection of the sconf->lock.
*
* refcount should be decremented when the object is removed from the cache.
* Object should be removed from the cache and the refcount decremented while
* under protection of the sconf->lock.
- *
+ *
* refcount should be incremented when an object is retrieved from the cache
* by a worker thread. The retrieval/find operation and refcount increment
* should occur under protection of the sconf->lock
@@ -31,8 +31,8 @@
* refcount can be atomically decremented w/o protection of the sconf->lock
* by worker threads.
*
- * Any object whose refcount drops to 0 should be freed/cleaned up. A refcount
- * of 0 means the object is not in the cache and no worker threads are accessing
+ * Any object whose refcount drops to 0 should be freed/cleaned up. A refcount
+ * of 0 means the object is not in the cache and no worker threads are accessing
* it.
*/
#define CORE_PRIVATE
@@ -157,9 +157,9 @@ static const char* memcache_cache_get_key(void*a)
cache_object_t *obj = (cache_object_t *)a;
return obj->key;
}
-/**
+/**
* memcache_cache_free()
- * memcache_cache_free is a callback that is only invoked by a thread
+ * memcache_cache_free is a callback that is only invoked by a thread
* running in cache_insert(). cache_insert() runs under protection
* of sconf->lock. By the time this function has been entered, the cache_object
* has been ejected from the cache. decrement the refcount and if the refcount drops
@@ -180,21 +180,21 @@ static void memcache_cache_free(void*a)
* functions return a 'negative' score since priority queues
* dequeue the object with the highest value first
*/
-static long memcache_lru_algorithm(long queue_clock, void *a)
+static long memcache_lru_algorithm(long queue_clock, void *a)
{
cache_object_t *obj = (cache_object_t *)a;
mem_cache_object_t *mobj = obj->vobj;
if (mobj->priority == 0)
mobj->priority = queue_clock - mobj->total_refs;
- /*
+ /*
* a 'proper' LRU function would just be
- * mobj->priority = mobj->total_refs;
+ * mobj->priority = mobj->total_refs;
*/
return mobj->priority;
}
-static long memcache_gdsf_algorithm(long queue_clock, void *a)
+static long memcache_gdsf_algorithm(long queue_clock, void *a)
{
cache_object_t *obj = (cache_object_t *)a;
mem_cache_object_t *mobj = obj->vobj;
@@ -212,7 +212,7 @@ static void cleanup_cache_object(cache_object_t *obj)
/* TODO:
* We desperately need a more efficient way of allocating objects. We're
- * making way too many malloc calls to create a fully populated
+ * making way too many malloc calls to create a fully populated
* cache object...
*/
@@ -236,7 +236,7 @@ static void cleanup_cache_object(cache_object_t *obj)
#endif
}
if (mobj->header_out) {
- if (mobj->header_out[0].hdr)
+ if (mobj->header_out[0].hdr)
free(mobj->header_out[0].hdr);
free(mobj->header_out);
}
@@ -248,7 +248,7 @@ static void cleanup_cache_object(cache_object_t *obj)
free(mobj);
}
}
-static apr_status_t decrement_refcount(void *arg)
+static apr_status_t decrement_refcount(void *arg)
{
cache_object_t *obj = (cache_object_t *) arg;
@@ -271,7 +271,7 @@ static apr_status_t decrement_refcount(void *arg)
if (sconf->lock) {
apr_thread_mutex_unlock(sconf->lock);
}
- }
+ }
/* If the refcount drops to 0, cleanup the cache object */
if (!apr_atomic_dec32(&obj->refcount)) {
@@ -295,7 +295,7 @@ static apr_status_t cleanup_cache_mem(void *sconfv)
apr_thread_mutex_lock(sconf->lock);
}
obj = cache_pop(co->cache_cache);
- while (obj) {
+ while (obj) {
/* Iterate over the cache and clean up each unreferenced entry */
if (!apr_atomic_dec32(&obj->refcount)) {
cleanup_cache_object(obj);
@@ -303,7 +303,7 @@ static apr_status_t cleanup_cache_mem(void *sconfv)
obj = cache_pop(co->cache_cache);
}
- /* Cache is empty, free the cache table */
+ /* Cache is empty, free the cache table */
cache_free(co->cache_cache);
if (sconf->lock) {
@@ -332,7 +332,7 @@ static void *create_cache_config(apr_pool_t *p, server_rec *s)
}
static int create_entity(cache_handle_t *h, cache_type_e type_e,
- request_rec *r, const char *key, apr_off_t len)
+ request_rec *r, const char *key, apr_off_t len)
{
cache_object_t *obj, *tmp_obj;
mem_cache_object_t *mobj;
@@ -347,12 +347,12 @@ static int create_entity(cache_handle_t *h, cache_type_e type_e,
len = sconf->max_streaming_buffer_size;
}
- /* Note: cache_insert() will automatically garbage collect
+ /* Note: cache_insert() will automatically garbage collect
* objects from the cache if the max_cache_size threshold is
* exceeded. This means mod_mem_cache does not need to implement
* max_cache_size checks.
*/
- if (len < sconf->min_cache_object_size ||
+ if (len < sconf->min_cache_object_size ||
len > sconf->max_cache_object_size) {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"mem_cache: URL %s failed the size check and will not be cached.",
@@ -361,7 +361,7 @@ static int create_entity(cache_handle_t *h, cache_type_e type_e,
}
if (type_e == CACHE_TYPE_FILE) {
- /* CACHE_TYPE_FILE is only valid for local content handled by the
+ /* CACHE_TYPE_FILE is only valid for local content handled by the
* default handler. Need a better way to check if the file is
* local or not.
*/
@@ -405,11 +405,11 @@ static int create_entity(cache_handle_t *h, cache_type_e type_e,
* avoid multiple threads attempting to cache the same content only
* to discover at the very end that only one of them will succeed.
* Furthermore, adding the cache object to the table at the end could
- * open up a subtle but easy to exploit DoS hole: someone could request
+ * open up a subtle but easy to exploit DoS hole: someone could request
* a very large file with multiple requests. Better to detect this here
* rather than after the cache object has been completely built and
* initialized...
- * XXX Need a way to insert into the cache w/o such coarse grained locking
+ * XXX Need a way to insert into the cache w/o such coarse grained locking
*/
if (sconf->lock) {
apr_thread_mutex_lock(sconf->lock);
@@ -418,7 +418,7 @@ static int create_entity(cache_handle_t *h, cache_type_e type_e,
if (!tmp_obj) {
cache_insert(sconf->cache_cache, obj);
- /* Add a refcount to account for the reference by the
+ /* Add a refcount to account for the reference by the
* hashtable in the cache. Refcount should be 2 now, one
* for this thread, and one for the cache.
*/
@@ -430,14 +430,14 @@ static int create_entity(cache_handle_t *h, cache_type_e type_e,
if (tmp_obj) {
/* This thread collided with another thread loading the same object
- * into the cache at the same time. Defer to the other thread which
+ * into the cache at the same time. Defer to the other thread which
* is further along.
*/
cleanup_cache_object(obj);
return DECLINED;
}
- apr_pool_cleanup_register(r->pool, obj, decrement_refcount,
+ apr_pool_cleanup_register(r->pool, obj, decrement_refcount,
apr_pool_cleanup_null);
/* Populate the cache handle */
@@ -447,18 +447,18 @@ static int create_entity(cache_handle_t *h, cache_type_e type_e,
}
static int create_mem_entity(cache_handle_t *h, request_rec *r,
- const char *key, apr_off_t len)
+ const char *key, apr_off_t len)
{
return create_entity(h, CACHE_TYPE_HEAP, r, key, len);
}
static int create_fd_entity(cache_handle_t *h, request_rec *r,
- const char *key, apr_off_t len)
+ const char *key, apr_off_t len)
{
return create_entity(h, CACHE_TYPE_FILE, r, key, len);
}
-static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
+static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
{
cache_object_t *obj;
@@ -475,7 +475,7 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
cache_update(sconf->cache_cache, obj);
/* If this is a subrequest, register the cleanup against
- * the main request. This will prevent the cache object
+ * the main request. This will prevent the cache object
* from being cleaned up from under the request after the
* subrequest is destroyed.
*/
@@ -507,13 +507,13 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
}
/* remove_entity()
- * Notes:
+ * Notes:
* refcount should be at least 1 upon entry to this function to account
* for this thread's reference to the object. If the refcount is 1, then
* object has been removed from the cache by another thread and this thread
* is the last thread accessing the object.
*/
-static int remove_entity(cache_handle_t *h)
+static int remove_entity(cache_handle_t *h)
{
cache_object_t *obj = h->cache_obj;
cache_object_t *tobj = NULL;
@@ -524,7 +524,7 @@ static int remove_entity(cache_handle_t *h)
/* If the entity is still in the cache, remove it and decrement the
* refcount. If the entity is not in the cache, do nothing. In both cases
- * decrement_refcount called by the last thread referencing the object will
+ * decrement_refcount called by the last thread referencing the object will
* trigger the cleanup.
*/
tobj = cache_find(sconf->cache_cache, obj->key);
@@ -532,15 +532,15 @@ static int remove_entity(cache_handle_t *h)
cache_remove(sconf->cache_cache, obj);
apr_atomic_dec32(&obj->refcount);
}
-
+
if (sconf->lock) {
apr_thread_mutex_unlock(sconf->lock);
}
return OK;
}
-static apr_status_t serialize_table(cache_header_tbl_t **obj,
- apr_ssize_t *nelts,
+static apr_status_t serialize_table(cache_header_tbl_t **obj,
+ apr_ssize_t *nelts,
apr_table_t *table)
{
const apr_array_header_t *elts_arr = apr_table_elts(table);
@@ -549,7 +549,7 @@ static apr_status_t serialize_table(cache_header_tbl_t **obj,
apr_size_t len = 0;
apr_size_t idx = 0;
char *buf;
-
+
*nelts = elts_arr->nelts;
if (*nelts == 0 ) {
*obj=NULL;
@@ -586,15 +586,15 @@ static apr_status_t serialize_table(cache_header_tbl_t **obj,
}
return APR_SUCCESS;
}
-static int unserialize_table( cache_header_tbl_t *ctbl,
- int num_headers,
+static int unserialize_table( cache_header_tbl_t *ctbl,
+ int num_headers,
apr_table_t *t )
{
int i;
for (i = 0; i < num_headers; ++i) {
apr_table_addn(t, ctbl[i].hdr, ctbl[i].val);
- }
+ }
return APR_SUCCESS;
}
@@ -602,7 +602,7 @@ static int unserialize_table( cache_header_tbl_t *ctbl,
/* remove_url()
* Notes:
*/
-static int remove_url(cache_handle_t *h, apr_pool_t *p)
+static int remove_url(cache_handle_t *h, apr_pool_t *p)
{
cache_object_t *obj;
int cleanup = 0;
@@ -610,8 +610,8 @@ static int remove_url(cache_handle_t *h, apr_pool_t *p)
if (sconf->lock) {
apr_thread_mutex_lock(sconf->lock);
}
-
- obj = h->cache_obj;
+
+ obj = h->cache_obj;
if (obj) {
cache_remove(sconf->cache_cache, obj);
/* For performance, cleanup cache object after releasing the lock */
@@ -628,11 +628,11 @@ static int remove_url(cache_handle_t *h, apr_pool_t *p)
return OK;
}
-static apr_status_t recall_headers(cache_handle_t *h, request_rec *r)
+static apr_status_t recall_headers(cache_handle_t *h, request_rec *r)
{
int rc;
mem_cache_object_t *mobj = (mem_cache_object_t*) h->cache_obj->vobj;
-
+
h->req_hdrs = apr_table_make(r->pool, mobj->num_req_hdrs);
h->resp_hdrs = apr_table_make(r->pool, mobj->num_header_out);
@@ -643,7 +643,7 @@ static apr_status_t recall_headers(cache_handle_t *h, request_rec *r)
return rc;
}
-static apr_status_t recall_body(cache_handle_t *h, apr_pool_t *p, apr_bucket_brigade *bb)
+static apr_status_t recall_body(cache_handle_t *h, apr_pool_t *p, apr_bucket_brigade *bb)
{
apr_bucket *b;
mem_cache_object_t *mobj = (mem_cache_object_t*) h->cache_obj->vobj;
@@ -674,10 +674,10 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info
apr_table_t *headers_out;
/*
- * The cache needs to keep track of the following information:
- * - Date, LastMod, Version, ReqTime, RespTime, ContentLength
- * - The original request headers (for Vary)
- * - The original response headers (for returning with a cached response)
+ * The cache needs to keep track of the following information:
+ * - Date, LastMod, Version, ReqTime, RespTime, ContentLength
+ * - The original request headers (for Vary)
+ * - The original response headers (for returning with a cached response)
* - The body of the message
*/
rc = serialize_table(&mobj->req_hdrs,
@@ -716,7 +716,7 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info
return APR_SUCCESS;
}
-static apr_status_t store_body(cache_handle_t *h, request_rec *r, apr_bucket_brigade *b)
+static apr_status_t store_body(cache_handle_t *h, request_rec *r, apr_bucket_brigade *b)
{
apr_status_t rv;
cache_object_t *obj = h->cache_obj;
@@ -779,10 +779,10 @@ static apr_status_t store_body(cache_handle_t *h, request_rec *r, apr_bucket_bri
mobj->type = CACHE_TYPE_HEAP;
}
- /*
+ /*
* FD cacheing is not enabled or the content was not
* suitable for fd caching.
- */
+ */
if (mobj->m == NULL) {
mobj->m = malloc(mobj->m_len);
if (mobj->m == NULL) {
@@ -802,8 +802,8 @@ static apr_status_t store_body(cache_handle_t *h, request_rec *r, apr_bucket_bri
if (APR_BUCKET_IS_EOS(e)) {
if (mobj->m_len > obj->count) {
- /* Caching a streamed response. Reallocate a buffer of the
- * correct size and copy the streamed response into that
+ /* Caching a streamed response. Reallocate a buffer of the
+ * correct size and copy the streamed response into that
* buffer */
char *buf = malloc(obj->count);
if (!buf) {
@@ -815,7 +815,7 @@ static apr_status_t store_body(cache_handle_t *h, request_rec *r, apr_bucket_bri
/* Now comes the crufty part... there is no way to tell the
* cache that the size of the object has changed. We need
- * to remove the object, update the size and re-add the
+ * to remove the object, update the size and re-add the
* object, all under protection of the lock.
*/
if (sconf->lock) {
@@ -831,14 +831,14 @@ static apr_status_t store_body(cache_handle_t *h, request_rec *r, apr_bucket_bri
cache_remove(sconf->cache_cache, obj);
/* For illustration, cache no longer has reference to the object
* so decrement the refcount
- * apr_atomic_dec32(&obj->refcount);
+ * apr_atomic_dec32(&obj->refcount);
*/
mobj->m_len = obj->count;
cache_insert(sconf->cache_cache, obj);
/* For illustration, cache now has reference to the object, so
* increment the refcount
- * apr_atomic_inc32(&obj->refcount);
+ * apr_atomic_inc32(&obj->refcount);
*/
}
else if (tobj) {
@@ -851,7 +851,7 @@ static apr_status_t store_body(cache_handle_t *h, request_rec *r, apr_bucket_bri
/* Object has been ejected from the cache, add it back to the cache */
mobj->m_len = obj->count;
cache_insert(sconf->cache_cache, obj);
- apr_atomic_inc32(&obj->refcount);
+ apr_atomic_inc32(&obj->refcount);
}
if (sconf->lock) {
@@ -906,7 +906,7 @@ static int mem_cache_post_config(apr_pool_t *p, apr_pool_t *plog,
return DONE;
}
if (sconf->max_streaming_buffer_size > sconf->max_cache_object_size) {
- /* Issue a notice only if something other than the default config
+ /* Issue a notice only if something other than the default config
* is being used */
if (sconf->max_streaming_buffer_size != DEFAULT_MAX_STREAMING_BUFFER_SIZE &&
sconf->max_cache_object_size != DEFAULT_MAX_CACHE_OBJECT_SIZE) {
@@ -928,7 +928,7 @@ static int mem_cache_post_config(apr_pool_t *p, apr_pool_t *plog,
}
sconf->cache_cache = cache_init(sconf->max_object_cnt,
- sconf->max_cache_size,
+ sconf->max_cache_size,
memcache_get_priority,
sconf->cache_remove_algorithm,
memcache_get_pos,
@@ -945,8 +945,8 @@ static int mem_cache_post_config(apr_pool_t *p, apr_pool_t *plog,
return -1;
}
-
-static const char
+
+static const char
*set_max_cache_size(cmd_parms *parms, void *in_struct_ptr, const char *arg)
{
apr_size_t val;
@@ -957,7 +957,7 @@ static const char
sconf->max_cache_size = val*1024;
return NULL;
}
-static const char
+static const char
*set_min_cache_object_size(cmd_parms *parms, void *in_struct_ptr, const char *arg)
{
apr_size_t val;
@@ -968,7 +968,7 @@ static const char
sconf->min_cache_object_size = val;
return NULL;
}
-static const char
+static const char
*set_max_cache_object_size(cmd_parms *parms, void *in_struct_ptr, const char *arg)
{
apr_size_t val;
@@ -979,7 +979,7 @@ static const char
sconf->max_cache_object_size = val;
return NULL;
}
-static const char
+static const char
*set_max_object_count(cmd_parms *parms, void *in_struct_ptr, const char *arg)
{
apr_size_t val;
@@ -991,7 +991,7 @@ static const char
return NULL;
}
-static const char
+static const char
*set_cache_removal_algorithm(cmd_parms *parms, void *name, const char *arg)
{
if (strcasecmp("LRU", arg)) {
diff --git a/modules/dav/fs/dbm.c b/modules/dav/fs/dbm.c
index f2d0511e75..9d61908ead 100644
--- a/modules/dav/fs/dbm.c
+++ b/modules/dav/fs/dbm.c
@@ -129,13 +129,13 @@ dav_error * dav_dbm_open_direct(apr_pool_t *p, const char *pathname, int ro,
*pdb = NULL;
if ((status = apr_dbm_open(&file, pathname,
- ro ? APR_DBM_READONLY : APR_DBM_RWCREATE,
+ ro ? APR_DBM_READONLY : APR_DBM_RWCREATE,
APR_OS_DEFAULT, p))
!= APR_SUCCESS
&& !ro) {
/* ### do something with 'status' */
- /* we can't continue if we couldn't open the file
+ /* we can't continue if we couldn't open the file
and we need to write */
return dav_fs_dbm_error(NULL, p, status);
}
diff --git a/modules/dav/fs/lock.c b/modules/dav/fs/lock.c
index d57ac39445..4258a665b4 100644
--- a/modules/dav/fs/lock.c
+++ b/modules/dav/fs/lock.c
@@ -41,7 +41,7 @@
/*
** LOCK DATABASES
-**
+**
** Lockdiscovery information is stored in the single lock database specified
** by the DAVLockDB directive. Information about this db is stored in the
** global server configuration.
@@ -107,7 +107,7 @@ struct dav_locktoken {
/*
** We need to reliably size the fixed-length portion of
-** dav_lock_discovery; best to separate it into another
+** dav_lock_discovery; best to separate it into another
** struct for a convenient sizeof, unless we pack lock_discovery.
*/
typedef struct dav_lock_discovery_fixed
@@ -146,7 +146,7 @@ typedef struct dav_lock_indirect
/*
-** Stored direct lock info - full lock_discovery length:
+** Stored direct lock info - full lock_discovery length:
** prefix + Fixed length + lock token + 2 strings + 2 nulls (one for each string)
*/
#define dav_size_direct(a) (1 + sizeof(dav_lock_discovery_fixed) \
@@ -258,7 +258,7 @@ static dav_error * dav_fs_parse_locktoken(
"The opaquelocktoken has an incorrect format "
"and could not be parsed.");
}
-
+
*locktoken_p = locktoken;
return NULL;
}
@@ -480,7 +480,7 @@ static dav_error * dav_fs_save_lock_record(dav_lockdb *lockdb, apr_datum_t key,
(void) dav_dbm_delete(lockdb->info->db, key);
return NULL;
}
-
+
while(dp) {
val.dsize += dav_size_direct(dp);
dp = dp->next;
@@ -506,7 +506,7 @@ static dav_error * dav_fs_save_lock_record(dav_lockdb *lockdb, apr_datum_t key,
*ptr++ = '\0';
}
else {
- memcpy(ptr, dp->owner, strlen(dp->owner) + 1);
+ memcpy(ptr, dp->owner, strlen(dp->owner) + 1);
ptr += strlen(dp->owner) + 1;
}
if (dp->auth_user == NULL) {
@@ -588,7 +588,7 @@ static dav_error * dav_fs_load_lock_record(dav_lockdb *lockdb, apr_datum_t key,
if ((err = dav_dbm_fetch(lockdb->info->db, key, &val)) != NULL)
return err;
-
+
if (!val.dsize)
return NULL;
@@ -613,7 +613,7 @@ static dav_error * dav_fs_load_lock_record(dav_lockdb *lockdb, apr_datum_t key,
if (*(val.dptr + offset) == '\0') {
++offset;
- }
+ }
else {
dp->auth_user = apr_pstrdup(p, val.dptr + offset);
offset += strlen(dp->auth_user) + 1;
@@ -655,7 +655,7 @@ static dav_error * dav_fs_load_lock_record(dav_lockdb *lockdb, apr_datum_t key,
offset += sizeof(ip->timeout);
memcpy(&ip->key.dsize, val.dptr + offset, sizeof(ip->key.dsize)); /* length of datum */
offset += sizeof(ip->key.dsize);
- ip->key.dptr = apr_palloc(p, ip->key.dsize);
+ ip->key.dptr = apr_palloc(p, ip->key.dsize);
memcpy(ip->key.dptr, val.dptr + offset, ip->key.dsize);
offset += ip->key.dsize;
@@ -710,7 +710,7 @@ static dav_error * dav_fs_resolve(dav_lockdb *lockdb,
dav_error *err;
dav_lock_discovery *dir;
dav_lock_indirect *ind;
-
+
if ((err = dav_fs_load_lock_record(lockdb, indirect->key,
DAV_CREATE_LIST,
&dir, &ind)) != NULL) {
@@ -721,7 +721,7 @@ static dav_error * dav_fs_resolve(dav_lockdb *lockdb,
*ref_dp = dir;
*ref_ip = ind;
}
-
+
for (; dir != NULL; dir = dir->next) {
if (!dav_compare_locktoken(indirect->locktoken, dir->locktoken)) {
*direct = dir;
@@ -783,7 +783,7 @@ static const char *dav_fs_get_supportedlock(const dav_resource *resource)
** for the given directory.
*/
static dav_error * dav_fs_load_locknull_list(apr_pool_t *p, const char *dirpath,
- dav_buffer *pbuf)
+ dav_buffer *pbuf)
{
apr_finfo_t finfo;
apr_file_t *file = NULL;
@@ -888,7 +888,7 @@ static dav_error * dav_fs_save_locknull_list(apr_pool_t *p, const char *dirpath,
|| amt != pbuf->cur_len) {
err = dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0,
apr_psprintf(p,
- "Error writing %" APR_SIZE_T_FMT
+ "Error writing %" APR_SIZE_T_FMT
" bytes to %s",
pbuf->cur_len, pathname));
}
diff --git a/modules/dav/fs/repos.c b/modules/dav/fs/repos.c
index 039b7a6241..f28839982b 100644
--- a/modules/dav/fs/repos.c
+++ b/modules/dav/fs/repos.c
@@ -183,7 +183,7 @@ struct dav_stream {
const char *pathname; /* we may need to remove it at close time */
};
-/* returns an appropriate HTTP status code given an APR status code for a
+/* returns an appropriate HTTP status code given an APR status code for a
* failed I/O operation. ### use something besides 500? */
#define MAP_IO2HTTP(e) (APR_STATUS_IS_ENOSPC(e) ? HTTP_INSUFFICIENT_STORAGE : \
HTTP_INTERNAL_SERVER_ERROR)
@@ -232,7 +232,7 @@ dav_error * dav_fs_dir_file_name(
if (dirlen > 0) {
rv = apr_filepath_root(&rootpath, &testpath, 0, ctx->pool);
}
-
+
/* remove trailing slash from dirpath, unless it's a root path
*/
if ((rv == APR_SUCCESS && testpath && *testpath)
@@ -241,7 +241,7 @@ dav_error * dav_fs_dir_file_name(
dirpath[dirlen - 1] = '\0';
}
}
-
+
/* ###: Looks like a response could be appropriate
*
* APR_SUCCESS here tells us the dir is a root
@@ -272,7 +272,7 @@ dav_error * dav_fs_dir_file_name(
static void dav_format_time(int style, apr_time_t sec, char *buf)
{
apr_time_exp_t tms;
-
+
/* ### what to do if fails? */
(void) apr_time_exp_gmt(&tms, sec);
@@ -330,14 +330,14 @@ static dav_error * dav_fs_copymove_file(
"Could not set permissions on destination");
}
}
- }
+ }
else {
perms = APR_OS_DEFAULT;
}
dav_set_bufsize(p, pbuf, DAV_FS_COPY_BLOCKSIZE);
- if ((apr_file_open(&inf, src, APR_READ | APR_BINARY, APR_OS_DEFAULT, p))
+ if ((apr_file_open(&inf, src, APR_READ | APR_BINARY, APR_OS_DEFAULT, p))
!= APR_SUCCESS) {
/* ### use something besides 500? */
return dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0,
@@ -345,7 +345,7 @@ static dav_error * dav_fs_copymove_file(
}
/* ### do we need to deal with the umask? */
- status = apr_file_open(&outf, dst, APR_WRITE | APR_CREATE | APR_TRUNCATE
+ status = apr_file_open(&outf, dst, APR_WRITE | APR_CREATE | APR_TRUNCATE
| APR_BINARY, perms, p);
if (status != APR_SUCCESS) {
apr_file_close(inf);
@@ -361,7 +361,7 @@ static dav_error * dav_fs_copymove_file(
if (status != APR_SUCCESS && status != APR_EOF) {
apr_file_close(inf);
apr_file_close(outf);
-
+
if (apr_file_remove(dst, p) != APR_SUCCESS) {
/* ### ACK! Inconsistent state... */
@@ -750,7 +750,7 @@ static dav_error * dav_fs_get_parent_resource(const dav_resource *resource,
*/
testpath = ctx->pathname;
rv = apr_filepath_root(&testroot, &testpath, 0, ctx->pool);
- if ((rv != APR_SUCCESS && rv != APR_ERELATIVE)
+ if ((rv != APR_SUCCESS && rv != APR_ERELATIVE)
|| !testpath || !*testpath) {
*result_parent = NULL;
return NULL;
@@ -765,7 +765,7 @@ static dav_error * dav_fs_get_parent_resource(const dav_resource *resource,
parent_ctx->pool = ctx->pool;
dirpath = ap_make_dirstr_parent(ctx->pool, ctx->pathname);
- if (strlen(dirpath) > 1 && dirpath[strlen(dirpath) - 1] == '/')
+ if (strlen(dirpath) > 1 && dirpath[strlen(dirpath) - 1] == '/')
dirpath[strlen(dirpath) - 1] = '\0';
parent_ctx->pathname = dirpath;
@@ -782,7 +782,7 @@ static dav_error * dav_fs_get_parent_resource(const dav_resource *resource,
parent_resource->uri = uri;
}
- rv = apr_stat(&parent_ctx->finfo, parent_ctx->pathname,
+ rv = apr_stat(&parent_ctx->finfo, parent_ctx->pathname,
APR_FINFO_NORM, ctx->pool);
if (rv == APR_SUCCESS || rv == APR_INCOMPLETE) {
parent_resource->exists = 1;
@@ -1056,9 +1056,9 @@ static dav_error * dav_fs_copymove_walker(dav_walk_resource *wres,
}
}
else {
- err = dav_fs_copymove_file(ctx->is_move, ctx->pool,
- srcinfo->pathname, dstinfo->pathname,
- &srcinfo->finfo,
+ err = dav_fs_copymove_file(ctx->is_move, ctx->pool,
+ srcinfo->pathname, dstinfo->pathname,
+ &srcinfo->finfo,
ctx->res_dst->exists ? &dstinfo->finfo : NULL,
&ctx->work_buf);
/* ### push a higher-level description? */
@@ -1141,13 +1141,13 @@ static dav_error *dav_fs_copymove_resource(
/* not a collection */
if ((err = dav_fs_copymove_file(is_move, src->info->pool,
src->info->pathname, dst->info->pathname,
- &src->info->finfo,
+ &src->info->finfo,
dst->exists ? &dst->info->finfo : NULL,
&work_buf)) != NULL) {
/* ### push a higher-level description? */
return err;
}
-
+
/* copy/move properties as well */
return dav_fs_copymoveset(is_move, src->info->pool, src, dst, &work_buf);
}
@@ -1223,10 +1223,10 @@ static dav_error * dav_fs_move_resource(
* so try it
*/
dirpath = ap_make_dirstr_parent(dstinfo->pool, dstinfo->pathname);
- /*
+ /*
* XXX: If missing dev ... then what test?
* Really need a try and failover for those platforms.
- *
+ *
*/
rv = apr_stat(&finfo, dirpath, APR_FINFO_DEV, dstinfo->pool);
if ((rv == APR_SUCCESS || rv == APR_INCOMPLETE)
@@ -1456,7 +1456,7 @@ static dav_error * dav_fs_walker(dav_fs_walker_context *fsctx, int depth)
len = strlen(dirent.name);
/* avoid recursing into our current, parent, or state directories */
- if (dirent.name[0] == '.'
+ if (dirent.name[0] == '.'
&& (len == 1 || (dirent.name[1] == '.' && len == 2))) {
continue;
}
@@ -1481,7 +1481,7 @@ static dav_error * dav_fs_walker(dav_fs_walker_context *fsctx, int depth)
/* ### Optimize me, dirent can give us what we need! */
- status = apr_stat(&fsctx->info1.finfo, fsctx->path1.buf,
+ status = apr_stat(&fsctx->info1.finfo, fsctx->path1.buf,
APR_FINFO_NORM | APR_FINFO_LINK, pool);
if (status != APR_SUCCESS && status != APR_INCOMPLETE) {
/* woah! where'd it go? */
@@ -1611,7 +1611,7 @@ static dav_error * dav_fs_walker(dav_fs_walker_context *fsctx, int depth)
** resource, query the lock database to force removal
** of both the lock entry and .locknull, if necessary..
** Sure, the query in PROPFIND would do this.. after
- ** the locknull resource was already included in the
+ ** the locknull resource was already included in the
** return.
**
** NOTE: we assume the caller has opened the lock database
@@ -1773,7 +1773,7 @@ static const char *dav_fs_getetag(const dav_resource *resource)
{
dav_resource_private *ctx = resource->info;
- if (!resource->exists)
+ if (!resource->exists)
return apr_pstrdup(ctx->pool, "");
if (ctx->finfo.filetype != 0) {
diff --git a/modules/dav/lock/locks.c b/modules/dav/lock/locks.c
index a9eefeef66..4abd4ad92b 100644
--- a/modules/dav/lock/locks.c
+++ b/modules/dav/lock/locks.c
@@ -418,7 +418,7 @@ static apr_datum_t dav_generic_build_key(apr_pool_t *p,
}
/*
- * dav_generic_lock_expired: return 1 (true) if the given timeout is in the
+ * dav_generic_lock_expired: return 1 (true) if the given timeout is in the
* past or present (the lock has expired), or 0 (false) if in the future
* (the lock has not yet expired).
*/
@@ -647,7 +647,7 @@ static dav_error * dav_generic_load_lock_record(dav_lockdb *lockdb,
/* length of datum */
ip->key.dsize = *((int *) (val.dptr + offset));
offset += sizeof(ip->key.dsize);
- ip->key.dptr = apr_palloc(p, ip->key.dsize);
+ ip->key.dptr = apr_palloc(p, ip->key.dsize);
memcpy(ip->key.dptr, val.dptr + offset, ip->key.dsize);
offset += ip->key.dsize;
diff --git a/modules/dav/main/liveprop.c b/modules/dav/main/liveprop.c
index 15c72cb1c6..cedae06354 100644
--- a/modules/dav/main/liveprop.c
+++ b/modules/dav/main/liveprop.c
@@ -128,7 +128,7 @@ DAV_DECLARE(long) dav_get_liveprop_info(int propid,
return 0;
}
-DAV_DECLARE(void) dav_register_liveprop_group(apr_pool_t *p,
+DAV_DECLARE(void) dav_register_liveprop_group(apr_pool_t *p,
const dav_liveprop_group *group)
{
/* register the namespace URIs */
diff --git a/modules/dav/main/mod_dav.c b/modules/dav/main/mod_dav.c
index 937aeadc2f..d1ca371393 100644
--- a/modules/dav/main/mod_dav.c
+++ b/modules/dav/main/mod_dav.c
@@ -440,13 +440,13 @@ static void dav_send_one_response(dav_response *response,
}
ap_fputc(output, bb, '>');
}
-
+
ap_fputstrs(output, bb,
DEBUG_CR "<D:href>",
dav_xml_escape_uri(pool, response->href),
"</D:href>" DEBUG_CR,
NULL);
-
+
if (response->propresult.propstats == NULL) {
/* use the Status-Line text from Apache. Note, this will
* default to 500 Internal Server Error if first->status
@@ -464,7 +464,7 @@ static void dav_send_one_response(dav_response *response,
ap_fputs(output, bb, t->text);
}
}
-
+
if (response->desc != NULL) {
/*
* We supply the description, so we know it doesn't have to
@@ -476,7 +476,7 @@ static void dav_send_one_response(dav_response *response,
"</D:responsedescription>" DEBUG_CR,
NULL);
}
-
+
ap_fputs(output, bb, "</D:response>" DEBUG_CR);
}
@@ -514,9 +514,9 @@ static apr_status_t dav_finish_multistatus(request_rec *r,
apr_bucket_brigade *bb)
{
apr_bucket *b;
-
+
ap_fputs(r->output_filters, bb, "</D:multistatus>" DEBUG_CR);
-
+
/* indicate the end of the response body */
b = apr_bucket_eos_create(r->connection->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, b);
@@ -1437,7 +1437,7 @@ static dav_error *dav_gen_supported_reports(request_rec *r,
if (elem->first_child == NULL) {
/* show all supported reports */
for (rp = reports; rp->nmspace != NULL; ++rp) {
- /* Note: we presume reports->namespace is
+ /* Note: we presume reports->namespace is
* properly XML/URL quoted */
s = apr_psprintf(r->pool,
"<D:supported-report D:name=\"%s\" "
@@ -1478,7 +1478,7 @@ static dav_error *dav_gen_supported_reports(request_rec *r,
if (strcmp(name, rp->name) == 0
&& strcmp(nmspace, rp->nmspace) == 0) {
/* Note: we presume reports->nmspace is
- * properly XML/URL quoted
+ * properly XML/URL quoted
*/
s = apr_psprintf(r->pool,
"<D:supported-report "
@@ -4557,7 +4557,7 @@ static int dav_handler(request_rec *r)
if (r->parsed_uri.fragment != NULL) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"buggy client used un-escaped hash in Request-URI");
- return dav_error_response(r, HTTP_BAD_REQUEST,
+ return dav_error_response(r, HTTP_BAD_REQUEST,
"The request was invalid: the URI included "
"an un-escaped hash character");
}
@@ -4769,7 +4769,7 @@ static int dav_fixups(request_rec *r)
/* ### this is wrong. We should only be setting the r->handler for the
* requests that mod_dav knows about. If we set the handler for M_POST
* requests, then CGI scripts that use POST will return the source for the
- * script. However, mod_dav DOES handle POST, so something else needs
+ * script. However, mod_dav DOES handle POST, so something else needs
* to be fixed.
*/
if (r->method_number != M_POST) {
diff --git a/modules/dav/main/util.c b/modules/dav/main/util.c
index c60fc266af..ce77f2a180 100644
--- a/modules/dav/main/util.c
+++ b/modules/dav/main/util.c
@@ -33,7 +33,7 @@
#include "http_log.h"
#include "http_protocol.h"
-DAV_DECLARE(dav_error*) dav_new_error(apr_pool_t *p, int status,
+DAV_DECLARE(dav_error*) dav_new_error(apr_pool_t *p, int status,
int error_id, const char *desc)
{
int save_errno = errno;
@@ -49,7 +49,7 @@ DAV_DECLARE(dav_error*) dav_new_error(apr_pool_t *p, int status,
return err;
}
-DAV_DECLARE(dav_error*) dav_new_error_tag(apr_pool_t *p, int status,
+DAV_DECLARE(dav_error*) dav_new_error_tag(apr_pool_t *p, int status,
int error_id, const char *desc,
const char *namespace,
const char *tagname)
@@ -63,8 +63,8 @@ DAV_DECLARE(dav_error*) dav_new_error_tag(apr_pool_t *p, int status,
}
-DAV_DECLARE(dav_error*) dav_push_error(apr_pool_t *p, int status,
- int error_id, const char *desc,
+DAV_DECLARE(dav_error*) dav_push_error(apr_pool_t *p, int status,
+ int error_id, const char *desc,
dav_error *prev)
{
dav_error *err = apr_pcalloc(p, sizeof(*err));
@@ -77,7 +77,7 @@ DAV_DECLARE(dav_error*) dav_push_error(apr_pool_t *p, int status,
return err;
}
-DAV_DECLARE(void) dav_check_bufsize(apr_pool_t * p, dav_buffer *pbuf,
+DAV_DECLARE(void) dav_check_bufsize(apr_pool_t * p, dav_buffer *pbuf,
apr_size_t extra_needed)
{
/* grow the buffer if necessary */
@@ -91,7 +91,7 @@ DAV_DECLARE(void) dav_check_bufsize(apr_pool_t * p, dav_buffer *pbuf,
}
}
-DAV_DECLARE(void) dav_set_bufsize(apr_pool_t * p, dav_buffer *pbuf,
+DAV_DECLARE(void) dav_set_bufsize(apr_pool_t * p, dav_buffer *pbuf,
apr_size_t size)
{
/* NOTE: this does not retain prior contents */
@@ -113,7 +113,7 @@ DAV_DECLARE(void) dav_set_bufsize(apr_pool_t * p, dav_buffer *pbuf,
/* initialize a buffer and copy the specified (null-term'd) string into it */
-DAV_DECLARE(void) dav_buffer_init(apr_pool_t *p, dav_buffer *pbuf,
+DAV_DECLARE(void) dav_buffer_init(apr_pool_t *p, dav_buffer *pbuf,
const char *str)
{
dav_set_bufsize(p, pbuf, strlen(str));
@@ -121,7 +121,7 @@ DAV_DECLARE(void) dav_buffer_init(apr_pool_t *p, dav_buffer *pbuf,
}
/* append a string to the end of the buffer, adjust length */
-DAV_DECLARE(void) dav_buffer_append(apr_pool_t *p, dav_buffer *pbuf,
+DAV_DECLARE(void) dav_buffer_append(apr_pool_t *p, dav_buffer *pbuf,
const char *str)
{
apr_size_t len = strlen(str);
@@ -132,7 +132,7 @@ DAV_DECLARE(void) dav_buffer_append(apr_pool_t *p, dav_buffer *pbuf,
}
/* place a string on the end of the buffer, do NOT adjust length */
-DAV_DECLARE(void) dav_buffer_place(apr_pool_t *p, dav_buffer *pbuf,
+DAV_DECLARE(void) dav_buffer_place(apr_pool_t *p, dav_buffer *pbuf,
const char *str)
{
apr_size_t len = strlen(str);
@@ -142,8 +142,8 @@ DAV_DECLARE(void) dav_buffer_place(apr_pool_t *p, dav_buffer *pbuf,
}
/* place some memory on the end of a buffer; do NOT adjust length */
-DAV_DECLARE(void) dav_buffer_place_mem(apr_pool_t *p, dav_buffer *pbuf,
- const void *mem, apr_size_t amt,
+DAV_DECLARE(void) dav_buffer_place_mem(apr_pool_t *p, dav_buffer *pbuf,
+ const void *mem, apr_size_t amt,
apr_size_t pad)
{
dav_check_bufsize(p, pbuf, amt + pad);
@@ -237,7 +237,7 @@ DAV_DECLARE(dav_lookup_result) dav_lookup_uri(const char *uri,
/* we have verified the scheme, port, and general structure */
/*
- ** Hrm. IE5 will pass unqualified hostnames for both the
+ ** Hrm. IE5 will pass unqualified hostnames for both the
** Host: and Destination: headers. This breaks the
** http_vhost.c::matches_aliases function.
**
@@ -297,7 +297,7 @@ DAV_DECLARE(int) dav_validate_root(const apr_xml_doc *doc,
}
/* find and return the (unique) child with a given DAV: tagname */
-DAV_DECLARE(apr_xml_elem *) dav_find_child(const apr_xml_elem *elem,
+DAV_DECLARE(apr_xml_elem *) dav_find_child(const apr_xml_elem *elem,
const char *tagname)
{
apr_xml_elem *child = elem->first_child;
@@ -533,7 +533,7 @@ static dav_error * dav_add_if_state(apr_pool_t *p, dav_if_header *ih,
new_sl->condition = condition;
new_sl->type = t;
-
+
if (t == dav_if_opaquelock) {
dav_error *err;
@@ -568,7 +568,7 @@ static char *dav_fetch_next_token(char **str, char term)
{
char *sp;
char *token;
-
+
token = *str + 1;
while (*token && (*token == ' ' || *token == '\t'))
@@ -604,7 +604,7 @@ static dav_error * dav_process_if_header(request_rec *r, dav_if_header **p_ih)
const dav_hooks_locks *locks_hooks = DAV_GET_HOOKS_LOCKS(r);
enum {no_tagged, tagged, unknown} list_type = unknown;
int condition;
-
+
*p_ih = NULL;
if ((str = apr_pstrdup(r->pool, apr_table_get(r->headers_in, "If"))) == NULL)
@@ -621,7 +621,7 @@ static dav_error * dav_process_if_header(request_rec *r, dav_if_header **p_ih)
"Invalid If-header: unclosed \"<\" or "
"unexpected tagged-list production.");
}
-
+
/* 2518 specifies this must be an absolute URI; just take the
* relative part for later comparison against r->uri */
if (apr_uri_parse(r->pool, uri, &parsed_uri) != APR_SUCCESS) {
@@ -876,14 +876,14 @@ static dav_error * dav_validate_resource_state(apr_pool_t *p,
/* lock_list now determines whether we're in State 1, 2, or 3. */
}
- /*
+ /*
** For a new, exclusive lock: if any locks exist, fail.
** For a new, shared lock: if an exclusive lock exists, fail.
** else, do not require a token to be seen.
*/
if (flags & DAV_LOCKSCOPE_EXCLUSIVE) {
if (lock_list != NULL) {
- return dav_new_error(p, HTTP_LOCKED, 0,
+ return dav_new_error(p, HTTP_LOCKED, 0,
"Existing lock(s) on the requested resource "
"prevent an exclusive lock.");
}
@@ -1160,13 +1160,13 @@ static dav_error * dav_validate_resource_state(apr_pool_t *p,
** the lock, only the same user may submit that locktoken
** to manipulate a resource.
*/
- if (lock->auth_user &&
+ if (lock->auth_user &&
(!r->user ||
strcmp(lock->auth_user, r->user))) {
const char *errmsg;
errmsg = apr_pstrcat(p, "User \"",
- r->user,
+ r->user,
"\" submitted a locktoken created "
"by user \"",
lock->auth_user, "\".", NULL);
@@ -1204,9 +1204,9 @@ static dav_error * dav_validate_resource_state(apr_pool_t *p,
/* Request is predicated on some unknown state token,
* which must be presumed to *not* match, so fail
* unless this is a Not condition. */
-
+
if (state_list->condition == DAV_IF_COND_NORMAL) {
- reason =
+ reason =
"an unknown state token was supplied";
goto state_list_failed;
}
@@ -1417,7 +1417,7 @@ static dav_error * dav_validate_walker(dav_walk_resource *wres, int calltype)
** On error, return appropriate HTTP_* code, and log error. If a multi-stat
** error is necessary, response will point to it, else NULL.
*/
-DAV_DECLARE(dav_error *) dav_validate_request(request_rec *r,
+DAV_DECLARE(dav_error *) dav_validate_request(request_rec *r,
dav_resource *resource,
int depth,
dav_locktoken *locktoken,
@@ -1449,7 +1449,7 @@ DAV_DECLARE(dav_error *) dav_validate_request(request_rec *r,
if (response != NULL)
*response = NULL;
- /* Do the standard checks for conditional requests using
+ /* Do the standard checks for conditional requests using
* If-..-Since, If-Match etc */
if ((result = ap_meets_conditions(r)) != OK) {
/* ### fix this up... how? */
@@ -1545,7 +1545,7 @@ DAV_DECLARE(dav_error *) dav_validate_request(request_rec *r,
if_header,
flags | DAV_VALIDATE_IS_PARENT,
&work_buf, r);
-
+
/*
** This error occurred on the parent resource. This implies that
** we have to create a multistatus response (to report the error
@@ -1554,7 +1554,7 @@ DAV_DECLARE(dav_error *) dav_validate_request(request_rec *r,
*/
if (err != NULL) {
new_response = apr_pcalloc(r->pool, sizeof(*new_response));
-
+
new_response->href = parent_resource->uri;
new_response->status = err->status;
new_response->desc =
@@ -1567,11 +1567,11 @@ DAV_DECLARE(dav_error *) dav_validate_request(request_rec *r,
" The error was: ",
err->desc, NULL);
}
-
+
/* assert: DAV_VALIDATE_PARENT implies response != NULL */
new_response->next = *response;
*response = new_response;
-
+
err = NULL;
}
}
@@ -1642,20 +1642,20 @@ DAV_DECLARE(dav_error *) dav_validate_request(request_rec *r,
* else NULL if no If-header, or no positive locktokens.
*/
DAV_DECLARE(dav_error *) dav_get_locktoken_list(request_rec *r,
- dav_locktoken_list **ltl)
+ dav_locktoken_list **ltl)
{
dav_error *err;
dav_if_header *if_header;
dav_if_state_list *if_state;
- dav_locktoken_list *lock_token = NULL;
-
+ dav_locktoken_list *lock_token = NULL;
+
*ltl = NULL;
if ((err = dav_process_if_header(r, &if_header)) != NULL) {
/* ### add a higher-level description? */
return err;
}
-
+
while (if_header != NULL) {
if_state = if_header->state; /* Begining of the if_state linked list */
while (if_state != NULL) {
@@ -1666,7 +1666,7 @@ DAV_DECLARE(dav_error *) dav_get_locktoken_list(request_rec *r,
lock_token->next = *ltl;
*ltl = lock_token;
}
- if_state = if_state->next;
+ if_state = if_state->next;
}
if_header = if_header->next;
}
@@ -1750,7 +1750,7 @@ DAV_DECLARE(void) dav_add_vary_header(request_rec *in_req,
* auto_checkout - set to 1 if auto-checkout enabled
*/
static dav_error * dav_can_auto_checkout(
- request_rec *r,
+ request_rec *r,
dav_resource *resource,
dav_auto_version auto_version,
dav_lockdb **lockdb,
diff --git a/modules/dav/main/util_lock.c b/modules/dav/main/util_lock.c
index cf960efbe3..6d50e1c2a7 100644
--- a/modules/dav/main/util_lock.c
+++ b/modules/dav/main/util_lock.c
@@ -55,7 +55,7 @@ DAV_DECLARE(const char *) dav_lock_get_activelock(request_rec *r,
/* If no locks or no lock provider, there are no locks */
if (lock == NULL || hooks == NULL) {
/*
- ** Since resourcediscovery is defined with (activelock)*,
+ ** Since resourcediscovery is defined with (activelock)*,
** <D:activelock/> shouldn't be necessary for an empty lock.
*/
return "";
@@ -129,7 +129,7 @@ DAV_DECLARE(const char *) dav_lock_get_activelock(request_rec *r,
*/
dav_buffer_append(p, pbuf, lock->owner);
}
-
+
dav_buffer_append(p, pbuf, "<D:timeout>");
if (lock->timeout == DAV_TIMEOUT_INFINITE) {
dav_buffer_append(p, pbuf, "Infinite");
@@ -223,7 +223,7 @@ DAV_DECLARE(dav_error *) dav_lock_parse_lockinfo(request_rec *r,
** Store a full <DAV:owner> element with namespace definitions
** and an xml:lang definition, if applicable.
*/
- apr_xml_to_text(p, child, APR_XML_X2T_FULL_NS_LANG, doc->namespaces,
+ apr_xml_to_text(p, child, APR_XML_X2T_FULL_NS_LANG, doc->namespaces,
NULL, &text, NULL);
lock->owner = text;
@@ -359,7 +359,7 @@ DAV_DECLARE(dav_error *) dav_add_lock(request_rec *r,
** dav_lock_query: Opens the lock database. Returns a linked list of
** dav_lock structures for all direct locks on path.
*/
-DAV_DECLARE(dav_error*) dav_lock_query(dav_lockdb *lockdb,
+DAV_DECLARE(dav_error*) dav_lock_query(dav_lockdb *lockdb,
const dav_resource *resource,
dav_lock **locks)
{
@@ -507,7 +507,7 @@ DAV_DECLARE(int) dav_unlock(request_rec *r, const dav_resource *resource,
/* 2518 requires the entire lock to be removed if resource/locktoken
* point to an indirect lock. We need resource of the _direct_
* lock in order to walk down the tree and remove the locks. So,
- * If locktoken != null_locktoken,
+ * If locktoken != null_locktoken,
* Walk up the resource hierarchy until we see a direct lock.
* Or, we could get the direct lock's db/key, pick out the URL
* and do a subrequest. I think walking up is faster and will work
@@ -711,7 +711,7 @@ DAV_DECLARE(int) dav_get_resource_state(request_rec *r,
if (r->path_info != NULL && *r->path_info != '\0') {
return DAV_RESOURCE_NULL;
}
-
+
if ((err = (*hooks->open_lockdb)(r, 1, 1, &lockdb)) == NULL) {
/* note that we might see some expired locks... *shrug* */
err = (*hooks->has_locks)(lockdb, resource, &locks_present);
diff --git a/modules/debug/mod_bucketeer.c b/modules/debug/mod_bucketeer.c
index 215617e6bf..93b2e29b54 100644
--- a/modules/debug/mod_bucketeer.c
+++ b/modules/debug/mod_bucketeer.c
@@ -69,7 +69,7 @@ static apr_status_t bucketeer_out_filter(ap_filter_t *f,
c = ap_get_module_config(r->server->module_config, &bucketeer_module);
/* If have a context, it means we've done this before successfully. */
- if (!ctx) {
+ if (!ctx) {
if (!r->content_type || strncmp(r->content_type, "text/", 5)) {
ap_remove_output_filter(f);
return ap_pass_brigade(f->next, bb);
@@ -77,7 +77,7 @@ static apr_status_t bucketeer_out_filter(ap_filter_t *f,
/* We're cool with filtering this. */
ctx = f->ctx = apr_pcalloc(f->r->pool, sizeof(*ctx));
- ctx->bb = apr_brigade_create(f->r->pool, f->c->bucket_alloc);
+ ctx->bb = apr_brigade_create(f->r->pool, f->c->bucket_alloc);
apr_table_unset(f->r->headers_out, "Content-Length");
}
@@ -98,9 +98,9 @@ static apr_status_t bucketeer_out_filter(ap_filter_t *f,
return ap_pass_brigade(f->next, ctx->bb);
}
- if (APR_BUCKET_IS_FLUSH(e)) {
+ if (APR_BUCKET_IS_FLUSH(e)) {
/*
- * Ignore flush buckets for the moment..
+ * Ignore flush buckets for the moment..
* we decide what to stream
*/
continue;
@@ -143,7 +143,7 @@ static apr_status_t bucketeer_out_filter(ap_filter_t *f,
ap_pass_brigade(f->next, ctx->bb);
/* apr_brigade_cleanup(ctx->bb);*/
}
- }
+ }
}
/* XXX: really should append this to the next 'real' bucket */
if (lastpos < i) {
@@ -157,7 +157,7 @@ static apr_status_t bucketeer_out_filter(ap_filter_t *f,
lastpos = i;
APR_BRIGADE_INSERT_TAIL(ctx->bb, p);
}
- }
+ }
}
return APR_SUCCESS;
diff --git a/modules/debug/mod_dumpio.c b/modules/debug/mod_dumpio.c
index 997b7019ad..2a27e981db 100644
--- a/modules/debug/mod_dumpio.c
+++ b/modules/debug/mod_dumpio.c
@@ -47,7 +47,7 @@ typedef struct dumpio_conf_t {
static void dumpit(ap_filter_t *f, apr_bucket *b)
{
conn_rec *c = f->c;
-
+
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, c->base_server,
"mod_dumpio: %s (%s-%s): %" APR_SIZE_T_FMT " bytes",
f->frec->name,
@@ -91,7 +91,7 @@ static void dumpit(ap_filter_t *f, apr_bucket *b)
(( mode ) == AP_MODE_EXHAUSTIVE) ? "exhaustive" : \
(( mode ) == AP_MODE_INIT) ? "init" : "unknown" \
)
-
+
static int dumpio_input_filter (ap_filter_t *f, apr_bucket_brigade *bb,
ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes)
{
@@ -125,9 +125,9 @@ static int dumpio_output_filter (ap_filter_t *f, apr_bucket_brigade *bb)
{
apr_bucket *b;
conn_rec *c = f->c;
-
+
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, c->base_server, "mod_dumpio: %s", f->frec->name) ;
-
+
for (b = APR_BRIGADE_FIRST(bb); b != APR_BRIGADE_SENTINEL(bb); b = APR_BUCKET_NEXT(b)) {
/*
* If we ever see an EOS, make sure to FLUSH.
@@ -138,7 +138,7 @@ static int dumpio_output_filter (ap_filter_t *f, apr_bucket_brigade *bb)
}
dumpit(f, b);
}
-
+
return ap_pass_brigade(f->next, bb) ;
}
@@ -147,7 +147,7 @@ static int dumpio_pre_conn(conn_rec *c, void *csd)
dumpio_conf_t *ptr =
(dumpio_conf_t *) ap_get_module_config(c->base_server->module_config,
&dumpio_module);
-
+
if (ptr->enable_input)
ap_add_input_filter("DUMPIO_IN", NULL, NULL, c);
if (ptr->enable_output)
@@ -181,7 +181,7 @@ static const char *dumpio_enable_input(cmd_parms *cmd, void *dummy, int arg)
dumpio_conf_t *ptr =
(dumpio_conf_t *) ap_get_module_config(cmd->server->module_config,
&dumpio_module);
-
+
ptr->enable_input = arg;
return NULL;
}
@@ -191,7 +191,7 @@ static const char *dumpio_enable_output(cmd_parms *cmd, void *dummy, int arg)
dumpio_conf_t *ptr =
(dumpio_conf_t *) ap_get_module_config(cmd->server->module_config,
&dumpio_module);
-
+
ptr->enable_output = arg;
return NULL;
}
diff --git a/modules/echo/mod_echo.c b/modules/echo/mod_echo.c
index 9d223f8b85..65b69a9b44 100644
--- a/modules/echo/mod_echo.c
+++ b/modules/echo/mod_echo.c
@@ -64,7 +64,7 @@ static int process_echo_connection(conn_rec *c)
/* Get a single line of input from the client */
if ((rv = ap_get_brigade(c->input_filters, bb, AP_MODE_GETLINE,
- APR_BLOCK_READ, 0) != APR_SUCCESS ||
+ APR_BLOCK_READ, 0) != APR_SUCCESS ||
APR_BRIGADE_EMPTY(bb))) {
apr_brigade_destroy(bb);
break;
@@ -81,7 +81,7 @@ static int process_echo_connection(conn_rec *c)
return OK;
}
-static const command_rec echo_cmds[] =
+static const command_rec echo_cmds[] =
{
AP_INIT_FLAG("ProtocolEcho", echo_on, NULL, RSRC_CONF,
"Run an echo server on this host"),
diff --git a/modules/experimental/mod_case_filter.c b/modules/experimental/mod_case_filter.c
index 0c3938b009..9eef27b0ad 100644
--- a/modules/experimental/mod_case_filter.c
+++ b/modules/experimental/mod_case_filter.c
@@ -104,7 +104,7 @@ static const char *CaseFilterEnable(cmd_parms *cmd, void *dummy, int arg)
return NULL;
}
-static const command_rec CaseFilterCmds[] =
+static const command_rec CaseFilterCmds[] =
{
AP_INIT_FLAG("CaseFilter", CaseFilterEnable, NULL, RSRC_CONF,
"Run a case filter on this host"),
diff --git a/modules/experimental/mod_case_filter_in.c b/modules/experimental/mod_case_filter_in.c
index 2b1d42075e..924feb43d4 100644
--- a/modules/experimental/mod_case_filter_in.c
+++ b/modules/experimental/mod_case_filter_in.c
@@ -120,8 +120,8 @@ static apr_status_t CaseFilterInFilter(ap_filter_t *f,
return APR_SUCCESS;
}
-
-
+
+
static const char *CaseFilterInEnable(cmd_parms *cmd, void *dummy, int arg)
{
CaseFilterInConfig *pConfig
@@ -132,7 +132,7 @@ static const char *CaseFilterInEnable(cmd_parms *cmd, void *dummy, int arg)
return NULL;
}
-static const command_rec CaseFilterInCmds[] =
+static const command_rec CaseFilterInCmds[] =
{
AP_INIT_FLAG("CaseFilterIn", CaseFilterInEnable, NULL, RSRC_CONF,
"Run an input case filter on this host"),
@@ -142,7 +142,7 @@ static const command_rec CaseFilterInCmds[] =
static void CaseFilterInRegisterHooks(apr_pool_t *p)
{
- ap_hook_insert_filter(CaseFilterInInsertFilter, NULL, NULL,
+ ap_hook_insert_filter(CaseFilterInInsertFilter, NULL, NULL,
APR_HOOK_MIDDLE);
ap_register_input_filter(s_szCaseFilterName, CaseFilterInFilter, NULL,
AP_FTYPE_RESOURCE);
diff --git a/modules/experimental/mod_example.c b/modules/experimental/mod_example.c
index eab1ebd5dd..dd7fd5bf31 100644
--- a/modules/experimental/mod_example.c
+++ b/modules/experimental/mod_example.c
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-/*
+/*
* Apache example module. Provide demonstrations of how modules do things.
* It is not meant to be used in a production server. Since it participates
* in all of the processing phases, it could conceivable interfere with
@@ -458,7 +458,7 @@ static void trace_add(server_rec *s, request_rec *r, x_cfg *mconfig,
/* at it. If it returns any other value, it's treated as the text of an */
/* error message. */
/*--------------------------------------------------------------------------*/
-/*
+/*
* Command handler for the NO_ARGS "Example" directive. All we do is mark the
* call in the trace log, and flag the applicability of the directive to the
* current location in that location's configuration record.
@@ -489,7 +489,7 @@ static const char *cmd_example(cmd_parms *cmd, void *mconfig)
/* calling send_http_header(). Otherwise, no header will be sent at all, */
/* and the output sent to the client will actually be HTTP-uncompliant. */
/*--------------------------------------------------------------------------*/
-/*
+/*
* Sample content handler. All this does is display the call list that has
* been built up so far.
*
@@ -627,7 +627,7 @@ static int x_handler(request_rec *r)
/* see the individual handler comments below for details. */
/* */
/*--------------------------------------------------------------------------*/
-/*
+/*
* This function is called during server initialisation. Any information
* that needs to be recorded must be in static cells, since there's no
* configuration record.
@@ -635,7 +635,7 @@ static int x_handler(request_rec *r)
* There is no return value.
*/
-/*
+/*
* This function is called when an heavy-weight process (such as a child) is
* being run down or destroyed. As with the child initialisation function,
* any information that needs to be recorded must be in static cells, since
@@ -644,7 +644,7 @@ static int x_handler(request_rec *r)
* There is no return value.
*/
-/*
+/*
* This function is called during server initialisation when an heavy-weight
* process (such as a child) is being initialised. As with the
* module initialisation function, any information that needs to be recorded
@@ -1014,7 +1014,7 @@ static int x_pre_connection(conn_rec *c, void *csd)
* some other protocol. Both echo and POP3 modules are available as
* examples.
*
- * The return VALUE is OK, DECLINED, or HTTP_mumble. If we return OK, no
+ * The return VALUE is OK, DECLINED, or HTTP_mumble. If we return OK, no
* further modules are called for this phase.
*/
static int x_process_connection(conn_rec *c)
@@ -1244,9 +1244,9 @@ static int x_logger(request_rec *r)
/* Which functions are responsible for which hooks in the server. */
/* */
/*--------------------------------------------------------------------------*/
-/*
+/*
* Each function our module provides to handle a particular hook is
- * specified here. The functions are registered using
+ * specified here. The functions are registered using
* ap_hook_foo(name, predecessors, successors, position)
* where foo is the name of the hook.
*
@@ -1262,7 +1262,7 @@ static int x_logger(request_rec *r)
* modules use the same relative position, Apache will
* determine which to call first.
* If your module relies on another module to run first,
- * or another module running after yours, use the
+ * or another module running after yours, use the
* predecessors and/or successors.
*
* The number in brackets indicates the order in which the routine is called
@@ -1309,7 +1309,7 @@ static void x_register_hooks(apr_pool_t *p)
/* collisions of directive names between modules. */
/* */
/*--------------------------------------------------------------------------*/
-/*
+/*
* List of directives specific to our module.
*/
static const command_rec x_cmds[] =
@@ -1329,7 +1329,7 @@ static const command_rec x_cmds[] =
/* the static hooks into our module from the other parts of the server. */
/* */
/*--------------------------------------------------------------------------*/
-/*
+/*
* Module definition for configuration. If a particular callback is not
* needed, replace its routine name below with the word NULL.
*/
diff --git a/modules/filters/mod_charset_lite.c b/modules/filters/mod_charset_lite.c
index e2a2560df2..61a27ed67f 100644
--- a/modules/filters/mod_charset_lite.c
+++ b/modules/filters/mod_charset_lite.c
@@ -45,10 +45,10 @@
#define INPUT_XLATE_BUF_SIZE (8*1024) /* size of translation buffer used on input */
#define XLATE_MIN_BUFF_LEFT 128 /* flush once there is no more than this much
- * space left in the translation buffer
+ * space left in the translation buffer
*/
-#define FATTEST_CHAR 8 /* we don't handle chars wider than this that straddle
+#define FATTEST_CHAR 8 /* we don't handle chars wider than this that straddle
* two buckets
*/
@@ -67,15 +67,15 @@ typedef enum {
/* registered name of the output translation filter */
#define XLATEOUT_FILTER_NAME "XLATEOUT"
/* registered name of input translation filter */
-#define XLATEIN_FILTER_NAME "XLATEIN"
+#define XLATEIN_FILTER_NAME "XLATEIN"
typedef struct charset_dir_t {
/** debug level; -1 means uninitialized, 0 means no debug */
int debug;
const char *charset_source; /* source encoding */
const char *charset_default; /* how to ship on wire */
- /** module does ap_add_*_filter()? */
- enum {IA_INIT, IA_IMPADD, IA_NOIMPADD} implicit_add;
+ /** module does ap_add_*_filter()? */
+ enum {IA_INIT, IA_IMPADD, IA_NOIMPADD} implicit_add;
} charset_dir_t;
/* charset_filter_ctx_t is created for each filter instance; because the same
@@ -126,14 +126,14 @@ static void *merge_charset_dir_conf(apr_pool_t *p, void *basev, void *overridesv
*over = (charset_dir_t *)overridesv;
/* If it is defined in the current container, use it. Otherwise, use the one
- * from the enclosing container.
+ * from the enclosing container.
*/
- a->debug =
+ a->debug =
over->debug != -1 ? over->debug : base->debug;
- a->charset_default =
+ a->charset_default =
over->charset_default ? over->charset_default : base->charset_default;
- a->charset_source =
+ a->charset_source =
over->charset_source ? over->charset_source : base->charset_source;
a->implicit_add =
over->implicit_add != IA_INIT ? over->implicit_add : base->implicit_add;
@@ -153,7 +153,7 @@ static const char *add_charset_source(cmd_parms *cmd, void *in_dc,
/* CharsetDefault charset
*/
-static const char *add_charset_default(cmd_parms *cmd, void *in_dc,
+static const char *add_charset_default(cmd_parms *cmd, void *in_dc,
const char *name)
{
charset_dir_t *dc = in_dc;
@@ -164,7 +164,7 @@ static const char *add_charset_default(cmd_parms *cmd, void *in_dc,
/* CharsetOptions optionflag...
*/
-static const char *add_charset_options(cmd_parms *cmd, void *in_dc,
+static const char *add_charset_options(cmd_parms *cmd, void *in_dc,
const char *flag)
{
charset_dir_t *dc = in_dc;
@@ -179,7 +179,7 @@ static const char *add_charset_options(cmd_parms *cmd, void *in_dc,
dc->debug = atoi(flag + 11);
}
else {
- return apr_pstrcat(cmd->temp_pool,
+ return apr_pstrcat(cmd->temp_pool,
"Invalid CharsetOptions option: ",
flag,
NULL);
@@ -194,7 +194,7 @@ static const char *add_charset_options(cmd_parms *cmd, void *in_dc,
*/
static int find_code_page(request_rec *r)
{
- charset_dir_t *dc = ap_get_module_config(r->per_dir_config,
+ charset_dir_t *dc = ap_get_module_config(r->per_dir_config,
&charset_lite_module);
charset_req_t *reqinfo;
charset_filter_ctx_t *input_ctx, *output_ctx;
@@ -228,21 +228,21 @@ static int find_code_page(request_rec *r)
/* catch proxy requests */
if (r->proxyreq) return DECLINED;
/* mod_rewrite indicators */
- if (!strncmp(r->filename, "redirect:", 9)) return DECLINED;
- if (!strncmp(r->filename, "gone:", 5)) return DECLINED;
- if (!strncmp(r->filename, "passthrough:", 12)) return DECLINED;
- if (!strncmp(r->filename, "forbidden:", 10)) return DECLINED;
-
+ if (!strncmp(r->filename, "redirect:", 9)) return DECLINED;
+ if (!strncmp(r->filename, "gone:", 5)) return DECLINED;
+ if (!strncmp(r->filename, "passthrough:", 12)) return DECLINED;
+ if (!strncmp(r->filename, "forbidden:", 10)) return DECLINED;
+
mime_type = r->content_type ? r->content_type : ap_default_type(r);
/* If mime type isn't text or message, bail out.
*/
/* XXX When we handle translation of the request body, watch out here as
- * 1.3 allowed additional mime types: multipart and
+ * 1.3 allowed additional mime types: multipart and
* application/x-www-form-urlencoded
*/
-
+
if (strncasecmp(mime_type, "text/", 5) &&
#if APR_CHARSET_EBCDIC || AP_WANT_DIR_TRANSLATION
/* On an EBCDIC machine, be willing to translate mod_autoindex-
@@ -283,8 +283,8 @@ static int find_code_page(request_rec *r)
/* Get storage for the request data and the output filter context.
* We rarely need the input filter context, so allocate that separately.
*/
- reqinfo = (charset_req_t *)apr_pcalloc(r->pool,
- sizeof(charset_req_t) +
+ reqinfo = (charset_req_t *)apr_pcalloc(r->pool,
+ sizeof(charset_req_t) +
sizeof(charset_filter_ctx_t));
output_ctx = (charset_filter_ctx_t *)(reqinfo + 1);
@@ -305,8 +305,8 @@ static int find_code_page(request_rec *r)
switch (r->method_number) {
case M_PUT:
case M_POST:
- /* Set up input translation. Note: A request body can be included
- * with the OPTIONS method, but for now we don't set up translation
+ /* Set up input translation. Note: A request body can be included
+ * with the OPTIONS method, but for now we don't set up translation
* of it.
*/
input_ctx = apr_pcalloc(r->pool, sizeof(charset_filter_ctx_t));
@@ -315,7 +315,7 @@ static int find_code_page(request_rec *r)
input_ctx->tmp = apr_palloc(r->pool, INPUT_XLATE_BUF_SIZE);
input_ctx->dc = dc;
reqinfo->input_ctx = input_ctx;
- rv = apr_xlate_open(&input_ctx->xlate, dc->charset_source,
+ rv = apr_xlate_open(&input_ctx->xlate, dc->charset_source,
dc->charset_default, r->pool);
if (rv != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
@@ -358,20 +358,20 @@ static int configured_on_output(request_rec *r, const char *filter_name)
static void xlate_insert_filter(request_rec *r)
{
/* Hey... don't be so quick to use reqinfo->dc here; reqinfo may be NULL */
- charset_req_t *reqinfo = ap_get_module_config(r->request_config,
+ charset_req_t *reqinfo = ap_get_module_config(r->request_config,
&charset_lite_module);
- charset_dir_t *dc = ap_get_module_config(r->per_dir_config,
+ charset_dir_t *dc = ap_get_module_config(r->per_dir_config,
&charset_lite_module);
if (reqinfo) {
if (reqinfo->output_ctx && !configured_on_output(r, XLATEOUT_FILTER_NAME)) {
- ap_add_output_filter(XLATEOUT_FILTER_NAME, reqinfo->output_ctx, r,
+ ap_add_output_filter(XLATEOUT_FILTER_NAME, reqinfo->output_ctx, r,
r->connection);
}
else if (dc->debug >= DBGLVL_FLOW) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"xlate output filter not added implicitly because %s",
- !reqinfo->output_ctx ?
+ !reqinfo->output_ctx ?
"no output configuration available" :
"another module added the filter");
}
@@ -443,7 +443,7 @@ static apr_status_t send_eos(ap_filter_t *f)
return rv;
}
-static apr_status_t set_aside_partial_char(charset_filter_ctx_t *ctx,
+static apr_status_t set_aside_partial_char(charset_filter_ctx_t *ctx,
const char *partial,
apr_size_t partial_len)
{
@@ -456,8 +456,8 @@ static apr_status_t set_aside_partial_char(charset_filter_ctx_t *ctx,
}
else {
rv = APR_INCOMPLETE;
- ctx->ees = EES_LIMIT; /* we don't handle chars this wide which straddle
- * buckets
+ ctx->ees = EES_LIMIT; /* we don't handle chars this wide which straddle
+ * buckets
*/
}
return rv;
@@ -465,7 +465,7 @@ static apr_status_t set_aside_partial_char(charset_filter_ctx_t *ctx,
static apr_status_t finish_partial_char(charset_filter_ctx_t *ctx,
/* input buffer: */
- const char **cur_str,
+ const char **cur_str,
apr_size_t *cur_len,
/* output buffer: */
char **out_str,
@@ -530,7 +530,7 @@ static void log_xlate_error(ap_filter_t *f, apr_status_t rv)
strcpy(msgbuf, "xlate filter - incomplete char at end of input - ");
cur = 0;
while ((apr_size_t)cur < ctx->saved) {
- apr_snprintf(msgbuf + strlen(msgbuf), sizeof(msgbuf) - strlen(msgbuf),
+ apr_snprintf(msgbuf + strlen(msgbuf), sizeof(msgbuf) - strlen(msgbuf),
"%02X", (unsigned)ctx->buf[cur]);
++cur;
}
@@ -602,15 +602,15 @@ static void chk_filter_chain(ap_filter_t *f)
else {
if (strcmp(last_xlate_ctx->dc->charset_default,
curctx->dc->charset_source)) {
- /* incompatible translation
+ /* incompatible translation
* if our filter instance is incompatible with an instance
* already in place, noop our instance
- * Notes:
+ * Notes:
* . We are only willing to noop our own instance.
* . It is possible to noop another instance which has not
* yet run, but this is not currently implemented.
* Hopefully it will not be needed.
- * . It is not possible to noop an instance which has
+ * . It is not possible to noop an instance which has
* already run.
*/
if (last_xlate_ctx == f->ctx) {
@@ -680,7 +680,7 @@ static void chk_filter_chain(ap_filter_t *f)
*/
static apr_status_t xlate_brigade(charset_filter_ctx_t *ctx,
apr_bucket_brigade *bb,
- char *buffer,
+ char *buffer,
apr_size_t *buffer_avail,
int *hit_eos)
{
@@ -737,7 +737,7 @@ static apr_status_t xlate_brigade(charset_filter_ctx_t *ctx,
buffer_avail);
buffer += old_buffer_avail - *buffer_avail;
bucket += old_bucket_avail - bucket_avail;
-
+
if (rv == APR_INCOMPLETE) { /* partial character at end of input */
/* We need to save the final byte(s) for next time; we can't
* convert it until we look at the next bucket.
@@ -781,7 +781,7 @@ static apr_status_t xlate_brigade(charset_filter_ctx_t *ctx,
return rv;
}
-/* xlate_out_filter() handles (almost) arbitrary conversions from one charset
+/* xlate_out_filter() handles (almost) arbitrary conversions from one charset
* to another...
* translation is determined in the fixup hook (find_code_page), which is
* where the filter's context data is set up... the context data gives us
@@ -802,7 +802,7 @@ static apr_status_t xlate_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
int done;
apr_status_t rv = APR_SUCCESS;
- if (!ctx) {
+ if (!ctx) {
/* this is SetOutputFilter path; grab the preallocated context,
* if any; note that if we decided not to do anything in an earlier
* handler, we won't even have a reqinfo
@@ -833,7 +833,7 @@ static apr_status_t xlate_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
const char *mime_type = f->r->content_type ? f->r->content_type : ap_default_type(f->r);
/* XXX When we handle translation of the request body, watch out here as
- * 1.3 allowed additional mime types: multipart and
+ * 1.3 allowed additional mime types: multipart and
* application/x-www-form-urlencoded
*/
if (strncasecmp(mime_type, "text/", 5) == 0 ||
@@ -854,7 +854,7 @@ static apr_status_t xlate_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
#endif
strncasecmp(mime_type, "message/", 8) == 0) {
- rv = apr_xlate_open(&ctx->xlate,
+ rv = apr_xlate_open(&ctx->xlate,
dc->charset_default, dc->charset_source, f->r->pool);
if (rv != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r,
@@ -865,7 +865,7 @@ static apr_status_t xlate_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
}
else {
ctx->noop = 1;
- if (dc->debug >= DBGLVL_GORY)
+ if (dc->debug >= DBGLVL_GORY)
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r,
"mime type is %s; no translation selected",
mime_type);
@@ -925,7 +925,7 @@ static apr_status_t xlate_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
break;
}
consumed_bucket = dptr; /* for axing when we're done reading it */
- dptr = APR_BUCKET_NEXT(dptr); /* get ready for when we access the
+ dptr = APR_BUCKET_NEXT(dptr); /* get ready for when we access the
* next bucket */
}
/* Try to fill up our tmp buffer with translated data. */
@@ -937,7 +937,7 @@ static apr_status_t xlate_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
* bucket.
*/
char *tmp_tmp;
-
+
tmp_tmp = tmp + sizeof(tmp) - space_avail;
rv = finish_partial_char(ctx,
&cur_str, &cur_len,
@@ -947,11 +947,11 @@ static apr_status_t xlate_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
rv = apr_xlate_conv_buffer(ctx->xlate,
cur_str, &cur_avail,
tmp + sizeof(tmp) - space_avail, &space_avail);
-
+
/* Update input ptr and len after consuming some bytes */
cur_str += cur_len - cur_avail;
cur_len = cur_avail;
-
+
if (rv == APR_INCOMPLETE) { /* partial character at end of input */
/* We need to save the final byte(s) for next time; we can't
* convert it until we look at the next bucket.
@@ -975,7 +975,7 @@ static apr_status_t xlate_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
if (rv != APR_SUCCESS) {
done = 1;
}
-
+
/* tmp is now empty */
space_avail = sizeof(tmp);
}
@@ -998,7 +998,7 @@ static apr_status_t xlate_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
return rv;
}
-static int xlate_in_filter(ap_filter_t *f, apr_bucket_brigade *bb,
+static int xlate_in_filter(ap_filter_t *f, apr_bucket_brigade *bb,
ap_input_mode_t mode, apr_read_type_e block,
apr_off_t readbytes)
{
@@ -1011,7 +1011,7 @@ static int xlate_in_filter(ap_filter_t *f, apr_bucket_brigade *bb,
apr_size_t buffer_size;
int hit_eos;
- if (!ctx) {
+ if (!ctx) {
/* this is SetInputFilter path; grab the preallocated context,
* if any; note that if we decided not to do anything in an earlier
* handler, we won't even have a reqinfo
@@ -1048,7 +1048,7 @@ static int xlate_in_filter(ap_filter_t *f, apr_bucket_brigade *bb,
}
if (APR_BRIGADE_EMPTY(ctx->bb)) {
- if ((rv = ap_get_brigade(f->next, bb, mode, block,
+ if ((rv = ap_get_brigade(f->next, bb, mode, block,
readbytes)) != APR_SUCCESS) {
return rv;
}
@@ -1071,11 +1071,11 @@ static int xlate_in_filter(ap_filter_t *f, apr_bucket_brigade *bb,
if (buffer_size < INPUT_XLATE_BUF_SIZE) { /* do we have output? */
apr_bucket *e;
- e = apr_bucket_heap_create(ctx->tmp,
+ e = apr_bucket_heap_create(ctx->tmp,
INPUT_XLATE_BUF_SIZE - buffer_size,
NULL, f->r->connection->bucket_alloc);
/* make sure we insert at the head, because there may be
- * an eos bucket already there, and the eos bucket should
+ * an eos bucket already there, and the eos bucket should
* come after the data
*/
APR_BRIGADE_INSERT_HEAD(bb, e);
@@ -1102,10 +1102,10 @@ static const command_rec cmds[] =
NULL,
OR_FILEINFO,
"source (html,cgi,ssi) file charset"),
- AP_INIT_TAKE1("CharsetDefault",
+ AP_INIT_TAKE1("CharsetDefault",
add_charset_default,
NULL,
- OR_FILEINFO,
+ OR_FILEINFO,
"name of default charset"),
AP_INIT_ITERATE("CharsetOptions",
add_charset_options,
@@ -1130,7 +1130,7 @@ module AP_MODULE_DECLARE_DATA charset_lite_module =
STANDARD20_MODULE_STUFF,
create_charset_dir_conf,
merge_charset_dir_conf,
- NULL,
+ NULL,
NULL,
cmds,
charset_register_hooks
diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c
index f248a82354..4a9ae9831a 100644
--- a/modules/filters/mod_deflate.c
+++ b/modules/filters/mod_deflate.c
@@ -67,7 +67,7 @@ typedef struct deflate_filter_config_t
* |ID1|ID2|CM |FLG| MTIME |XFL|OS |
* +---+---+---+---+---+---+---+---+---+---+
*/
-static const char gzip_header[10] =
+static const char gzip_header[10] =
{ '\037', '\213', Z_DEFLATED, 0,
0, 0, 0, 0, /* mtime */
0, 0x03 /* Unix OS_CODE */
@@ -152,7 +152,7 @@ static const char *deflate_set_note(cmd_parms *cmd, void *dummy,
{
deflate_filter_config *c = ap_get_module_config(cmd->server->module_config,
&deflate_module);
-
+
if (arg2 == NULL) {
c->note_ratio_name = apr_pstrdup(cmd->pool, arg1);
}
@@ -264,7 +264,7 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
if ( env_value && (strcmp(env_value,"1") == 0) ) {
ap_remove_output_filter(f);
return ap_pass_brigade(f->next, bb);
- }
+ }
}
/* Let's see what our current Content-Encoding is.
@@ -332,7 +332,7 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
token = ap_get_token(r->pool, &accepts, 0);
while (token && token[0] && strcasecmp(token, "gzip")) {
/* skip parameters, XXX: ;q=foo evaluation? */
- while (*accepts == ';') {
+ while (*accepts == ';') {
++accepts;
token = ap_get_token(r->pool, &accepts, 1);
}
@@ -394,7 +394,7 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
ctx->stream.next_out = ctx->buffer;
ctx->stream.avail_out = c->bufferSize;
}
-
+
while (!APR_BRIGADE_EMPTY(bb))
{
const char *data;
@@ -627,8 +627,8 @@ static apr_status_t deflate_in_filter(ap_filter_t *f,
return rv;
}
- len = 10;
- rv = apr_brigade_flatten(ctx->bb, deflate_hdr, &len);
+ len = 10;
+ rv = apr_brigade_flatten(ctx->bb, deflate_hdr, &len);
if (rv != APR_SUCCESS) {
return rv;
}
@@ -784,7 +784,7 @@ static apr_status_t deflate_in_filter(ap_filter_t *f,
inflateEnd(&ctx->stream);
eos = apr_bucket_eos_create(f->c->bucket_alloc);
- APR_BRIGADE_INSERT_TAIL(ctx->proc_bb, eos);
+ APR_BRIGADE_INSERT_TAIL(ctx->proc_bb, eos);
break;
}
@@ -831,7 +831,7 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
{
int zlib_method;
int zlib_flags;
- int deflate_init = 1;
+ int deflate_init = 1;
apr_bucket *bkt;
request_rec *r = f->r;
deflate_ctx *ctx = f->ctx;
@@ -961,7 +961,7 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"Insufficient data for inflate");
return APR_EGENERAL;
- }
+ }
else {
zlib_method = data[2];
zlib_flags = data[3];
@@ -1077,7 +1077,7 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
inflateEnd(&ctx->stream);
eos = apr_bucket_eos_create(f->c->bucket_alloc);
- APR_BRIGADE_INSERT_TAIL(ctx->proc_bb, eos);
+ APR_BRIGADE_INSERT_TAIL(ctx->proc_bb, eos);
break;
}
diff --git a/modules/filters/mod_ext_filter.c b/modules/filters/mod_ext_filter.c
index 0fbb0f61d8..c4f7fe4a2e 100644
--- a/modules/filters/mod_ext_filter.c
+++ b/modules/filters/mod_ext_filter.c
@@ -76,8 +76,8 @@ module AP_MODULE_DECLARE_DATA ext_filter_module;
static const server_rec *main_server;
static apr_status_t ef_output_filter(ap_filter_t *, apr_bucket_brigade *);
-static apr_status_t ef_input_filter(ap_filter_t *, apr_bucket_brigade *,
- ap_input_mode_t, apr_read_type_e,
+static apr_status_t ef_input_filter(ap_filter_t *, apr_bucket_brigade *,
+ ap_input_mode_t, apr_read_type_e,
apr_off_t);
#define DBGLVL_SHOWOPTIONS 1
@@ -143,7 +143,7 @@ static const char *add_options(cmd_parms *cmd, void *in_dc,
dc->log_stderr = 0;
}
else {
- return apr_pstrcat(cmd->temp_pool,
+ return apr_pstrcat(cmd->temp_pool,
"Invalid ExtFilterOptions option: ",
arg,
NULL);
@@ -196,7 +196,7 @@ static const char *parse_cmd(apr_pool_t *p, const char **args, ef_filter_t *filt
return "Invalid cmd= parameter";
}
filter->command = filter->args[0];
-
+
return NULL;
}
@@ -239,7 +239,7 @@ static const char *define_filter(cmd_parms *cmd, void *dummy, const char *args)
filter->preserves_content_length = 1;
}
else {
- return apr_psprintf(cmd->pool,
+ return apr_psprintf(cmd->pool,
"mangled argument `%s'",
token);
}
@@ -275,14 +275,14 @@ static const char *define_filter(cmd_parms *cmd, void *dummy, const char *args)
filter->enable_env = token;
continue;
}
-
+
if (!strncasecmp(args, "disableenv=", 11)) {
args += 11;
token = ap_getword_white(cmd->pool, &args);
filter->disable_env = token;
continue;
}
-
+
if (!strncasecmp(args, "intype=", 7)) {
args += 7;
filter->intype = ap_getword_white(cmd->pool, &args);
@@ -307,7 +307,7 @@ static const char *define_filter(cmd_parms *cmd, void *dummy, const char *args)
args);
}
- /* parsing is done... register the filter
+ /* parsing is done... register the filter
*/
if (filter->mode == OUTPUT_FILTER) {
/* XXX need a way to ensure uniqueness among all filters */
@@ -350,12 +350,12 @@ static void register_hooks(apr_pool_t *p)
ap_hook_post_config(ef_init, NULL, NULL, APR_HOOK_MIDDLE);
}
-static apr_status_t set_resource_limits(request_rec *r,
+static apr_status_t set_resource_limits(request_rec *r,
apr_procattr_t *procattr)
{
#if defined(RLIMIT_CPU) || defined(RLIMIT_NPROC) || \
defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined (RLIMIT_AS)
- core_dir_config *conf =
+ core_dir_config *conf =
(core_dir_config *)ap_get_module_config(r->per_dir_config,
&core_module);
apr_status_t rv;
@@ -438,12 +438,12 @@ static apr_status_t init_ext_filter_process(ap_filter_t *f)
rc = apr_procattr_child_errfn_set(ctx->procattr, child_errfn);
ap_assert(rc == APR_SUCCESS);
apr_pool_userdata_set(f->r, ERRFN_USERDATA_KEY, apr_pool_cleanup_null, ctx->p);
-
+
if (dc->debug >= DBGLVL_ERRORCHECK) {
rc = apr_procattr_error_check_set(ctx->procattr, 1);
ap_assert(rc == APR_SUCCESS);
}
-
+
/* add standard CGI variables as well as DOCUMENT_URI, DOCUMENT_PATH_INFO,
* and QUERY_STRING_UNESCAPED
*/
@@ -462,11 +462,11 @@ static apr_status_t init_ext_filter_process(ap_filter_t *f)
env = (const char * const *) ap_create_environment(ctx->p,
f->r->subprocess_env);
- rc = apr_proc_create(ctx->proc,
- ctx->filter->command,
- (const char * const *)ctx->filter->args,
+ rc = apr_proc_create(ctx->proc,
+ ctx->filter->command,
+ (const char * const *)ctx->filter->args,
env, /* environment */
- ctx->procattr,
+ ctx->procattr,
ctx->p);
if (rc != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, f->r,
@@ -483,7 +483,7 @@ static apr_status_t init_ext_filter_process(ap_filter_t *f)
* be open.
*/
- apr_pool_cleanup_register(ctx->p, ctx->proc->in,
+ apr_pool_cleanup_register(ctx->p, ctx->proc->in,
apr_pool_cleanup_null, /* other mechanism */
ef_close_file);
@@ -513,7 +513,7 @@ static apr_status_t init_ext_filter_process(ap_filter_t *f)
static const char *get_cfg_string(ef_dir_t *dc, ef_filter_t *filter, apr_pool_t *p)
{
- const char *debug_str = dc->debug == -1 ?
+ const char *debug_str = dc->debug == -1 ?
"DebugLevel=0" : apr_psprintf(p, "DebugLevel=%d", dc->debug);
const char *log_stderr_str = dc->log_stderr < 1 ?
"NoLogStderr" : "LogStderr";
@@ -523,7 +523,7 @@ static const char *get_cfg_string(ef_dir_t *dc, ef_filter_t *filter, apr_pool_t
"*/*" : filter->intype;
const char *outtype_str = !filter->outtype ?
"(unchanged)" : filter->outtype;
-
+
return apr_psprintf(p,
"ExtFilterOptions %s %s %s ExtFilterInType %s "
"ExtFilterOuttype %s",
@@ -583,7 +583,7 @@ static apr_status_t init_filter_instance(ap_filter_t *f)
/* wrong IMT for us; don't mess with the output */
ctx->noop = 1;
}
- }
+ }
else {
ctx->noop = 1;
}
@@ -608,7 +608,7 @@ static apr_status_t init_filter_instance(ap_filter_t *f)
ap_set_content_type(f->r, ctx->filter->outtype);
}
if (ctx->filter->preserves_content_length != 1) {
- /* nasty, but needed to avoid confusing the browser
+ /* nasty, but needed to avoid confusing the browser
*/
apr_table_unset(f->r->headers_out, "Content-Length");
}
@@ -627,7 +627,7 @@ static apr_status_t init_filter_instance(ap_filter_t *f)
return APR_SUCCESS;
}
-/* drain_available_output():
+/* drain_available_output():
*
* if any data is available from the filter, read it and append it
* to the the bucket brigade
@@ -663,12 +663,12 @@ static apr_status_t drain_available_output(ap_filter_t *f,
return APR_SUCCESS;
}
/* we should never get here; if we do, a bogus error message would be
- * the least of our problems
+ * the least of our problems
*/
return APR_ANONYMOUS;
}
-static apr_status_t pass_data_to_filter(ap_filter_t *f, const char *data,
+static apr_status_t pass_data_to_filter(ap_filter_t *f, const char *data,
apr_size_t len, apr_bucket_brigade *bb)
{
ef_ctx_t *ctx = f->ctx;
@@ -676,7 +676,7 @@ static apr_status_t pass_data_to_filter(ap_filter_t *f, const char *data,
apr_status_t rv;
apr_size_t bytes_written = 0;
apr_size_t tmplen;
-
+
do {
tmplen = len - bytes_written;
rv = apr_file_write(ctx->proc->in,
@@ -690,7 +690,7 @@ static apr_status_t pass_data_to_filter(ap_filter_t *f, const char *data,
return rv;
}
if (APR_STATUS_IS_EAGAIN(rv)) {
- /* XXX handle blocking conditions here... if we block, we need
+ /* XXX handle blocking conditions here... if we block, we need
* to read data from the child process and pass it down to the
* next filter!
*/
@@ -699,24 +699,24 @@ static apr_status_t pass_data_to_filter(ap_filter_t *f, const char *data,
#if APR_FILES_AS_SOCKETS
int num_events;
const apr_pollfd_t *pdesc;
-
+
rv = apr_pollset_poll(ctx->pollset, f->r->server->timeout,
&num_events, &pdesc);
if (rv || dc->debug >= DBGLVL_GORY) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG,
rv, f->r, "apr_pollset_poll()");
}
- if (rv != APR_SUCCESS && !APR_STATUS_IS_EINTR(rv)) {
+ if (rv != APR_SUCCESS && !APR_STATUS_IS_EINTR(rv)) {
/* some error such as APR_TIMEUP */
return rv;
}
#else /* APR_FILES_AS_SOCKETS */
/* Yuck... I'd really like to wait until I can read
- * or write, but instead I have to sleep and try again
+ * or write, but instead I have to sleep and try again
*/
apr_sleep(100000); /* 100 milliseconds */
if (dc->debug >= DBGLVL_GORY) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG,
0, f->r, "apr_sleep()");
}
#endif /* APR_FILES_AS_SOCKETS */
@@ -729,9 +729,9 @@ static apr_status_t pass_data_to_filter(ap_filter_t *f, const char *data,
return rv;
}
-/* ef_unified_filter:
+/* ef_unified_filter:
*
- * runs the bucket brigade bb through the filter and puts the result into
+ * runs the bucket brigade bb through the filter and puts the result into
* bb, dropping the previous content of bb (the input)
*/
@@ -778,7 +778,7 @@ static int ef_unified_filter(ap_filter_t *f, apr_bucket_brigade *bb)
apr_brigade_cleanup(bb);
APR_BRIGADE_CONCAT(bb, bb_tmp);
apr_brigade_destroy(bb_tmp);
-
+
if (eos) {
/* close the child's stdin to signal that no more data is coming;
* that will cause the child to finish generating output
@@ -788,10 +788,10 @@ static int ef_unified_filter(ap_filter_t *f, apr_bucket_brigade *bb)
"apr_file_close(child input)");
return rv;
}
- /* since we've seen eos and closed the child's stdin, set the proper pipe
- * timeout; we don't care if we don't return from apr_file_read() for a while...
+ /* since we've seen eos and closed the child's stdin, set the proper pipe
+ * timeout; we don't care if we don't return from apr_file_read() for a while...
*/
- rv = apr_file_pipe_timeout_set(ctx->proc->out,
+ rv = apr_file_pipe_timeout_set(ctx->proc->out,
r->server->timeout);
if (rv) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
@@ -818,7 +818,7 @@ static int ef_unified_filter(ap_filter_t *f, apr_bucket_brigade *bb)
}
return APR_SUCCESS;
}
-
+
if (rv == APR_SUCCESS) {
b = apr_bucket_heap_create(buf, len, NULL, c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, b);
@@ -855,7 +855,7 @@ static apr_status_t ef_output_filter(ap_filter_t *f, apr_bucket_brigade *bb)
}
rv = ef_unified_filter(f, bb);
- if (rv != APR_SUCCESS) {
+ if (rv != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
"ef_unified_filter() failed");
}
@@ -867,7 +867,7 @@ static apr_status_t ef_output_filter(ap_filter_t *f, apr_bucket_brigade *bb)
return rv;
}
-static int ef_input_filter(ap_filter_t *f, apr_bucket_brigade *bb,
+static int ef_input_filter(ap_filter_t *f, apr_bucket_brigade *bb,
ap_input_mode_t mode, apr_read_type_e block,
apr_off_t readbytes)
{
diff --git a/modules/filters/mod_filter.c b/modules/filters/mod_filter.c
index d0687f4030..806915e7e3 100644
--- a/modules/filters/mod_filter.c
+++ b/modules/filters/mod_filter.c
@@ -42,7 +42,7 @@
module AP_MODULE_DECLARE_DATA filter_module;
/**
- * @brief is a filter provider, as defined and implemented by mod_filter.
+ * @brief is a filter provider, as defined and implemented by mod_filter.
*
* The struct is a linked list, with dispatch criteria
* defined for each filter. The provider implementation itself is a
@@ -278,10 +278,10 @@ static int filter_lookup(ap_filter_t *f, ap_filter_rec_t *filter)
* The idea is that by putting this in mod_filter, we relieve
* filter implementations of the burden of fixing up HTTP headers
* for cases that are routinely affected by filters.
- *
+ *
* Default is ALWAYS to do nothing, so as not to tread on the
* toes of filters which want to do it themselves.
- *
+ *
*/
proto_flags = provider->frec->proto_flags;
@@ -650,7 +650,7 @@ static const char *filter_provider(cmd_parms *cmd, void *CFG, const char *args)
str = apr_pstrdup(cmd->pool, condition);
ap_str_tolower(str);
}
-
+
if ( (provider->dispatch == RESPONSE_HEADERS)
&& !strcmp(str, "content-type")) {
provider->dispatch = CONTENT_TYPE;
diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c
index 7f37b4e416..757bad3c9b 100644
--- a/modules/filters/mod_include.c
+++ b/modules/filters/mod_include.c
@@ -1218,7 +1218,7 @@ static int parse_expr(include_ctx_t *ctx, const char *expr, int *was_error)
current = root = new;
continue;
}
-
+
new->left = current->right;
new->left->parent = new;
new->parent = current;
@@ -1554,7 +1554,7 @@ static int find_file(request_rec *r, const char *directive, const char *tag,
if (rr->status == HTTP_OK && rr->finfo.filetype != 0) {
to_send = rr->filename;
- if ((rv = apr_stat(finfo, to_send,
+ if ((rv = apr_stat(finfo, to_send,
APR_FINFO_GPROT | APR_FINFO_MIN, rr->pool)) != APR_SUCCESS
&& rv != APR_INCOMPLETE) {
error_fmt = "unable to get information about \"%s\" "
@@ -1574,7 +1574,7 @@ static int find_file(request_rec *r, const char *directive, const char *tag,
}
if (rr) ap_destroy_sub_req(rr);
-
+
return ret;
}
else if (!strcmp(tag, "virtual")) {
@@ -1862,12 +1862,12 @@ static apr_status_t handle_config(include_ctx_t *ctx, ap_filter_t *f,
ctx->time_str = ap_ssi_parse_string(ctx, tag_val, NULL, 0,
SSI_EXPAND_DROP_NAME);
- apr_table_setn(env, "DATE_LOCAL", ap_ht_time(r->pool, date,
+ apr_table_setn(env, "DATE_LOCAL", ap_ht_time(r->pool, date,
ctx->time_str, 0));
- apr_table_setn(env, "DATE_GMT", ap_ht_time(r->pool, date,
+ apr_table_setn(env, "DATE_GMT", ap_ht_time(r->pool, date,
ctx->time_str, 1));
apr_table_setn(env, "LAST_MODIFIED",
- ap_ht_time(r->pool, r->finfo.mtime,
+ ap_ht_time(r->pool, r->finfo.mtime,
ctx->time_str, 0));
}
else if (!strcmp(tag, "sizefmt")) {
@@ -2215,7 +2215,7 @@ static apr_status_t handle_else(include_ctx_t *ctx, ap_filter_t *f,
}
DEBUG_DUMP_COND(ctx, " else");
-
+
if (ctx->flags & SSI_FLAG_COND_TRUE) {
ctx->flags &= SSI_FLAG_CLEAR_PRINTING;
}
@@ -2286,7 +2286,7 @@ static apr_status_t handle_set(include_ctx_t *ctx, ap_filter_t *f,
return APR_SUCCESS;
}
- /* we need to use the 'main' request pool to set notes as that is
+ /* we need to use the 'main' request pool to set notes as that is
* a notes lifetime
*/
while (sub) {
@@ -2415,15 +2415,15 @@ static apr_status_t handle_printenv(include_ctx_t *ctx, ap_filter_t *f,
/* This is an implementation of the BNDM search algorithm.
*
- * Fast and Flexible String Matching by Combining Bit-parallelism and
- * Suffix Automata (2001)
+ * Fast and Flexible String Matching by Combining Bit-parallelism and
+ * Suffix Automata (2001)
* Gonzalo Navarro, Mathieu Raffinot
*
* http://www-igm.univ-mlv.fr/~raffinot/ftp/jea2001.ps.gz
*
* Initial code submitted by Sascha Schumann.
*/
-
+
/* Precompile the bndm_t data structure. */
static bndm_t *bndm_compile(apr_pool_t *pool, const char *n, apr_size_t nl)
{
@@ -2447,7 +2447,7 @@ static bndm_t *bndm_compile(apr_pool_t *pool, const char *n, apr_size_t nl)
*
* h - the string to look in
* hl - length of the string to look for
- * t - precompiled bndm structure against the pattern
+ * t - precompiled bndm structure against the pattern
*
* Returns the count of character that is the first match or hl if no
* match is found.
@@ -3573,7 +3573,7 @@ static apr_status_t includes_filter(ap_filter_t *f, apr_bucket_brigade *b)
/* Always unset the Last-Modified field - see RFC2616 - 13.3.4.
* We don't know if we are going to be including a file or executing
- * a program which may change the Last-Modified header or make the
+ * a program which may change the Last-Modified header or make the
* content completely dynamic. Therefore, we can't support these
* headers.
* Exception: XBitHack full means we *should* set the Last-Modified field.
@@ -3606,17 +3606,17 @@ static apr_status_t includes_filter(ap_filter_t *f, apr_bucket_brigade *b)
static int include_fixup(request_rec *r)
{
include_dir_config *conf;
-
+
conf = ap_get_module_config(r->per_dir_config, &include_module);
-
- if (r->handler && (strcmp(r->handler, "server-parsed") == 0))
+
+ if (r->handler && (strcmp(r->handler, "server-parsed") == 0))
{
if (!r->content_type || !*r->content_type) {
ap_set_content_type(r, "text/html");
}
r->handler = "default-handler";
}
- else
+ else
#if defined(OS2) || defined(WIN32) || defined(NETWARE)
/* These OS's don't support xbithack. This is being worked on. */
{
@@ -3674,7 +3674,7 @@ static void *create_includes_server_config(apr_pool_t *p, server_rec *server)
result->default_end_tag = DEFAULT_END_SEQUENCE;
result->default_start_tag = DEFAULT_START_SEQUENCE;
- return result;
+ return result;
}
static const char *set_xbithack(cmd_parms *cmd, void *mconfig, const char *arg)
@@ -3799,9 +3799,9 @@ static int include_post_config(apr_pool_t *p, apr_pool_t *plog,
static const command_rec includes_cmds[] =
{
- AP_INIT_TAKE1("XBitHack", set_xbithack, NULL, OR_OPTIONS,
+ AP_INIT_TAKE1("XBitHack", set_xbithack, NULL, OR_OPTIONS,
"Off, On, or Full"),
- AP_INIT_TAKE1("SSIErrorMsg", set_default_error_msg, NULL, OR_ALL,
+ AP_INIT_TAKE1("SSIErrorMsg", set_default_error_msg, NULL, OR_ALL,
"a string"),
AP_INIT_TAKE1("SSITimeFormat", set_default_time_fmt, NULL, OR_ALL,
"a strftime(3) formatted string"),
diff --git a/modules/generators/mod_asis.c b/modules/generators/mod_asis.c
index b32338efcd..01004a72db 100644
--- a/modules/generators/mod_asis.c
+++ b/modules/generators/mod_asis.c
@@ -47,7 +47,7 @@ static int asis_handler(request_rec *r)
return HTTP_NOT_FOUND;
}
- if ((rv = apr_file_open(&f, r->filename, APR_READ,
+ if ((rv = apr_file_open(&f, r->filename, APR_READ,
APR_OS_DEFAULT, r->pool)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
"file permissions deny server access: %s", r->filename);
@@ -92,7 +92,7 @@ static int asis_handler(request_rec *r)
bb = apr_brigade_create(r->pool, c->bucket_alloc);
#if APR_HAS_LARGE_FILES
if (r->finfo.size - pos > AP_MAX_SENDFILE) {
- /* APR_HAS_LARGE_FILES issue; must split into mutiple buckets,
+ /* APR_HAS_LARGE_FILES issue; must split 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.
*/
diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c
index 9a6cdcc335..431d57d22e 100644
--- a/modules/generators/mod_autoindex.c
+++ b/modules/generators/mod_autoindex.c
@@ -1305,7 +1305,7 @@ static struct ent *make_autoindex_entry(const apr_finfo_t *dirent,
return (NULL);
}
- if((autoindex_opts & SHOW_FORBIDDEN)
+ if((autoindex_opts & SHOW_FORBIDDEN)
&& (rr->status == HTTP_UNAUTHORIZED || rr->status == HTTP_FORBIDDEN)) {
show_forbidden = 1;
}
@@ -2070,7 +2070,7 @@ static int index_directory(request_rec *r,
else if (qstring[2] == '1') {
autoindex_opts |= VERSION_SORT;
}
- strcpy(vval, ";V= ");
+ strcpy(vval, ";V= ");
vval[3] = qstring[2];
qstring += qstring[3] ? 4 : 3;
}
diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c
index c8dc170ebc..87d13b3141 100644
--- a/modules/generators/mod_cgi.c
+++ b/modules/generators/mod_cgi.c
@@ -16,14 +16,14 @@
/*
* http_script: keeps all script-related ramblings together.
- *
+ *
* Compliant to CGI/1.1 spec
- *
+ *
* Adapted by rst from original NCSA code by Rob McCool
*
* Apache adds some new env vars; REDIRECT_URL and REDIRECT_QUERY_STRING for
* custom error responses, and DOCUMENT_ROOT because we found it useful.
- * It also adds SERVER_ADMIN - useful for scripts to know who to mail when
+ * It also adds SERVER_ADMIN - useful for scripts to know who to mail when
* they fail.
*/
@@ -165,7 +165,7 @@ static int log_scripterror(request_rec *r, cgi_server_conf * conf, int ret,
char time_str[APR_CTIME_LEN];
int log_flags = rv ? APLOG_ERR : APLOG_ERR;
- ap_log_rerror(APLOG_MARK, log_flags, rv, r,
+ ap_log_rerror(APLOG_MARK, log_flags, rv, r,
"%s: %s", error, r->filename);
/* XXX Very expensive mainline case! Open, then getfileinfo! */
@@ -192,7 +192,7 @@ static int log_scripterror(request_rec *r, cgi_server_conf * conf, int ret,
return ret;
}
-/* Soak up stderr from a script and redirect it to the error log.
+/* Soak up stderr from a script and redirect it to the error log.
*/
static apr_status_t log_script_err(request_rec *r, apr_file_t *script_err)
{
@@ -206,15 +206,15 @@ static apr_status_t log_script_err(request_rec *r, apr_file_t *script_err)
if (newline) {
*newline = '\0';
}
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
- "%s", argsbuffer);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "%s", argsbuffer);
}
return rv;
}
static int log_script(request_rec *r, cgi_server_conf * conf, int ret,
- char *dbuf, const char *sbuf, apr_bucket_brigade *bb,
+ char *dbuf, const char *sbuf, apr_bucket_brigade *bb,
apr_file_t *script_err)
{
const apr_array_header_t *hdrs_arr = apr_table_elts(r->headers_in);
@@ -372,7 +372,7 @@ static void cgi_child_errfn(apr_pool_t *pool, apr_status_t err,
static apr_status_t run_cgi_child(apr_file_t **script_out,
apr_file_t **script_in,
- apr_file_t **script_err,
+ apr_file_t **script_err,
const char *command,
const char * const argv[],
request_rec *r,
@@ -423,7 +423,7 @@ static apr_status_t run_cgi_child(apr_file_t **script_out,
e_info->in_pipe,
e_info->out_pipe,
e_info->err_pipe)) != APR_SUCCESS) ||
- ((rc = apr_procattr_dir_set(procattr,
+ ((rc = apr_procattr_dir_set(procattr,
ap_make_dirstr_parent(r->pool,
r->filename))) != APR_SUCCESS) ||
#ifdef RLIMIT_CPU
@@ -454,7 +454,7 @@ static apr_status_t run_cgi_child(apr_file_t **script_out,
procnew = apr_pcalloc(p, sizeof(*procnew));
rc = ap_os_create_privileged_process(r, procnew, command, argv, env,
procattr, p);
-
+
if (rc != APR_SUCCESS) {
/* Bad things happened. Everyone should have cleaned up. */
ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rc, r,
@@ -499,7 +499,7 @@ static apr_status_t default_build_command(const char **cmd, const char ***argv,
if (e_info->process_cgi) {
*cmd = r->filename;
- /* Do not process r->args if they contain an '=' assignment
+ /* Do not process r->args if they contain an '=' assignment
*/
if (r->args && r->args[0] && !ap_strchr_c(r->args, '=')) {
args = r->args;
@@ -517,9 +517,9 @@ static apr_status_t default_build_command(const char **cmd, const char ***argv,
}
}
}
- /* Everything is - 1 to account for the first parameter
+ /* Everything is - 1 to account for the first parameter
* which is the program name.
- */
+ */
if (numwords > APACHE_ARG_MAX - 1) {
numwords = APACHE_ARG_MAX - 1; /* Truncate args to prevent overrun */
}
@@ -577,7 +577,7 @@ static apr_bucket *cgi_bucket_create(request_rec *r,
apr_status_t rv;
apr_pollfd_t fd;
struct cgi_bucket_data *data = apr_palloc(r->pool, sizeof *data);
-
+
APR_BUCKET_INIT(b);
b->free = apr_bucket_free;
b->list = list;
@@ -596,12 +596,12 @@ static apr_bucket *cgi_bucket_create(request_rec *r,
fd.client_data = (void *)1;
rv = apr_pollset_add(data->pollset, &fd);
AP_DEBUG_ASSERT(rv == APR_SUCCESS);
-
+
fd.desc.f = err; /* script's stderr */
fd.client_data = (void *)2;
rv = apr_pollset_add(data->pollset, &fd);
AP_DEBUG_ASSERT(rv == APR_SUCCESS);
-
+
data->r = r;
b->data = data;
return b;
@@ -696,7 +696,7 @@ static apr_status_t cgi_bucket_read(apr_bucket *b, const char **str,
"poll failed waiting for CGI child");
return rv;
}
-
+
for (; num; num--, results++) {
if (results[0].client_data == (void *)1) {
/* stdout */
@@ -807,7 +807,7 @@ static int cgi_handler(request_rec *r)
/* build the command line */
if ((rv = cgi_build_command(&command, &argv, r, p, &e_info)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
- "don't know how to spawn child process: %s",
+ "don't know how to spawn child process: %s",
r->filename);
return HTTP_INTERNAL_SERVER_ERROR;
}
@@ -835,7 +835,7 @@ static int cgi_handler(request_rec *r)
rv = ap_get_brigade(r->input_filters, bb, AP_MODE_READBYTES,
APR_BLOCK_READ, HUGE_STRING_LEN);
-
+
if (rv != APR_SUCCESS) {
return rv;
}
@@ -860,11 +860,11 @@ static int cgi_handler(request_rec *r)
/* If the child stopped, we still must read to EOS. */
if (child_stopped_reading) {
continue;
- }
+ }
/* read */
apr_bucket_read(bucket, &data, &len, APR_BLOCK_READ);
-
+
if (conf->logname && dbpos < conf->bufbytes) {
int cursize;
@@ -906,7 +906,7 @@ static int cgi_handler(request_rec *r)
#if APR_FILES_AS_SOCKETS
apr_file_pipe_timeout_set(script_in, 0);
apr_file_pipe_timeout_set(script_err, 0);
-
+
b = cgi_bucket_create(r, script_in, script_err, c->bucket_alloc);
#else
b = apr_bucket_pipe_create(script_in, c->bucket_alloc);
@@ -956,7 +956,7 @@ static int cgi_handler(request_rec *r)
r->method_number = M_GET;
/* We already read the message body (if any), so don't allow
- * the redirected request to think it has one. We can ignore
+ * the redirected request to think it has one. We can ignore
* Transfer-Encoding, since we used REQUEST_CHUNKED_ERROR.
*/
apr_table_unset(r->headers_in, "Content-Length");
@@ -975,7 +975,7 @@ static int cgi_handler(request_rec *r)
}
else /* nph */ {
struct ap_filter_t *cur;
-
+
/* get rid of all filters up through protocol... since we
* haven't parsed off the headers, there is no way they can
* work
@@ -998,7 +998,7 @@ static int cgi_handler(request_rec *r)
apr_file_pipe_timeout_set(script_err, r->server->timeout);
log_script_err(r, script_err);
}
-
+
apr_file_close(script_err);
return OK; /* NOT r->status, even if it has changed. */
@@ -1090,7 +1090,7 @@ static apr_status_t include_cmd(include_ctx_t *ctx, ap_filter_t *f,
if ((rv = cgi_build_command(&command, &argv, r, r->pool,
&e_info)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
- "don't know how to spawn cmd child process: %s",
+ "don't know how to spawn cmd child process: %s",
r->filename);
return rv;
}
diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c
index 89a6129b67..03e16a0e2b 100644
--- a/modules/generators/mod_cgid.c
+++ b/modules/generators/mod_cgid.c
@@ -14,18 +14,18 @@
* limitations under the License.
*/
-/*
- * http_script: keeps all script-related ramblings together.
- *
- * Compliant to cgi/1.1 spec
- *
- * Adapted by rst from original NCSA code by Rob McCool
- *
- * Apache adds some new env vars; REDIRECT_URL and REDIRECT_QUERY_STRING for
- * custom error responses, and DOCUMENT_ROOT because we found it useful.
- * It also adds SERVER_ADMIN - useful for scripts to know who to mail when
- * they fail.
- */
+/*
+ * http_script: keeps all script-related ramblings together.
+ *
+ * Compliant to cgi/1.1 spec
+ *
+ * Adapted by rst from original NCSA code by Rob McCool
+ *
+ * Apache adds some new env vars; REDIRECT_URL and REDIRECT_QUERY_STRING for
+ * custom error responses, and DOCUMENT_ROOT because we found it useful.
+ * It also adds SERVER_ADMIN - useful for scripts to know who to mail when
+ * they fail.
+ */
#include "apr_lib.h"
#include "apr_strings.h"
@@ -49,17 +49,17 @@
#include <sys/types.h>
#endif
-#define CORE_PRIVATE
+#define CORE_PRIVATE
#include "util_filter.h"
-#include "httpd.h"
-#include "http_config.h"
-#include "http_request.h"
-#include "http_core.h"
-#include "http_protocol.h"
-#include "http_main.h"
-#include "http_log.h"
-#include "util_script.h"
+#include "httpd.h"
+#include "http_config.h"
+#include "http_request.h"
+#include "http_core.h"
+#include "http_protocol.h"
+#include "http_main.h"
+#include "http_log.h"
+#include "util_script.h"
#include "ap_mpm.h"
#include "unixd.h"
#include "mod_suexec.h"
@@ -73,17 +73,17 @@
#include <sys/un.h> /* for sockaddr_un */
-module AP_MODULE_DECLARE_DATA cgid_module;
+module AP_MODULE_DECLARE_DATA cgid_module;
static int cgid_start(apr_pool_t *p, server_rec *main_server, apr_proc_t *procnew);
-static int cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *main_server);
+static int cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *main_server);
static int handle_exec(include_ctx_t *ctx, ap_filter_t *f, apr_bucket_brigade *bb);
static APR_OPTIONAL_FN_TYPE(ap_register_include_handler) *cgid_pfn_reg_with_ssi;
static APR_OPTIONAL_FN_TYPE(ap_ssi_get_tag_and_value) *cgid_pfn_gtv;
static APR_OPTIONAL_FN_TYPE(ap_ssi_parse_string) *cgid_pfn_ps;
-static apr_pool_t *pcgi = NULL;
+static apr_pool_t *pcgi = NULL;
static int total_modules = 0;
static pid_t daemon_pid;
static int daemon_should_exit = 0;
@@ -101,26 +101,26 @@ static void discard_script_output(apr_bucket_brigade *bb);
*/
static ap_unix_identity_t *cgid_suexec_id_doer(const request_rec *r)
{
- return (ap_unix_identity_t *)
+ return (ap_unix_identity_t *)
ap_get_module_config(r->request_config, &cgid_module);
}
/* KLUDGE --- for back-combatibility, we don't have to check ExecCGI
- * in ScriptAliased directories, which means we need to know if this
- * request came through ScriptAlias or not... so the Alias module
- * leaves a note for us.
- */
+ * in ScriptAliased directories, which means we need to know if this
+ * request came through ScriptAlias or not... so the Alias module
+ * leaves a note for us.
+ */
-static int is_scriptaliased(request_rec *r)
-{
- const char *t = apr_table_get(r->notes, "alias-forced-type");
- return t && (!strcasecmp(t, "cgi-script"));
-}
+static int is_scriptaliased(request_rec *r)
+{
+ const char *t = apr_table_get(r->notes, "alias-forced-type");
+ return t && (!strcasecmp(t, "cgi-script"));
+}
-/* Configuration stuff */
+/* Configuration stuff */
-#define DEFAULT_LOGBYTES 10385760
-#define DEFAULT_BUFBYTES 1024
+#define DEFAULT_LOGBYTES 10385760
+#define DEFAULT_BUFBYTES 1024
#define DEFAULT_SOCKET DEFAULT_REL_RUNTIMEDIR "/cgisock"
#define CGI_REQ 1
@@ -153,11 +153,11 @@ static int is_scriptaliased(request_rec *r)
#define DEFAULT_CONNECT_ATTEMPTS 15
#endif
-typedef struct {
- const char *logname;
- long logbytes;
- int bufbytes;
-} cgid_server_conf;
+typedef struct {
+ const char *logname;
+ long logbytes;
+ int bufbytes;
+} cgid_server_conf;
typedef struct {
int req_type; /* request type (CGI_REQ, SSI_REQ, etc.) */
@@ -199,7 +199,7 @@ static char **create_argv(apr_pool_t *p, char *path, char *user, char *group,
}
else {
/* count the number of keywords */
-
+
for (x = 0, numwords = 1; args[x]; x++) {
if (args[x] == '+') {
++numwords;
@@ -331,16 +331,16 @@ static apr_status_t sock_write(int fd, const void *buf, size_t buf_size)
return APR_SUCCESS;
}
-static apr_status_t get_req(int fd, request_rec *r, char **argv0, char ***env,
+static apr_status_t get_req(int fd, request_rec *r, char **argv0, char ***env,
cgid_req_t *req)
-{
- int i;
- char **environ;
- core_request_config *temp_core;
+{
+ int i;
+ char **environ;
+ core_request_config *temp_core;
void **rconf;
apr_status_t stat;
- r->server = apr_pcalloc(r->pool, sizeof(server_rec));
+ r->server = apr_pcalloc(r->pool, sizeof(server_rec));
/* read the request header */
stat = sock_read(fd, req, sizeof(*req));
@@ -356,11 +356,11 @@ static apr_status_t get_req(int fd, request_rec *r, char **argv0, char ***env,
/* handle module indexes and such */
rconf = (void **) apr_pcalloc(r->pool, sizeof(void *) * (total_modules + DYNAMIC_MODULE_LIMIT));
- temp_core = (core_request_config *)apr_palloc(r->pool, sizeof(core_module));
+ temp_core = (core_request_config *)apr_palloc(r->pool, sizeof(core_module));
rconf[req->core_module_index] = (void *)temp_core;
- r->request_config = (ap_conf_vector_t *)rconf;
+ r->request_config = (ap_conf_vector_t *)rconf;
ap_set_module_config(r->request_config, &cgid_module, (void *)&req->ugid);
-
+
/* Read the filename, argv0, uri, and args */
r->filename = apr_pcalloc(r->pool, req->filename_len + 1);
*argv0 = apr_pcalloc(r->pool, req->argv0_len + 1);
@@ -394,46 +394,46 @@ static apr_status_t get_req(int fd, request_rec *r, char **argv0, char ***env,
*env = environ;
#if 0
-#ifdef RLIMIT_CPU
- sock_read(fd, &j, sizeof(int));
- if (j) {
- temp_core->limit_cpu = (struct rlimit *)apr_palloc (sizeof(struct rlimit));
- sock_read(fd, temp_core->limit_cpu, sizeof(struct rlimit));
- }
- else {
- temp_core->limit_cpu = NULL;
- }
-#endif
-
-#if defined (RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
- sock_read(fd, &j, sizeof(int));
- if (j) {
- temp_core->limit_mem = (struct rlimit *)apr_palloc(r->pool, sizeof(struct rlimit));
- sock_read(fd, temp_core->limit_mem, sizeof(struct rlimit));
- }
- else {
- temp_core->limit_mem = NULL;
- }
-#endif
-
-#ifdef RLIMIT_NPROC
- sock_read(fd, &j, sizeof(int));
- if (j) {
- temp_core->limit_nproc = (struct rlimit *)apr_palloc(r->pool, sizeof(struct rlimit));
- sock_read(fd, temp_core->limit_nproc, sizeof(struct rlimit));
- }
- else {
- temp_core->limit_nproc = NULL;
- }
-#endif
+#ifdef RLIMIT_CPU
+ sock_read(fd, &j, sizeof(int));
+ if (j) {
+ temp_core->limit_cpu = (struct rlimit *)apr_palloc (sizeof(struct rlimit));
+ sock_read(fd, temp_core->limit_cpu, sizeof(struct rlimit));
+ }
+ else {
+ temp_core->limit_cpu = NULL;
+ }
+#endif
+
+#if defined (RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
+ sock_read(fd, &j, sizeof(int));
+ if (j) {
+ temp_core->limit_mem = (struct rlimit *)apr_palloc(r->pool, sizeof(struct rlimit));
+ sock_read(fd, temp_core->limit_mem, sizeof(struct rlimit));
+ }
+ else {
+ temp_core->limit_mem = NULL;
+ }
+#endif
+
+#ifdef RLIMIT_NPROC
+ sock_read(fd, &j, sizeof(int));
+ if (j) {
+ temp_core->limit_nproc = (struct rlimit *)apr_palloc(r->pool, sizeof(struct rlimit));
+ sock_read(fd, temp_core->limit_nproc, sizeof(struct rlimit));
+ }
+ else {
+ temp_core->limit_nproc = NULL;
+ }
+#endif
#endif
return APR_SUCCESS;
-}
+}
-static apr_status_t send_req(int fd, request_rec *r, char *argv0, char **env,
- int req_type)
-{
+static apr_status_t send_req(int fd, request_rec *r, char *argv0, char **env,
+ int req_type)
+{
int i;
cgid_req_t req = {0};
apr_status_t stat;
@@ -444,13 +444,13 @@ static apr_status_t send_req(int fd, request_rec *r, char *argv0, char **env,
} else {
memcpy(&req.ugid, ugid, sizeof(ap_unix_identity_t));
}
-
+
req.req_type = req_type;
req.ppid = parent_pid;
req.conn_id = r->connection->id;
req.core_module_index = core_module.module_index;
for (req.env_count = 0; env[req.env_count]; req.env_count++) {
- continue;
+ continue;
}
req.filename_len = strlen(r->filename);
req.argv0_len = strlen(argv0);
@@ -482,51 +482,51 @@ static apr_status_t send_req(int fd, request_rec *r, char *argv0, char **env,
if ((stat = sock_write(fd, &curlen, sizeof(curlen))) != APR_SUCCESS) {
return stat;
}
-
+
if ((stat = sock_write(fd, env[i], curlen)) != APR_SUCCESS) {
return stat;
}
}
#if 0
-#ifdef RLIMIT_CPU
- if (conf->limit_cpu) {
- len = 1;
- stat = sock_write(fd, &len, sizeof(int));
- stat = sock_write(fd, conf->limit_cpu, sizeof(struct rlimit));
- }
- else {
- len = 0;
- stat = sock_write(fd, &len, sizeof(int));
- }
-#endif
-
-#if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
- if (conf->limit_mem) {
- len = 1;
- stat = sock_write(fd, &len, sizeof(int));
- stat = sock_write(fd, conf->limit_mem, sizeof(struct rlimit));
- }
- else {
- len = 0;
- stat = sock_write(fd, &len, sizeof(int));
- }
-#endif
-
-#ifdef RLIMIT_NPROC
- if (conf->limit_nproc) {
- len = 1;
- stat = sock_write(fd, &len, sizeof(int));
- stat = sock_write(fd, conf->limit_nproc, sizeof(struct rlimit));
- }
- else {
- len = 0;
- stat = sock_write(fd, &len, sizeof(int));
- }
+#ifdef RLIMIT_CPU
+ if (conf->limit_cpu) {
+ len = 1;
+ stat = sock_write(fd, &len, sizeof(int));
+ stat = sock_write(fd, conf->limit_cpu, sizeof(struct rlimit));
+ }
+ else {
+ len = 0;
+ stat = sock_write(fd, &len, sizeof(int));
+ }
+#endif
+
+#if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
+ if (conf->limit_mem) {
+ len = 1;
+ stat = sock_write(fd, &len, sizeof(int));
+ stat = sock_write(fd, conf->limit_mem, sizeof(struct rlimit));
+ }
+ else {
+ len = 0;
+ stat = sock_write(fd, &len, sizeof(int));
+ }
+#endif
+
+#ifdef RLIMIT_NPROC
+ if (conf->limit_nproc) {
+ len = 1;
+ stat = sock_write(fd, &len, sizeof(int));
+ stat = sock_write(fd, conf->limit_nproc, sizeof(struct rlimit));
+ }
+ else {
+ len = 0;
+ stat = sock_write(fd, &len, sizeof(int));
+ }
#endif
#endif
return APR_SUCCESS;
-}
+}
static void daemon_signal_handler(int sig)
{
@@ -551,8 +551,8 @@ static void cgid_child_errfn(apr_pool_t *pool, apr_status_t err,
ap_log_error(APLOG_MARK, APLOG_ERR, err, r->server, "%s", description);
}
-static int cgid_server(void *data)
-{
+static int cgid_server(void *data)
+{
struct sockaddr_un unix_addr;
int sd, sd2, rc;
mode_t omask;
@@ -561,9 +561,9 @@ static int cgid_server(void *data)
server_rec *main_server = data;
apr_hash_t *script_hash = apr_hash_make(pcgi);
- apr_pool_create(&ptrans, pcgi);
+ apr_pool_create(&ptrans, pcgi);
- apr_signal(SIGCHLD, SIG_IGN);
+ apr_signal(SIGCHLD, SIG_IGN);
apr_signal(SIGHUP, daemon_signal_handler);
/* Close our copy of the listening sockets */
@@ -575,10 +575,10 @@ static int cgid_server(void *data)
apr_hook_sort_all();
if ((sd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
- ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server,
"Couldn't create unix domain socket");
return errno;
- }
+ }
memset(&unix_addr, 0, sizeof(unix_addr));
unix_addr.sun_family = AF_UNIX;
@@ -588,34 +588,34 @@ static int cgid_server(void *data)
rc = bind(sd, (struct sockaddr *)&unix_addr, sizeof(unix_addr));
umask(omask); /* can't fail, so can't clobber errno */
if (rc < 0) {
- ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server,
"Couldn't bind unix domain socket %s",
- sockname);
+ sockname);
return errno;
- }
+ }
if (listen(sd, DEFAULT_CGID_LISTENBACKLOG) < 0) {
- ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server,
- "Couldn't listen on unix domain socket");
+ ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server,
+ "Couldn't listen on unix domain socket");
return errno;
- }
+ }
if (!geteuid()) {
if (chown(sockname, unixd_config.user_id, -1) < 0) {
- ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server,
"Couldn't change owner of unix domain socket %s",
- sockname);
+ sockname);
return errno;
}
}
-
+
unixd_setup_child(); /* if running as root, switch to configured user/group */
while (!daemon_should_exit) {
int errfileno = STDERR_FILENO;
- char *argv0;
- char **env;
- const char * const *argv;
+ char *argv0;
+ char **env;
+ const char * const *argv;
apr_int32_t in_pipe;
apr_int32_t out_pipe;
apr_int32_t err_pipe;
@@ -639,17 +639,17 @@ static int cgid_server(void *data)
}
#endif
if (errno != EINTR) {
- ap_log_error(APLOG_MARK, APLOG_ERR, errno,
+ ap_log_error(APLOG_MARK, APLOG_ERR, errno,
(server_rec *)data,
"Error accepting on cgid socket");
}
continue;
}
-
- r = apr_pcalloc(ptrans, sizeof(request_rec));
+
+ r = apr_pcalloc(ptrans, sizeof(request_rec));
procnew = apr_pcalloc(ptrans, sizeof(*procnew));
- r->pool = ptrans;
- stat = get_req(sd2, r, &argv0, &env, &cgid_req);
+ r->pool = ptrans;
+ stat = get_req(sd2, r, &argv0, &env, &cgid_req);
if (stat != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, stat,
main_server,
@@ -696,12 +696,12 @@ static int cgid_server(void *data)
}
if (((rc = apr_procattr_create(&procattr, ptrans)) != APR_SUCCESS) ||
- ((cgid_req.req_type == CGI_REQ) &&
+ ((cgid_req.req_type == CGI_REQ) &&
(((rc = apr_procattr_io_set(procattr,
in_pipe,
out_pipe,
err_pipe)) != APR_SUCCESS) ||
- /* XXX apr_procattr_child_*_set() is creating an unnecessary
+ /* XXX apr_procattr_child_*_set() is creating an unnecessary
* pipe between this process and the child being created...
* It is cleaned up with the temporary pool for this request.
*/
@@ -734,25 +734,25 @@ static int cgid_server(void *data)
close(sd2);
if (memcmp(&empty_ugid, &cgid_req.ugid, sizeof(empty_ugid))) {
- /* We have a valid identity, and can be sure that
- * cgid_suexec_id_doer will return a valid ugid
+ /* We have a valid identity, and can be sure that
+ * cgid_suexec_id_doer will return a valid ugid
*/
rc = ap_os_create_privileged_process(r, procnew, argv0, argv,
(const char * const *)env,
procattr, ptrans);
} else {
- rc = apr_proc_create(procnew, argv0, argv,
- (const char * const *)env,
+ rc = apr_proc_create(procnew, argv0, argv,
+ (const char * const *)env,
procattr, ptrans);
}
-
+
if (rc != APR_SUCCESS) {
/* Bad things happened. Everyone should have cleaned up.
* ap_log_rerror() won't work because the header table used by
* ap_log_rerror() hasn't been replicated in the phony r
*/
ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server,
- "couldn't create child process: %d: %s", rc,
+ "couldn't create child process: %d: %s", rc,
apr_filepath_name_get(r->filename));
}
else {
@@ -779,9 +779,9 @@ static int cgid_server(void *data)
(void *)((long)procnew->pid));
}
}
- }
- return -1;
-}
+ }
+ return -1;
+}
static int cgid_start(apr_pool_t *p, server_rec *main_server,
apr_proc_t *procnew)
@@ -816,9 +816,9 @@ static int cgid_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
return OK;
}
-static int cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
- server_rec *main_server)
-{
+static int cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
+ server_rec *main_server)
+{
apr_proc_t *procnew = NULL;
int first_time = 0;
const char *userdata_key = "cgid_init";
@@ -865,31 +865,31 @@ static int cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
}
}
return ret;
-}
+}
-static void *create_cgid_config(apr_pool_t *p, server_rec *s)
-{
- cgid_server_conf *c =
- (cgid_server_conf *) apr_pcalloc(p, sizeof(cgid_server_conf));
+static void *create_cgid_config(apr_pool_t *p, server_rec *s)
+{
+ cgid_server_conf *c =
+ (cgid_server_conf *) apr_pcalloc(p, sizeof(cgid_server_conf));
- c->logname = NULL;
- c->logbytes = DEFAULT_LOGBYTES;
- c->bufbytes = DEFAULT_BUFBYTES;
- return c;
-}
+ c->logname = NULL;
+ c->logbytes = DEFAULT_LOGBYTES;
+ c->bufbytes = DEFAULT_BUFBYTES;
+ return c;
+}
-static void *merge_cgid_config(apr_pool_t *p, void *basev, void *overridesv)
-{
- cgid_server_conf *base = (cgid_server_conf *) basev, *overrides = (cgid_server_conf *) overridesv;
+static void *merge_cgid_config(apr_pool_t *p, void *basev, void *overridesv)
+{
+ cgid_server_conf *base = (cgid_server_conf *) basev, *overrides = (cgid_server_conf *) overridesv;
- return overrides->logname ? overrides : base;
-}
+ return overrides->logname ? overrides : base;
+}
-static const char *set_scriptlog(cmd_parms *cmd, void *dummy, const char *arg)
-{
- server_rec *s = cmd->server;
+static const char *set_scriptlog(cmd_parms *cmd, void *dummy, const char *arg)
+{
+ server_rec *s = cmd->server;
cgid_server_conf *conf = ap_get_module_config(s->module_config,
- &cgid_module);
+ &cgid_module);
conf->logname = ap_server_root_relative(cmd->pool, arg);
@@ -897,31 +897,31 @@ static const char *set_scriptlog(cmd_parms *cmd, void *dummy, const char *arg)
return apr_pstrcat(cmd->pool, "Invalid ScriptLog path ",
arg, NULL);
}
- return NULL;
-}
+ return NULL;
+}
-static const char *set_scriptlog_length(cmd_parms *cmd, void *dummy, const char *arg)
-{
- server_rec *s = cmd->server;
+static const char *set_scriptlog_length(cmd_parms *cmd, void *dummy, const char *arg)
+{
+ server_rec *s = cmd->server;
cgid_server_conf *conf = ap_get_module_config(s->module_config,
- &cgid_module);
+ &cgid_module);
- conf->logbytes = atol(arg);
- return NULL;
-}
+ conf->logbytes = atol(arg);
+ return NULL;
+}
-static const char *set_scriptlog_buffer(cmd_parms *cmd, void *dummy, const char *arg)
-{
- server_rec *s = cmd->server;
+static const char *set_scriptlog_buffer(cmd_parms *cmd, void *dummy, const char *arg)
+{
+ server_rec *s = cmd->server;
cgid_server_conf *conf = ap_get_module_config(s->module_config,
- &cgid_module);
+ &cgid_module);
- conf->bufbytes = atoi(arg);
- return NULL;
-}
+ conf->bufbytes = atoi(arg);
+ return NULL;
+}
-static const char *set_script_socket(cmd_parms *cmd, void *dummy, const char *arg)
-{
+static const char *set_script_socket(cmd_parms *cmd, void *dummy, const char *arg)
+{
const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
if (err != NULL) {
return err;
@@ -929,126 +929,126 @@ static const char *set_script_socket(cmd_parms *cmd, void *dummy, const char *ar
/* Make sure the pid is appended to the sockname */
sockname = ap_append_pid(cmd->pool, arg, ".");
- sockname = ap_server_root_relative(cmd->pool, sockname);
+ sockname = ap_server_root_relative(cmd->pool, sockname);
if (!sockname) {
return apr_pstrcat(cmd->pool, "Invalid ScriptSock path",
arg, NULL);
}
- return NULL;
-}
+ return NULL;
+}
-static const command_rec cgid_cmds[] =
-{
+static const command_rec cgid_cmds[] =
+{
AP_INIT_TAKE1("ScriptLog", set_scriptlog, NULL, RSRC_CONF,
- "the name of a log for script debugging info"),
+ "the name of a log for script debugging info"),
AP_INIT_TAKE1("ScriptLogLength", set_scriptlog_length, NULL, RSRC_CONF,
- "the maximum length (in bytes) of the script debug log"),
+ "the maximum length (in bytes) of the script debug log"),
AP_INIT_TAKE1("ScriptLogBuffer", set_scriptlog_buffer, NULL, RSRC_CONF,
- "the maximum size (in bytes) to record of a POST request"),
+ "the maximum size (in bytes) to record of a POST request"),
AP_INIT_TAKE1("ScriptSock", set_script_socket, NULL, RSRC_CONF,
"the name of the socket to use for communication with "
- "the cgi daemon."),
- {NULL}
-};
-
-static int log_scripterror(request_rec *r, cgid_server_conf * conf, int ret,
- apr_status_t rv, char *error)
-{
- apr_file_t *f = NULL;
- struct stat finfo;
+ "the cgi daemon."),
+ {NULL}
+};
+
+static int log_scripterror(request_rec *r, cgid_server_conf * conf, int ret,
+ apr_status_t rv, char *error)
+{
+ apr_file_t *f = NULL;
+ struct stat finfo;
char time_str[APR_CTIME_LEN];
int log_flags = rv ? APLOG_ERR : APLOG_ERR;
- ap_log_rerror(APLOG_MARK, log_flags, rv, r,
- "%s: %s", error, r->filename);
+ ap_log_rerror(APLOG_MARK, log_flags, rv, r,
+ "%s: %s", error, r->filename);
/* XXX Very expensive mainline case! Open, then getfileinfo! */
- if (!conf->logname ||
- ((stat(conf->logname, &finfo) == 0)
- && (finfo.st_size > conf->logbytes)) ||
+ if (!conf->logname ||
+ ((stat(conf->logname, &finfo) == 0)
+ && (finfo.st_size > conf->logbytes)) ||
(apr_file_open(&f, conf->logname,
- APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) {
- return ret;
- }
+ APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) {
+ return ret;
+ }
- /* "%% [Wed Jun 19 10:53:21 1996] GET /cgid-bin/printenv HTTP/1.0" */
+ /* "%% [Wed Jun 19 10:53:21 1996] GET /cgid-bin/printenv HTTP/1.0" */
apr_ctime(time_str, apr_time_now());
- apr_file_printf(f, "%%%% [%s] %s %s%s%s %s\n", time_str, r->method, r->uri,
- r->args ? "?" : "", r->args ? r->args : "", r->protocol);
- /* "%% 500 /usr/local/apache/cgid-bin */
- apr_file_printf(f, "%%%% %d %s\n", ret, r->filename);
+ apr_file_printf(f, "%%%% [%s] %s %s%s%s %s\n", time_str, r->method, r->uri,
+ r->args ? "?" : "", r->args ? r->args : "", r->protocol);
+ /* "%% 500 /usr/local/apache/cgid-bin */
+ apr_file_printf(f, "%%%% %d %s\n", ret, r->filename);
- apr_file_printf(f, "%%error\n%s\n", error);
+ apr_file_printf(f, "%%error\n%s\n", error);
- apr_file_close(f);
- return ret;
-}
+ apr_file_close(f);
+ return ret;
+}
-static int log_script(request_rec *r, cgid_server_conf * conf, int ret,
+static int log_script(request_rec *r, cgid_server_conf * conf, int ret,
char *dbuf, const char *sbuf, apr_bucket_brigade *bb,
- apr_file_t *script_err)
-{
- const apr_array_header_t *hdrs_arr = apr_table_elts(r->headers_in);
- const apr_table_entry_t *hdrs = (apr_table_entry_t *) hdrs_arr->elts;
- char argsbuffer[HUGE_STRING_LEN];
- apr_file_t *f = NULL;
+ apr_file_t *script_err)
+{
+ const apr_array_header_t *hdrs_arr = apr_table_elts(r->headers_in);
+ const apr_table_entry_t *hdrs = (apr_table_entry_t *) hdrs_arr->elts;
+ char argsbuffer[HUGE_STRING_LEN];
+ apr_file_t *f = NULL;
apr_bucket *e;
const char *buf;
apr_size_t len;
apr_status_t rv;
int first;
- int i;
- struct stat finfo;
+ int i;
+ struct stat finfo;
char time_str[APR_CTIME_LEN];
/* XXX Very expensive mainline case! Open, then getfileinfo! */
- if (!conf->logname ||
- ((stat(conf->logname, &finfo) == 0)
- && (finfo.st_size > conf->logbytes)) ||
- (apr_file_open(&f, conf->logname,
- APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) {
- /* Soak up script output */
+ if (!conf->logname ||
+ ((stat(conf->logname, &finfo) == 0)
+ && (finfo.st_size > conf->logbytes)) ||
+ (apr_file_open(&f, conf->logname,
+ APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) {
+ /* Soak up script output */
discard_script_output(bb);
if (script_err) {
- while (apr_file_gets(argsbuffer, HUGE_STRING_LEN,
- script_err) == APR_SUCCESS)
- continue;
+ while (apr_file_gets(argsbuffer, HUGE_STRING_LEN,
+ script_err) == APR_SUCCESS)
+ continue;
}
- return ret;
- }
+ return ret;
+ }
- /* "%% [Wed Jun 19 10:53:21 1996] GET /cgid-bin/printenv HTTP/1.0" */
+ /* "%% [Wed Jun 19 10:53:21 1996] GET /cgid-bin/printenv HTTP/1.0" */
apr_ctime(time_str, apr_time_now());
- apr_file_printf(f, "%%%% [%s] %s %s%s%s %s\n", time_str, r->method, r->uri,
- r->args ? "?" : "", r->args ? r->args : "", r->protocol);
- /* "%% 500 /usr/local/apache/cgid-bin" */
- apr_file_printf(f, "%%%% %d %s\n", ret, r->filename);
-
- apr_file_puts("%request\n", f);
- for (i = 0; i < hdrs_arr->nelts; ++i) {
- if (!hdrs[i].key)
- continue;
- apr_file_printf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val);
- }
- if ((r->method_number == M_POST || r->method_number == M_PUT)
- && *dbuf) {
- apr_file_printf(f, "\n%s\n", dbuf);
- }
-
- apr_file_puts("%response\n", f);
- hdrs_arr = apr_table_elts(r->err_headers_out);
- hdrs = (const apr_table_entry_t *) hdrs_arr->elts;
-
- for (i = 0; i < hdrs_arr->nelts; ++i) {
- if (!hdrs[i].key)
- continue;
- apr_file_printf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val);
- }
-
- if (sbuf && *sbuf)
- apr_file_printf(f, "%s\n", sbuf);
+ apr_file_printf(f, "%%%% [%s] %s %s%s%s %s\n", time_str, r->method, r->uri,
+ r->args ? "?" : "", r->args ? r->args : "", r->protocol);
+ /* "%% 500 /usr/local/apache/cgid-bin" */
+ apr_file_printf(f, "%%%% %d %s\n", ret, r->filename);
+
+ apr_file_puts("%request\n", f);
+ for (i = 0; i < hdrs_arr->nelts; ++i) {
+ if (!hdrs[i].key)
+ continue;
+ apr_file_printf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val);
+ }
+ if ((r->method_number == M_POST || r->method_number == M_PUT)
+ && *dbuf) {
+ apr_file_printf(f, "\n%s\n", dbuf);
+ }
+
+ apr_file_puts("%response\n", f);
+ hdrs_arr = apr_table_elts(r->err_headers_out);
+ hdrs = (const apr_table_entry_t *) hdrs_arr->elts;
+
+ for (i = 0; i < hdrs_arr->nelts; ++i) {
+ if (!hdrs[i].key)
+ continue;
+ apr_file_printf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val);
+ }
+
+ if (sbuf && *sbuf)
+ apr_file_printf(f, "%s\n", sbuf);
first = 1;
@@ -1072,29 +1072,29 @@ static int log_script(request_rec *r, cgid_server_conf * conf, int ret,
}
if (script_err) {
- if (apr_file_gets(argsbuffer, HUGE_STRING_LEN,
- script_err) == APR_SUCCESS) {
- apr_file_puts("%stderr\n", f);
- apr_file_puts(argsbuffer, f);
- while (apr_file_gets(argsbuffer, HUGE_STRING_LEN,
- script_err) == APR_SUCCESS)
- apr_file_puts(argsbuffer, f);
- apr_file_puts("\n", f);
- }
+ if (apr_file_gets(argsbuffer, HUGE_STRING_LEN,
+ script_err) == APR_SUCCESS) {
+ apr_file_puts("%stderr\n", f);
+ apr_file_puts(argsbuffer, f);
+ while (apr_file_gets(argsbuffer, HUGE_STRING_LEN,
+ script_err) == APR_SUCCESS)
+ apr_file_puts(argsbuffer, f);
+ apr_file_puts("\n", f);
+ }
}
if (script_err) {
- apr_file_close(script_err);
+ apr_file_close(script_err);
}
- apr_file_close(f);
- return ret;
-}
+ apr_file_close(f);
+ return ret;
+}
static apr_status_t close_unix_socket(void *thefd)
{
int fd = (int)((long)thefd);
-
+
return close(fd);
}
@@ -1115,7 +1115,7 @@ static int connect_to_daemon(int *sdptr, request_rec *r,
while (1) {
++connect_tries;
if ((sd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
- return log_scripterror(r, conf, HTTP_INTERNAL_SERVER_ERROR, errno,
+ return log_scripterror(r, conf, HTTP_INTERNAL_SERVER_ERROR, errno,
"unable to create socket to cgi daemon");
}
if (connect(sd, (struct sockaddr *)&unix_addr, sizeof(unix_addr)) < 0) {
@@ -1131,7 +1131,7 @@ static int connect_to_daemon(int *sdptr, request_rec *r,
}
else {
close(sd);
- return log_scripterror(r, conf, HTTP_SERVICE_UNAVAILABLE, errno,
+ return log_scripterror(r, conf, HTTP_SERVICE_UNAVAILABLE, errno,
"unable to connect to cgi daemon after multiple tries");
}
}
@@ -1171,10 +1171,10 @@ static void discard_script_output(apr_bucket_brigade *bb)
}
}
-/****************************************************************
- *
- * Actual cgid handling...
- */
+/****************************************************************
+ *
+ * Actual cgid handling...
+ */
struct cleanup_script_info {
request_rec *r;
@@ -1271,18 +1271,18 @@ static apr_status_t cleanup_script(void *vptr)
return cleanup_nonchild_process(info->r, pid);
}
-static int cgid_handler(request_rec *r)
-{
+static int cgid_handler(request_rec *r)
+{
conn_rec *c = r->connection;
- int retval, nph, dbpos = 0;
- char *argv0, *dbuf = NULL;
+ int retval, nph, dbpos = 0;
+ char *argv0, *dbuf = NULL;
apr_bucket_brigade *bb;
apr_bucket *b;
cgid_server_conf *conf;
int is_included;
int seen_eos, child_stopped_reading;
int sd;
- char **env;
+ char **env;
apr_file_t *tempsock;
struct cleanup_script_info *info;
apr_status_t rv;
@@ -1290,36 +1290,36 @@ static int cgid_handler(request_rec *r)
if (strcmp(r->handler,CGI_MAGIC_TYPE) && strcmp(r->handler,"cgi-script"))
return DECLINED;
- conf = ap_get_module_config(r->server->module_config, &cgid_module);
- is_included = !strcmp(r->protocol, "INCLUDED");
+ conf = ap_get_module_config(r->server->module_config, &cgid_module);
+ is_included = !strcmp(r->protocol, "INCLUDED");
if ((argv0 = strrchr(r->filename, '/')) != NULL)
argv0++;
else
argv0 = r->filename;
-
- nph = !(strncmp(argv0, "nph-", 4));
- argv0 = r->filename;
+ nph = !(strncmp(argv0, "nph-", 4));
- if (!(ap_allow_options(r) & OPT_EXECCGI) && !is_scriptaliased(r))
- return log_scripterror(r, conf, HTTP_FORBIDDEN, 0,
- "Options ExecCGI is off in this directory");
- if (nph && is_included)
- return log_scripterror(r, conf, HTTP_FORBIDDEN, 0,
- "attempt to include NPH CGI script");
+ argv0 = r->filename;
+
+ if (!(ap_allow_options(r) & OPT_EXECCGI) && !is_scriptaliased(r))
+ return log_scripterror(r, conf, HTTP_FORBIDDEN, 0,
+ "Options ExecCGI is off in this directory");
+ if (nph && is_included)
+ return log_scripterror(r, conf, HTTP_FORBIDDEN, 0,
+ "attempt to include NPH CGI script");
#if defined(OS2) || defined(WIN32)
-#error mod_cgid does not work on this platform. If you teach it to, look
+#error mod_cgid does not work on this platform. If you teach it to, look
#error at mod_cgi.c for required code in this path.
-#else
- if (r->finfo.filetype == 0)
- return log_scripterror(r, conf, HTTP_NOT_FOUND, 0,
- "script not found or unable to stat");
-#endif
- if (r->finfo.filetype == APR_DIR)
- return log_scripterror(r, conf, HTTP_FORBIDDEN, 0,
- "attempt to invoke directory as script");
+#else
+ if (r->finfo.filetype == 0)
+ return log_scripterror(r, conf, HTTP_NOT_FOUND, 0,
+ "script not found or unable to stat");
+#endif
+ if (r->finfo.filetype == APR_DIR)
+ return log_scripterror(r, conf, HTTP_FORBIDDEN, 0,
+ "attempt to invoke directory as script");
if ((r->used_path_info == AP_REQ_REJECT_PATH_INFO) &&
r->path_info && *r->path_info)
@@ -1329,21 +1329,21 @@ static int cgid_handler(request_rec *r)
"AcceptPathInfo off disallows user's path");
}
/*
- if (!ap_suexec_enabled) {
- if (!ap_can_exec(&r->finfo))
- return log_scripterror(r, conf, HTTP_FORBIDDEN, 0,
- "file permissions deny server execution");
- }
+ if (!ap_suexec_enabled) {
+ if (!ap_can_exec(&r->finfo))
+ return log_scripterror(r, conf, HTTP_FORBIDDEN, 0,
+ "file permissions deny server execution");
+ }
*/
- ap_add_common_vars(r);
- ap_add_cgi_vars(r);
- env = ap_create_environment(r->pool, r->subprocess_env);
+ ap_add_common_vars(r);
+ ap_add_cgi_vars(r);
+ env = ap_create_environment(r->pool, r->subprocess_env);
if ((retval = connect_to_daemon(&sd, r, conf)) != OK) {
return retval;
}
- rv = send_req(sd, r, argv0, env, CGI_REQ);
+ rv = send_req(sd, r, argv0, env, CGI_REQ);
if (rv != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
"write to cgi daemon process");
@@ -1361,18 +1361,18 @@ static int cgid_handler(request_rec *r)
* a cleanup for the apr_file_t which will close the socket, so we'll
* get rid of the cleanup we registered when we created the socket.
*/
-
+
apr_os_pipe_put_ex(&tempsock, &sd, 1, r->pool);
apr_pool_cleanup_kill(r->pool, (void *)((long)sd), close_unix_socket);
- if ((argv0 = strrchr(r->filename, '/')) != NULL)
- argv0++;
- else
- argv0 = r->filename;
+ if ((argv0 = strrchr(r->filename, '/')) != NULL)
+ argv0++;
+ else
+ argv0 = r->filename;
- /* Transfer any put/post args, CERN style...
- * Note that we already ignore SIGPIPE in the core server.
- */
+ /* Transfer any put/post args, CERN style...
+ * Note that we already ignore SIGPIPE in the core server.
+ */
bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
seen_eos = 0;
child_stopped_reading = 0;
@@ -1385,11 +1385,11 @@ static int cgid_handler(request_rec *r)
rv = ap_get_brigade(r->input_filters, bb, AP_MODE_READBYTES,
APR_BLOCK_READ, HUGE_STRING_LEN);
-
+
if (rv != APR_SUCCESS) {
return rv;
}
-
+
for (bucket = APR_BRIGADE_FIRST(bb);
bucket != APR_BRIGADE_SENTINEL(bb);
bucket = APR_BUCKET_NEXT(bucket))
@@ -1410,11 +1410,11 @@ static int cgid_handler(request_rec *r)
/* If the child stopped, we still must read to EOS. */
if (child_stopped_reading) {
continue;
- }
+ }
/* read */
apr_bucket_read(bucket, &data, &len, APR_BLOCK_READ);
-
+
if (conf->logname && dbpos < conf->bufbytes) {
int cursize;
@@ -1441,7 +1441,7 @@ static int cgid_handler(request_rec *r)
apr_brigade_cleanup(bb);
}
while (!seen_eos);
-
+
if (conf->logname) {
dbuf[dbpos] = '\0';
}
@@ -1452,11 +1452,11 @@ static int cgid_handler(request_rec *r)
*/
shutdown(sd, 1);
- /* Handle script return... */
- if (!nph) {
- const char *location;
- char sbuf[MAX_STRING_LEN];
- int ret;
+ /* Handle script return... */
+ if (!nph) {
+ const char *location;
+ char sbuf[MAX_STRING_LEN];
+ int ret;
bb = apr_brigade_create(r->pool, c->bucket_alloc);
b = apr_bucket_pipe_create(tempsock, c->bucket_alloc);
@@ -1464,47 +1464,47 @@ static int cgid_handler(request_rec *r)
b = apr_bucket_eos_create(c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, b);
- if ((ret = ap_scan_script_header_err_brigade(r, bb, sbuf))) {
- return log_script(r, conf, ret, dbuf, sbuf, bb, NULL);
- }
+ if ((ret = ap_scan_script_header_err_brigade(r, bb, sbuf))) {
+ return log_script(r, conf, ret, dbuf, sbuf, bb, NULL);
+ }
- location = apr_table_get(r->headers_out, "Location");
+ location = apr_table_get(r->headers_out, "Location");
- if (location && location[0] == '/' && r->status == 200) {
+ if (location && location[0] == '/' && r->status == 200) {
/* Soak up all the script output */
discard_script_output(bb);
apr_brigade_destroy(bb);
- /* This redirect needs to be a GET no matter what the original
- * method was.
- */
- r->method = apr_pstrdup(r->pool, "GET");
- r->method_number = M_GET;
-
- /* We already read the message body (if any), so don't allow
- * the redirected request to think it has one. We can ignore
- * Transfer-Encoding, since we used REQUEST_CHUNKED_ERROR.
- */
- apr_table_unset(r->headers_in, "Content-Length");
-
- ap_internal_redirect_handler(location, r);
- return OK;
- }
- else if (location && r->status == 200) {
- /* XX Note that if a script wants to produce its own Redirect
- * body, it now has to explicitly *say* "Status: 302"
- */
+ /* This redirect needs to be a GET no matter what the original
+ * method was.
+ */
+ r->method = apr_pstrdup(r->pool, "GET");
+ r->method_number = M_GET;
+
+ /* We already read the message body (if any), so don't allow
+ * the redirected request to think it has one. We can ignore
+ * Transfer-Encoding, since we used REQUEST_CHUNKED_ERROR.
+ */
+ apr_table_unset(r->headers_in, "Content-Length");
+
+ ap_internal_redirect_handler(location, r);
+ return OK;
+ }
+ else if (location && r->status == 200) {
+ /* XX Note that if a script wants to produce its own Redirect
+ * body, it now has to explicitly *say* "Status: 302"
+ */
discard_script_output(bb);
apr_brigade_destroy(bb);
- return HTTP_MOVED_TEMPORARILY;
- }
+ return HTTP_MOVED_TEMPORARILY;
+ }
ap_pass_brigade(r->output_filters, bb);
- }
+ }
if (nph) {
struct ap_filter_t *cur;
-
+
/* get rid of all filters up through protocol... since we
* haven't parsed off the headers, there is no way they can
* work
@@ -1522,10 +1522,10 @@ static int cgid_handler(request_rec *r)
b = apr_bucket_eos_create(c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, b);
ap_pass_brigade(r->output_filters, bb);
- }
+ }
- return OK; /* NOT r->status, even if it has changed. */
-}
+ return OK; /* NOT r->status, even if it has changed. */
+}
@@ -1622,13 +1622,13 @@ static void add_ssi_vars(request_rec *r)
static int include_cmd(include_ctx_t *ctx, ap_filter_t *f,
apr_bucket_brigade *bb, char *command)
{
- char **env;
+ char **env;
int sd;
int retval;
apr_file_t *tempsock = NULL;
request_rec *r = f->r;
cgid_server_conf *conf = ap_get_module_config(r->server->module_config,
- &cgid_module);
+ &cgid_module);
struct cleanup_script_info *info;
add_ssi_vars(r);
@@ -1638,14 +1638,14 @@ static int include_cmd(include_ctx_t *ctx, ap_filter_t *f,
return retval;
}
- send_req(sd, r, command, env, SSI_REQ);
+ send_req(sd, r, command, env, SSI_REQ);
info = apr_palloc(r->pool, sizeof(struct cleanup_script_info));
info->r = r;
info->conn_id = r->connection->id;
info->conf = conf;
/* for this type of request, the script is invoked through an
- * intermediate shell process... cleanup_script is only able
+ * intermediate shell process... cleanup_script is only able
* to knock out the shell process, not the actual script
*/
apr_pool_cleanup_register(r->pool, info,
@@ -1761,13 +1761,13 @@ static void register_hook(apr_pool_t *p)
ap_hook_handler(cgid_handler, NULL, NULL, APR_HOOK_MIDDLE);
}
-module AP_MODULE_DECLARE_DATA cgid_module = {
- STANDARD20_MODULE_STUFF,
- NULL, /* dir config creater */
- NULL, /* dir merger --- default is to override */
- create_cgid_config, /* server config */
- merge_cgid_config, /* merge server config */
- cgid_cmds, /* command table */
- register_hook /* register_handlers */
-};
+module AP_MODULE_DECLARE_DATA cgid_module = {
+ STANDARD20_MODULE_STUFF,
+ NULL, /* dir config creater */
+ NULL, /* dir merger --- default is to override */
+ create_cgid_config, /* server config */
+ merge_cgid_config, /* merge server config */
+ cgid_cmds, /* command table */
+ register_hook /* register_handlers */
+};
diff --git a/modules/generators/mod_info.c b/modules/generators/mod_info.c
index a944c380b9..f34972e24d 100644
--- a/modules/generators/mod_info.c
+++ b/modules/generators/mod_info.c
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-/*
+/*
* Info Module. Display configuration information for the server and
* all included modules.
*
@@ -29,15 +29,15 @@
* GET /server-info?config - Returns full configuration
* GET /server-info?hooks - Returns a listing of the modules active for each hook
*
- * Original Author:
+ * Original Author:
* Rasmus Lerdorf <rasmus vex.net>, May 1996
*
- * Modified By:
+ * Modified By:
* Lou Langholtz <ldl usi.utah.edu>, July 1997
*
* Apache 2.0 Port:
* Ryan Morgan <rmorgan covalent.net>, August 2000
- *
+ *
*/
@@ -220,7 +220,7 @@ typedef struct
* hook_get_t is a pointer to a function that takes void as an argument and
* returns a pointer to an apr_array_header_t. The nasty WIN32 ifdef
* is required to account for the fact that the ap_hook* calls all use
- * STDCALL calling convention.
+ * STDCALL calling convention.
*/
typedef apr_array_header_t *(
#ifdef WIN32
@@ -387,8 +387,8 @@ static int show_server_settings(request_rec * r)
ap_rputs("<dt><strong>Server Built With:</strong>\n"
"<tt style=\"white-space: pre;\">\n", r);
- /* TODO: Not all of these defines are getting set like they do in main.c.
- * Missing some headers?
+ /* TODO: Not all of these defines are getting set like they do in main.c.
+ * Missing some headers?
*/
#ifdef BIG_SECURITY_HOLE
diff --git a/modules/generators/mod_status.c b/modules/generators/mod_status.c
index 6f28d024a3..cf121a434d 100644
--- a/modules/generators/mod_status.c
+++ b/modules/generators/mod_status.c
@@ -233,7 +233,7 @@ static int status_handler(request_rec *r)
clock_t tu, ts, tcu, tcs;
ap_generation_t worker_generation;
- if (strcmp(r->handler, STATUS_MAGIC_TYPE) &&
+ if (strcmp(r->handler, STATUS_MAGIC_TYPE) &&
strcmp(r->handler, "server-status")) {
return DECLINED;
}
@@ -288,7 +288,7 @@ static int status_handler(request_rec *r)
+ 1) > 0)
apr_table_set(r->headers_out,
status_options[i].hdr_out_str,
- loc +
+ loc +
strlen(status_options[i].hdr_out_str) +
1);
else
@@ -314,7 +314,7 @@ static int status_handler(request_rec *r)
clock_t proc_tu = 0, proc_ts = 0, proc_tcu = 0, proc_tcs = 0;
clock_t tmp_tu, tmp_ts, tmp_tcu, tmp_tcs;
#endif
-
+
ps_record = ap_get_scoreboard_process(i);
for (j = 0; j < thread_limit; ++j) {
int indx = (i * thread_limit) + j;
@@ -574,7 +574,7 @@ static int status_handler(request_rec *r)
req_time = 0L;
else
req_time = (long)
- ((ws_record->stop_time -
+ ((ws_record->stop_time -
ws_record->start_time) / 1000);
if (req_time < 0L)
req_time = 0L;
@@ -593,7 +593,7 @@ static int status_handler(request_rec *r)
worker_pid = ps_record->pid;
worker_generation = ps_record->generation;
}
-
+
if (no_table_report) {
if (ws_record->status == SERVER_DEAD)
ap_rprintf(r,
@@ -607,7 +607,7 @@ static int status_handler(request_rec *r)
i, (int) worker_generation,
worker_pid,
(int)conn_lres, my_lres, lres);
-
+
switch (ws_record->status) {
case SERVER_READY:
ap_rputs("Ready", r);
@@ -646,7 +646,7 @@ static int status_handler(request_rec *r)
ap_rputs("?STATE?", r);
break;
}
-
+
ap_rprintf(r, "] "
#ifdef HAVE_TIMES
"u%g s%g cu%g cs%g"
@@ -692,7 +692,7 @@ static int status_handler(request_rec *r)
worker_pid,
(int)conn_lres,
my_lres, lres);
-
+
switch (ws_record->status) {
case SERVER_READY:
ap_rputs("</td><td>_", r);
@@ -731,7 +731,7 @@ static int status_handler(request_rec *r)
ap_rputs("</td><td>?", r);
break;
}
-
+
ap_rprintf(r,
"\n</td>"
#ifdef HAVE_TIMES
@@ -747,11 +747,11 @@ static int status_handler(request_rec *r)
(long)apr_time_sec(nowtime -
ws_record->last_used),
(long)req_time);
-
+
ap_rprintf(r, "</td><td>%-1.1f</td><td>%-2.2f</td><td>%-2.2f\n",
(float)conn_bytes / KBYTE, (float) my_bytes / MBYTE,
(float)bytes / MBYTE);
-
+
if (ws_record->status == SERVER_BUSY_READ)
ap_rprintf(r,
"</td><td>?</td><td nowrap>?</td><td nowrap>..reading.. </td></tr>\n\n");
@@ -800,11 +800,11 @@ static int status_handler(request_rec *r)
{
/* Run extension hooks to insert extra content. */
- int flags =
- (short_report ? AP_STATUS_SHORT : 0) |
+ int flags =
+ (short_report ? AP_STATUS_SHORT : 0) |
(no_table_report ? AP_STATUS_NOTABLE : 0) |
(ap_extended_status ? AP_STATUS_EXTENDED : 0);
-
+
ap_run_status_hook(r, flags);
}
diff --git a/modules/http/byterange_filter.c b/modules/http/byterange_filter.c
index 06a0167e0f..bf4bd54c10 100644
--- a/modules/http/byterange_filter.c
+++ b/modules/http/byterange_filter.c
@@ -170,29 +170,29 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(ap_filter_t *f,
}
num_ranges = ap_set_byterange(r);
-
+
/* We have nothing to do, get out of the way. */
if (num_ranges == 0) {
ap_remove_output_filter(f);
return ap_pass_brigade(f->next, bb);
}
-
+
ctx = apr_pcalloc(r->pool, sizeof(*ctx));
ctx->num_ranges = num_ranges;
/* create a brigade in case we never call ap_save_brigade() */
ctx->bb = apr_brigade_create(r->pool, c->bucket_alloc);
-
+
if (ctx->num_ranges > 1) {
/* Is ap_make_content_type required here? */
const char *orig_ct = ap_make_content_type(r, r->content_type);
ctx->boundary = apr_psprintf(r->pool, "%" APR_UINT64_T_HEX_FMT "%lx",
(apr_uint64_t)r->request_time, (long) getpid());
-
+
ap_set_content_type(r, apr_pstrcat(r->pool, "multipart",
use_range_x(r) ? "/x-" : "/",
"byteranges; boundary=",
ctx->boundary, NULL));
-
+
ctx->bound_head = apr_pstrcat(r->pool,
CRLF "--", ctx->boundary,
CRLF "Content-type: ",
diff --git a/modules/http/chunk_filter.c b/modules/http/chunk_filter.c
index c5175e6ee3..4bbb27a6bf 100644
--- a/modules/http/chunk_filter.c
+++ b/modules/http/chunk_filter.c
@@ -52,7 +52,7 @@ apr_status_t ap_http_chunk_filter(ap_filter_t *f, apr_bucket_brigade *b)
apr_off_t bytes = 0;
apr_bucket *eos = NULL;
apr_bucket *flush = NULL;
- /* XXX: chunk_hdr must remain at this scope since it is used in a
+ /* XXX: chunk_hdr must remain at this scope since it is used in a
* transient bucket.
*/
char chunk_hdr[20]; /* enough space for the snprintf below */
diff --git a/modules/http/http_core.c b/modules/http/http_core.c
index 6b4c9e6e36..e6d75aecf0 100644
--- a/modules/http/http_core.c
+++ b/modules/http/http_core.c
@@ -54,7 +54,7 @@ static const char *set_keep_alive_timeout(cmd_parms *cmd, void *dummy,
}
static const char *set_keep_alive(cmd_parms *cmd, void *dummy,
- const char *arg)
+ const char *arg)
{
const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
if (err != NULL) {
@@ -110,17 +110,17 @@ static int ap_process_http_async_connection(conn_rec *c)
{
request_rec *r;
conn_state_t *cs = c->cs;
-
+
AP_DEBUG_ASSERT(cs->state == CONN_STATE_READ_REQUEST_LINE);
-
+
while (cs->state == CONN_STATE_READ_REQUEST_LINE) {
ap_update_child_status(c->sbh, SERVER_BUSY_READ, NULL);
-
+
if ((r = ap_read_request(c))) {
c->keepalive = AP_CONN_UNKNOWN;
/* process the request if it was read without error */
-
+
ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, r);
if (r->status == HTTP_OK) {
cs->state = CONN_STATE_HANDLER;
@@ -158,13 +158,13 @@ static int ap_process_http_connection(conn_rec *c)
* Read and process each request found on our connection
* until no requests are left or we decide to close.
*/
-
+
ap_update_child_status(c->sbh, SERVER_BUSY_READ, NULL);
while ((r = ap_read_request(c)) != NULL) {
c->keepalive = AP_CONN_UNKNOWN;
/* process the request if it was read without error */
-
+
ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, r);
if (r->status == HTTP_OK) {
cs->state = CONN_STATE_HANDLER;
@@ -181,9 +181,9 @@ static int ap_process_http_connection(conn_rec *c)
if (c->keepalive != AP_CONN_KEEPALIVE || c->aborted)
break;
-
+
ap_update_child_status(c->sbh, SERVER_BUSY_KEEPALIVE, NULL);
-
+
if (ap_graceful_stop_signalled())
break;
@@ -194,7 +194,7 @@ static int ap_process_http_connection(conn_rec *c)
apr_socket_timeout_set(csd, c->base_server->keep_alive_timeout);
/* Go straight to select() to wait for the next request */
}
-
+
return OK;
}
@@ -219,13 +219,13 @@ static void register_hooks(apr_pool_t *p)
* use a different processing function
*/
int async_mpm = 0;
- if (ap_mpm_query(AP_MPMQ_IS_ASYNC, &async_mpm) == APR_SUCCESS
+ if (ap_mpm_query(AP_MPMQ_IS_ASYNC, &async_mpm) == APR_SUCCESS
&& async_mpm == 1) {
ap_hook_process_connection(ap_process_http_async_connection, NULL,
NULL, APR_HOOK_REALLY_LAST);
}
else {
- ap_hook_process_connection(ap_process_http_connection, NULL, NULL,
+ ap_hook_process_connection(ap_process_http_connection, NULL, NULL,
APR_HOOK_REALLY_LAST);
}
@@ -237,7 +237,7 @@ static void register_hooks(apr_pool_t *p)
ap_register_input_filter("HTTP_IN", ap_http_filter,
NULL, AP_FTYPE_PROTOCOL);
ap_http_header_filter_handle =
- ap_register_output_filter("HTTP_HEADER", ap_http_header_filter,
+ ap_register_output_filter("HTTP_HEADER", ap_http_header_filter,
NULL, AP_FTYPE_PROTOCOL);
ap_chunk_filter_handle =
ap_register_output_filter("CHUNK", ap_http_chunk_filter,
diff --git a/modules/http/http_etag.c b/modules/http/http_etag.c
index 765ee9704f..8cd955decc 100644
--- a/modules/http/http_etag.c
+++ b/modules/http/http_etag.c
@@ -73,7 +73,7 @@ AP_DECLARE(char *) ap_make_etag(request_rec *r, int force_weak)
cfg = (core_dir_config *)ap_get_module_config(r->per_dir_config,
&core_module);
etag_bits = (cfg->etag_bits & (~ cfg->etag_remove)) | cfg->etag_add;
-
+
/*
* If it's a file (or we wouldn't be here) and no ETags
* should be set for files, return an empty string and
@@ -173,7 +173,7 @@ AP_DECLARE(void) ap_set_etag(request_rec *r)
if (!r->vlist_validator) {
etag = ap_make_etag(r, 0);
-
+
/* If we get a blank etag back, don't set the header. */
if (!etag[0]) {
return;
diff --git a/modules/http/http_filters.c b/modules/http/http_filters.c
index 88e180237e..8d65fb8a43 100644
--- a/modules/http/http_filters.c
+++ b/modules/http/http_filters.c
@@ -69,10 +69,10 @@ typedef struct http_filter_ctx {
int eos_sent;
} http_ctx_t;
-/* This is the HTTP_INPUT filter for HTTP requests and responses from
- * proxied servers (mod_proxy). It handles chunked and content-length
+/* This is the HTTP_INPUT filter for HTTP requests and responses from
+ * proxied servers (mod_proxy). It handles chunked and content-length
* bodies. This can only be inserted/used after the headers
- * are successfully parsed.
+ * are successfully parsed.
*/
apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
ap_input_mode_t mode, apr_read_type_e block,
@@ -97,8 +97,8 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
ctx->eos_sent = 0;
/* LimitRequestBody does not apply to proxied responses.
- * Consider implementing this check in its own filter.
- * Would adding a directive to limit the size of proxied
+ * Consider implementing this check in its own filter.
+ * Would adding a directive to limit the size of proxied
* responses be useful?
*/
if (!f->r->proxyreq) {
@@ -144,12 +144,12 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
}
/* If we have a limit in effect and we know the C-L ahead of
- * time, stop it here if it is invalid.
- */
+ * time, stop it here if it is invalid.
+ */
if (ctx->limit && ctx->limit < ctx->remaining) {
apr_bucket_brigade *bb;
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
- "Requested content-length of %" APR_OFF_T_FMT
+ "Requested content-length of %" APR_OFF_T_FMT
" is larger than the configured limit"
" of %" APR_OFF_T_FMT, ctx->remaining, ctx->limit);
bb = apr_brigade_create(f->r->pool, f->c->bucket_alloc);
@@ -183,7 +183,7 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
/* Since we're about to read data, send 100-Continue if needed.
* Only valid on chunked and C-L bodies where the C-L is > 0. */
- if ((ctx->state == BODY_CHUNK ||
+ if ((ctx->state == BODY_CHUNK ||
(ctx->state == BODY_LENGTH && ctx->remaining > 0)) &&
f->r->expecting_100 && f->r->proto_num >= HTTP_VERSION(1,1)) {
char *tmp;
@@ -254,7 +254,7 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
ctx->eos_sent = 1;
return APR_SUCCESS;
}
- }
+ }
}
if (ctx->eos_sent) {
@@ -262,7 +262,7 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
APR_BRIGADE_INSERT_TAIL(b, e);
return APR_SUCCESS;
}
-
+
if (!ctx->remaining) {
switch (ctx->state) {
case BODY_NONE:
@@ -351,7 +351,7 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
ctx->remaining -= totalread;
}
- /* If we have no more bytes remaining on a C-L request,
+ /* If we have no more bytes remaining on a C-L request,
* save the callter a roundtrip to discover EOS.
*/
if (ctx->state == BODY_LENGTH && ctx->remaining == 0) {
@@ -368,7 +368,7 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
if (ctx->limit < ctx->limit_used) {
apr_bucket_brigade *bb;
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
- "Read content-length of %" APR_OFF_T_FMT
+ "Read content-length of %" APR_OFF_T_FMT
" is larger than the configured limit"
" of %" APR_OFF_T_FMT, ctx->limit_used, ctx->limit);
bb = apr_brigade_create(f->r->pool, f->c->bucket_alloc);
@@ -853,11 +853,11 @@ AP_DECLARE_NONSTD(int) ap_send_http_trace(request_rec *r)
/* If configured to accept a body, echo the body */
if (bodylen) {
- b = apr_bucket_pool_create(bodyread, bodylen,
+ b = apr_bucket_pool_create(bodyread, bodylen,
r->pool, bb->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, b);
}
-
+
ap_pass_brigade(r->output_filters, bb);
return DONE;
@@ -953,7 +953,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f,
apr_table_unset(r->headers_out, "Content-Length");
}
- apr_table_setn(r->headers_out, "Content-Type",
+ apr_table_setn(r->headers_out, "Content-Type",
ap_make_content_type(r, r->content_type));
if (r->content_encoding) {
@@ -1094,7 +1094,7 @@ AP_DECLARE(int) ap_discard_request_body(request_rec *r)
if (rv != APR_SUCCESS) {
/* FIXME: If we ever have a mapping from filters (apr_status_t)
* to HTTP error codes, this would be a good place for them.
- *
+ *
* If we received the special case AP_FILTER_ERROR, it means
* that the filters have already handled this error.
* Otherwise, we should assume we have a bad request.
@@ -1174,7 +1174,7 @@ AP_DECLARE(int) ap_discard_request_body(request_rec *r)
* return the length of the input block. When it is done reading, it will
* return 0 if EOF, or -1 if there was an error.
* If an error occurs on input, we force an end to keepalive.
- *
+ *
* This step also sends a 100 Continue response to HTTP/1.1 clients if appropriate.
*/
@@ -1272,11 +1272,11 @@ AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer,
rv = ap_get_brigade(r->input_filters, bb, AP_MODE_READBYTES,
APR_BLOCK_READ, bufsiz);
-
+
/* We lose the failure code here. This is why ap_get_client_block should
* not be used.
*/
- if (rv != APR_SUCCESS) {
+ if (rv != APR_SUCCESS) {
/* if we actually fail here, we want to just return and
* stop trying to read data from the client.
*/
diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c
index 1ee501aea9..46ee7e6eb9 100644
--- a/modules/http/http_protocol.c
+++ b/modules/http/http_protocol.c
@@ -459,7 +459,7 @@ AP_DECLARE(int) ap_method_register(apr_pool_t *p, const char *methname)
if (methname == NULL) {
return M_INVALID;
}
-
+
/* Check if the method was previously registered. If it was
* return the associated method number.
*/
@@ -467,7 +467,7 @@ AP_DECLARE(int) ap_method_register(apr_pool_t *p, const char *methname)
APR_HASH_KEY_STRING);
if (methnum != NULL)
return *methnum;
-
+
if (cur_method_number > METHOD_NUMBER_LAST) {
/* The method registry has run out of dynamically
* assignable method numbers. Log this and return M_INVALID.
@@ -822,9 +822,9 @@ AP_DECLARE(void) ap_set_content_type(request_rec *r, const char *ct)
else if (!r->content_type || strcmp(r->content_type, ct)) {
r->content_type = ct;
- /* Insert filters requested by the AddOutputFiltersByType
- * configuration directive. Content-type filters must be
- * inserted after the content handlers have run because
+ /* Insert filters requested by the AddOutputFiltersByType
+ * configuration directive. Content-type filters must be
+ * inserted after the content handlers have run because
* only then, do we reliably know the content-type.
*/
ap_add_output_filters_by_type(r);
@@ -1107,7 +1107,7 @@ AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error)
*/
r->eos_sent = 0;
- /* and we need to get rid of any RESOURCE filters that might be lurking
+ /* and we need to get rid of any RESOURCE filters that might be lurking
* around, thinking they are in the middle of the original request
*/
@@ -1196,11 +1196,11 @@ AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error)
* as a text message, so first check the custom response
* string to ensure that it is a text-string (using the
* same test used in ap_die(), i.e. does it start with a ").
- *
- * If it's not a text string, we've got a recursive error or
+ *
+ * If it's not a text string, we've got a recursive error or
* an external redirect. If it's a recursive error, ap_die passes
- * us the second error code so we can write both, and has already
- * backed up to the original error. If it's an external redirect,
+ * us the second error code so we can write both, and has already
+ * backed up to the original error. If it's an external redirect,
* it hasn't happened yet; we may never know if it fails.
*/
if (custom_response[0] == '\"') {
diff --git a/modules/http/http_request.c b/modules/http/http_request.c
index adbf4be883..5ee236e486 100644
--- a/modules/http/http_request.c
+++ b/modules/http/http_request.c
@@ -55,12 +55,12 @@
* Mainline request processing...
*/
-/* XXX A cleaner and faster way to do this might be to pass the request_rec
- * down the filter chain as a parameter. It would need to change for
- * subrequest vs. main request filters; perhaps the subrequest filter could
+/* XXX A cleaner and faster way to do this might be to pass the request_rec
+ * down the filter chain as a parameter. It would need to change for
+ * subrequest vs. main request filters; perhaps the subrequest filter could
* make the switch.
*/
-static void update_r_in_filters(ap_filter_t *f,
+static void update_r_in_filters(ap_filter_t *f,
request_rec *from,
request_rec *to)
{
@@ -103,8 +103,8 @@ AP_DECLARE(void) ap_die(int type, request_rec *r)
if (r_1st_err != r) {
/* The recursive error was caused by an ErrorDocument specifying
* an internal redirect to a bad URI. ap_internal_redirect has
- * changed the filter chains to point to the ErrorDocument's
- * request_rec. Back out those changes so we can safely use the
+ * changed the filter chains to point to the ErrorDocument's
+ * request_rec. Back out those changes so we can safely use the
* original failing request_rec to send the canned error message.
*
* ap_send_error_response gets rid of existing resource filters
@@ -168,7 +168,7 @@ AP_DECLARE(void) ap_die(int type, request_rec *r)
* more informative (than the plain canned) messages to us.
* Propagate them to ErrorDocuments via the ERROR_NOTES variable:
*/
- if ((error_notes = apr_table_get(r->notes,
+ if ((error_notes = apr_table_get(r->notes,
"error-notes")) != NULL) {
apr_table_setn(r->subprocess_env, "ERROR_NOTES", error_notes);
}
@@ -196,7 +196,7 @@ static void check_pipeline(conn_rec *c)
/* ### is zero correct? that means "read one line" */
if (c->keepalive != AP_CONN_CLOSE) {
apr_bucket_brigade *bb = apr_brigade_create(c->pool, c->bucket_alloc);
- if (ap_get_brigade(c->input_filters, bb, AP_MODE_EATCRLF,
+ if (ap_get_brigade(c->input_filters, bb, AP_MODE_EATCRLF,
APR_NONBLOCK_READ, 0) != APR_SUCCESS) {
c->data_in_input_filters = 0; /* we got APR_EOF or an error */
}
@@ -217,15 +217,15 @@ void ap_process_async_request(request_rec *r)
/* Give quick handlers a shot at serving the request on the fast
* path, bypassing all of the other Apache hooks.
*
- * This hook was added to enable serving files out of a URI keyed
- * content cache ( e.g., Mike Abbott's Quick Shortcut Cache,
+ * This hook was added to enable serving files out of a URI keyed
+ * content cache ( e.g., Mike Abbott's Quick Shortcut Cache,
* described here: http://oss.sgi.com/projects/apache/mod_qsc.html )
*
* It may have other uses as well, such as routing requests directly to
* content handlers that have the ability to grok HTTP and do their
- * own access checking, etc (e.g. servlet engines).
- *
- * Use this hook with extreme care and only if you know what you are
+ * own access checking, etc (e.g. servlet engines).
+ *
+ * Use this hook with extreme care and only if you know what you are
* doing.
*/
if (ap_extended_status)
@@ -388,7 +388,7 @@ static request_rec *internal_internal_redirect(const char *new_uri,
ap_add_output_filter_handle(ap_subreq_core_filter_handle,
NULL, new, new->connection);
}
-
+
update_r_in_filters(new->input_filters, r, new);
update_r_in_filters(new->output_filters, r, new);
@@ -517,7 +517,7 @@ AP_DECLARE(void) ap_internal_redirect_handler(const char *new_uri, request_rec *
}
}
-AP_DECLARE(void) ap_allow_methods(request_rec *r, int reset, ...)
+AP_DECLARE(void) ap_allow_methods(request_rec *r, int reset, ...)
{
const char *method;
va_list methods;
diff --git a/modules/http/mod_mime.c b/modules/http/mod_mime.c
index 0937f2eab2..462d792351 100644
--- a/modules/http/mod_mime.c
+++ b/modules/http/mod_mime.c
@@ -16,9 +16,9 @@
/*
* http_mime.c: Sends/gets MIME headers for requests
- *
+ *
* Rob McCool
- *
+ *
*/
#include "apr.h"
@@ -39,16 +39,16 @@
/* XXXX - fix me / EBCDIC
* there was a cludge here which would use its
* own version apr_isascii(). Indicating that
- * on some platforms that might be needed.
+ * on some platforms that might be needed.
*
- * #define OS_ASC(c) (c) -- for mere mortals
+ * #define OS_ASC(c) (c) -- for mere mortals
* or
* #define OS_ASC(c) (ebcdic2ascii[c]) -- for dino's
*
* #define apr_isascii(c) ((OS_ASC(c) & 0x80) == 0)
*/
-/* XXXXX - fix me - See note with NOT_PROXY
+/* XXXXX - fix me - See note with NOT_PROXY
*/
typedef struct attrib_info {
@@ -83,13 +83,13 @@ typedef struct {
char *default_language; /* Language if no AddLanguage ext found */
int multimatch; /* Extensions to include in multiview matching
- * for filenames, e.g. Filters and Handlers
+ * for filenames, e.g. Filters and Handlers
*/
int use_path_info; /* If set to 0, only use filename.
* If set to 1, append PATH_INFO to filename for
* lookups.
* If set to 2, this value is unset and is
- * effectively 0.
+ * effectively 0.
*/
} mime_dir_config;
@@ -170,9 +170,9 @@ static void *overlay_extension_mappings(apr_pool_t *p,
return new_info;
}
-/* Member is the offset within an extension_info of the pointer to reset
+/* Member is the offset within an extension_info of the pointer to reset
*/
-static void remove_items(apr_pool_t *p, apr_array_header_t *remove,
+static void remove_items(apr_pool_t *p, apr_array_header_t *remove,
apr_hash_t *mappings)
{
attrib_info *suffix = (attrib_info *) remove->elts;
@@ -184,7 +184,7 @@ static void remove_items(apr_pool_t *p, apr_array_header_t *remove,
if (exinfo && *(const char**)((char *)exinfo + suffix[i].offset)) {
extension_info *copyinfo = exinfo;
exinfo = (extension_info*)apr_palloc(p, sizeof(*exinfo));
- apr_hash_set(mappings, suffix[i].name,
+ apr_hash_set(mappings, suffix[i].name,
APR_HASH_KEY_STRING, exinfo);
memcpy(exinfo, copyinfo, sizeof(*exinfo));
*(const char**)((char *)exinfo + suffix[i].offset) = NULL;
@@ -243,7 +243,7 @@ static void *merge_mime_dir_configs(apr_pool_t *p, void *basev, void *addv)
return new;
}
-static const char *add_extension_info(cmd_parms *cmd, void *m_,
+static const char *add_extension_info(cmd_parms *cmd, void *m_,
const char *value_, const char* ext)
{
mime_dir_config *m=m_;
@@ -279,7 +279,7 @@ static const char *add_extension_info(cmd_parms *cmd, void *m_,
* This keeps the association from being inherited, but not
* from being re-added at a subordinate level.
*/
-static const char *remove_extension_info(cmd_parms *cmd, void *m_,
+static const char *remove_extension_info(cmd_parms *cmd, void *m_,
const char *ext)
{
mime_dir_config *m = (mime_dir_config *) m_;
@@ -309,7 +309,7 @@ static const char *set_types_config(cmd_parms *cmd, void *dummy,
return NULL;
}
-static const char *multiviews_match(cmd_parms *cmd, void *m_,
+static const char *multiviews_match(cmd_parms *cmd, void *m_,
const char *include)
{
mime_dir_config *m = (mime_dir_config *) m_;
@@ -329,14 +329,14 @@ static const char *multiviews_match(cmd_parms *cmd, void *m_,
m->multimatch |= MULTIMATCH_NEGOTIATED;
}
else if (strcasecmp(include, "Filters") == 0) {
- if (m->multimatch && (m->multimatch & (MULTIMATCH_NEGOTIATED
+ if (m->multimatch && (m->multimatch & (MULTIMATCH_NEGOTIATED
| MULTIMATCH_ANY))) {
return "Filters is incompatible with Any and NegotiatedOnly";
}
m->multimatch |= MULTIMATCH_FILTERS;
}
else if (strcasecmp(include, "Handlers") == 0) {
- if (m->multimatch && (m->multimatch & (MULTIMATCH_NEGOTIATED
+ if (m->multimatch && (m->multimatch & (MULTIMATCH_NEGOTIATED
| MULTIMATCH_ANY))) {
return "Handlers is incompatible with Any and NegotiatedOnly";
}
@@ -351,54 +351,54 @@ static const char *multiviews_match(cmd_parms *cmd, void *m_,
static const command_rec mime_cmds[] =
{
- AP_INIT_ITERATE2("AddCharset", add_extension_info,
+ AP_INIT_ITERATE2("AddCharset", add_extension_info,
(void *)APR_OFFSETOF(extension_info, charset_type), OR_FILEINFO,
"a charset (e.g., iso-2022-jp), followed by one or more "
"file extensions"),
- AP_INIT_ITERATE2("AddEncoding", add_extension_info,
+ AP_INIT_ITERATE2("AddEncoding", add_extension_info,
(void *)APR_OFFSETOF(extension_info, encoding_type), OR_FILEINFO,
"an encoding (e.g., gzip), followed by one or more file extensions"),
- AP_INIT_ITERATE2("AddHandler", add_extension_info,
+ AP_INIT_ITERATE2("AddHandler", add_extension_info,
(void *)APR_OFFSETOF(extension_info, handler), OR_FILEINFO,
"a handler name followed by one or more file extensions"),
- AP_INIT_ITERATE2("AddInputFilter", add_extension_info,
+ AP_INIT_ITERATE2("AddInputFilter", add_extension_info,
(void *)APR_OFFSETOF(extension_info, input_filters), OR_FILEINFO,
"input filter name (or ; delimited names) followed by one or "
"more file extensions"),
- AP_INIT_ITERATE2("AddLanguage", add_extension_info,
+ AP_INIT_ITERATE2("AddLanguage", add_extension_info,
(void *)APR_OFFSETOF(extension_info, language_type), OR_FILEINFO,
"a language (e.g., fr), followed by one or more file extensions"),
- AP_INIT_ITERATE2("AddOutputFilter", add_extension_info,
- (void *)APR_OFFSETOF(extension_info, output_filters), OR_FILEINFO,
+ AP_INIT_ITERATE2("AddOutputFilter", add_extension_info,
+ (void *)APR_OFFSETOF(extension_info, output_filters), OR_FILEINFO,
"output filter name (or ; delimited names) followed by one or "
"more file extensions"),
- AP_INIT_ITERATE2("AddType", add_extension_info,
- (void *)APR_OFFSETOF(extension_info, forced_type), OR_FILEINFO,
+ AP_INIT_ITERATE2("AddType", add_extension_info,
+ (void *)APR_OFFSETOF(extension_info, forced_type), OR_FILEINFO,
"a mime type followed by one or more file extensions"),
AP_INIT_TAKE1("DefaultLanguage", ap_set_string_slot,
(void*)APR_OFFSETOF(mime_dir_config, default_language), OR_FILEINFO,
"language to use for documents with no other language file extension"),
AP_INIT_ITERATE("MultiviewsMatch", multiviews_match, NULL, OR_FILEINFO,
"NegotiatedOnly (default), Handlers and/or Filters, or Any"),
- AP_INIT_ITERATE("RemoveCharset", remove_extension_info,
+ AP_INIT_ITERATE("RemoveCharset", remove_extension_info,
(void *)APR_OFFSETOF(extension_info, charset_type), OR_FILEINFO,
"one or more file extensions"),
- AP_INIT_ITERATE("RemoveEncoding", remove_extension_info,
+ AP_INIT_ITERATE("RemoveEncoding", remove_extension_info,
(void *)APR_OFFSETOF(extension_info, encoding_type), OR_FILEINFO,
"one or more file extensions"),
- AP_INIT_ITERATE("RemoveHandler", remove_extension_info,
+ AP_INIT_ITERATE("RemoveHandler", remove_extension_info,
(void *)APR_OFFSETOF(extension_info, handler), OR_FILEINFO,
"one or more file extensions"),
- AP_INIT_ITERATE("RemoveInputFilter", remove_extension_info,
+ AP_INIT_ITERATE("RemoveInputFilter", remove_extension_info,
(void *)APR_OFFSETOF(extension_info, input_filters), OR_FILEINFO,
"one or more file extensions"),
- AP_INIT_ITERATE("RemoveLanguage", remove_extension_info,
+ AP_INIT_ITERATE("RemoveLanguage", remove_extension_info,
(void *)APR_OFFSETOF(extension_info, language_type), OR_FILEINFO,
"one or more file extensions"),
- AP_INIT_ITERATE("RemoveOutputFilter", remove_extension_info,
+ AP_INIT_ITERATE("RemoveOutputFilter", remove_extension_info,
(void *)APR_OFFSETOF(extension_info, output_filters), OR_FILEINFO,
"one or more file extensions"),
- AP_INIT_ITERATE("RemoveType", remove_extension_info,
+ AP_INIT_ITERATE("RemoveType", remove_extension_info,
(void *)APR_OFFSETOF(extension_info, forced_type), OR_FILEINFO,
"one or more file extensions"),
AP_INIT_TAKE1("TypesConfig", set_types_config, NULL, RSRC_CONF,
@@ -426,15 +426,15 @@ static int mime_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
types_confname = ap_server_root_relative(p, types_confname);
if (!types_confname) {
ap_log_error(APLOG_MARK, APLOG_ERR, APR_EBADPATH, s,
- "Invalid mime types config path %s",
+ "Invalid mime types config path %s",
(const char *)ap_get_module_config(s->module_config,
&mime_module));
return HTTP_INTERNAL_SERVER_ERROR;
}
- if ((status = ap_pcfg_openfile(&f, ptemp, types_confname))
+ if ((status = ap_pcfg_openfile(&f, ptemp, types_confname))
!= APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, status, s,
- "could not open mime types config file %s.",
+ "could not open mime types config file %s.",
types_confname);
return HTTP_INTERNAL_SERVER_ERROR;
}
@@ -781,7 +781,7 @@ static int find_ct(request_rec *r)
ext = ap_getword(r->pool, &fn, '.');
*((const char **)apr_array_push(exception_list)) = ext;
- /* Parse filename extensions which can be in any order
+ /* Parse filename extensions which can be in any order
*/
while (*fn && (ext = ap_getword(r->pool, &fn, '.'))) {
const extension_info *exinfo = NULL;
@@ -848,7 +848,7 @@ static int find_ct(request_rec *r)
}
/* The following extensions are not 'Found'. That is, they don't
* make any contribution to metadata negotation, so they must have
- * been explicitly requested by name.
+ * been explicitly requested by name.
*/
if (exinfo->handler && r->proxyreq == PROXYREQ_NONE) {
r->handler = exinfo->handler;
@@ -862,7 +862,7 @@ static int find_ct(request_rec *r)
*/
if (exinfo->input_filters && r->proxyreq == PROXYREQ_NONE) {
const char *filter, *filters = exinfo->input_filters;
- while (*filters
+ while (*filters
&& (filter = ap_getword(r->pool, &filters, ';'))) {
ap_add_input_filter(filter, NULL, r, r->connection);
}
@@ -872,7 +872,7 @@ static int find_ct(request_rec *r)
}
if (exinfo->output_filters && r->proxyreq == PROXYREQ_NONE) {
const char *filter, *filters = exinfo->output_filters;
- while (*filters
+ while (*filters
&& (filter = ap_getword(r->pool, &filters, ';'))) {
ap_add_output_filter(filter, NULL, r, r->connection);
}
@@ -896,7 +896,7 @@ static int find_ct(request_rec *r)
* skip the notes to alert mod_negotiation we are clueless.
*/
if (found_metadata) {
- apr_table_setn(r->notes, "ap-mime-exceptions-list",
+ apr_table_setn(r->notes, "ap-mime-exceptions-list",
(void *)exception_list);
}
@@ -972,7 +972,7 @@ static void register_hooks(apr_pool_t *p)
{
ap_hook_post_config(mime_post_config,NULL,NULL,APR_HOOK_MIDDLE);
ap_hook_type_checker(find_ct,NULL,NULL,APR_HOOK_MIDDLE);
- /*
+ /*
* this hook seems redundant ... is there any reason a type checker isn't
* allowed to do this already? I'd think that fixups in general would be
* the last opportunity to get the filters right.
diff --git a/modules/ldap/util_ldap.c b/modules/ldap/util_ldap.c
index 3bc2906530..c48235b26a 100644
--- a/modules/ldap/util_ldap.c
+++ b/modules/ldap/util_ldap.c
@@ -16,9 +16,9 @@
/*
* util_ldap.c: LDAP things
- *
+ *
* Original code from auth_ldap module for Apache v1.3:
- * Copyright 1998, 1999 Enbridge Pipelines Inc.
+ * Copyright 1998, 1999 Enbridge Pipelines Inc.
* Copyright 1999-2001 Dave Carrigan
*/
@@ -92,7 +92,7 @@ static void util_ldap_strdup (char **str, const char *newstr)
static int util_ldap_handler(request_rec *r)
{
util_ldap_state_t *st = (util_ldap_state_t *)
- ap_get_module_config(r->server->module_config,
+ ap_get_module_config(r->server->module_config,
&ldap_module);
r->allowed |= (1 << M_GET);
@@ -193,7 +193,7 @@ static apr_status_t uldap_connection_cleanup(void *param)
/* unlock this entry */
uldap_connection_close(ldc);
-
+
}
return APR_SUCCESS;
@@ -206,7 +206,7 @@ static apr_status_t uldap_connection_cleanup(void *param)
*
* Returns LDAP_SUCCESS on success; and an error code on failure
*/
-static int uldap_connection_open(request_rec *r,
+static int uldap_connection_open(request_rec *r,
util_ldap_connection_t *ldc)
{
int rc = 0;
@@ -214,7 +214,7 @@ static int uldap_connection_open(request_rec *r,
int version = LDAP_VERSION3;
apr_ldap_err_t *result = NULL;
struct timeval timeOut = {10,0}; /* 10 second connection timeout */
- util_ldap_state_t *st =
+ util_ldap_state_t *st =
(util_ldap_state_t *)ap_get_module_config(r->server->module_config,
&ldap_module);
@@ -279,7 +279,7 @@ static int uldap_connection_open(request_rec *r,
/* switch on SSL/TLS */
if (APR_LDAP_NONE != ldc->secure) {
- apr_ldap_set_option(ldc->pool, ldc->ldap,
+ apr_ldap_set_option(ldc->pool, ldc->ldap,
APR_LDAP_OPT_TLS, &ldc->secure, &(result));
if (LDAP_SUCCESS != result->rc) {
ldap_unbind_s(ldc->ldap);
@@ -298,7 +298,7 @@ static int uldap_connection_open(request_rec *r,
/*XXX All of the #ifdef's need to be removed once apr-util 1.2 is released */
#ifdef APR_LDAP_OPT_VERIFY_CERT
- apr_ldap_set_option(ldc->pool, ldc->ldap,
+ apr_ldap_set_option(ldc->pool, ldc->ldap,
APR_LDAP_OPT_VERIFY_CERT, &(st->verify_svr_cert), &(result));
#else
#if defined(LDAPSSL_VERIFY_SERVER)
@@ -326,7 +326,7 @@ static int uldap_connection_open(request_rec *r,
if (st->connectionTimeout > 0) {
timeOut.tv_sec = st->connectionTimeout;
}
-
+
if (st->connectionTimeout >= 0) {
rc = apr_ldap_set_option(ldc->pool, ldc->ldap, LDAP_OPT_NETWORK_TIMEOUT,
(void *)&timeOut, &(result));
@@ -337,14 +337,14 @@ static int uldap_connection_open(request_rec *r,
}
#endif
-
+
}
/* loop trying to bind up to 10 times if LDAP_SERVER_DOWN error is
* returned. Break out of the loop on Success or any other error.
*
- * NOTE: Looping is probably not a great idea. If the server isn't
+ * NOTE: Looping is probably not a great idea. If the server isn't
* responding the chances it will respond after a few tries are poor.
* However, the original code looped and it only happens on
* the error condition.
@@ -382,7 +382,7 @@ static int uldap_connection_open(request_rec *r,
*
* Returns 1 on compare failure, 0 otherwise.
*/
-static int compare_client_certs(apr_array_header_t *srcs,
+static int compare_client_certs(apr_array_header_t *srcs,
apr_array_header_t *dests)
{
int i = 0;
@@ -419,20 +419,20 @@ static int compare_client_certs(apr_array_header_t *srcs,
* Find an existing ldap connection struct that matches the
* provided ldap connection parameters.
*
- * If not found in the cache, a new ldc structure will be allocated
- * from st->pool and returned to the caller. If found in the cache,
+ * If not found in the cache, a new ldc structure will be allocated
+ * from st->pool and returned to the caller. If found in the cache,
* a pointer to the existing ldc structure will be returned.
*/
-static util_ldap_connection_t *
+static util_ldap_connection_t *
uldap_connection_find(request_rec *r,
const char *host, int port,
const char *binddn, const char *bindpw,
- deref_options deref, int secure)
+ deref_options deref, int secure)
{
struct util_ldap_connection_t *l, *p; /* To traverse the linked list */
int secureflag = secure;
- util_ldap_state_t *st =
+ util_ldap_state_t *st =
(util_ldap_state_t *)ap_get_module_config(r->server->module_config,
&ldap_module);
@@ -440,7 +440,7 @@ static util_ldap_connection_t *
#if APR_HAS_THREADS
/* mutex lock this function */
if (!st->mutex) {
- apr_thread_mutex_create(&st->mutex, APR_THREAD_MUTEX_DEFAULT,
+ apr_thread_mutex_create(&st->mutex, APR_THREAD_MUTEX_DEFAULT,
st->pool);
}
apr_thread_mutex_lock(st->mutex);
@@ -457,13 +457,13 @@ static util_ldap_connection_t *
#if APR_HAS_THREADS
if (APR_SUCCESS == apr_thread_mutex_trylock(l->lock)) {
#endif
- if ( (l->port == port) && (strcmp(l->host, host) == 0)
- && ((!l->binddn && !binddn) || (l->binddn && binddn
- && !strcmp(l->binddn, binddn)))
- && ((!l->bindpw && !bindpw) || (l->bindpw && bindpw
- && !strcmp(l->bindpw, bindpw)))
- && (l->deref == deref) && (l->secure == secureflag)
- && !compare_client_certs(st->client_certs, l->client_certs))
+ if ( (l->port == port) && (strcmp(l->host, host) == 0)
+ && ((!l->binddn && !binddn) || (l->binddn && binddn
+ && !strcmp(l->binddn, binddn)))
+ && ((!l->bindpw && !bindpw) || (l->bindpw && bindpw
+ && !strcmp(l->bindpw, bindpw)))
+ && (l->deref == deref) && (l->secure == secureflag)
+ && !compare_client_certs(st->client_certs, l->client_certs))
{
break;
}
@@ -486,9 +486,9 @@ static util_ldap_connection_t *
if (APR_SUCCESS == apr_thread_mutex_trylock(l->lock)) {
#endif
- if ((l->port == port) && (strcmp(l->host, host) == 0) &&
+ if ((l->port == port) && (strcmp(l->host, host) == 0) &&
(l->deref == deref) && (l->secure == secureflag) &&
- !compare_client_certs(st->client_certs, l->client_certs))
+ !compare_client_certs(st->client_certs, l->client_certs))
{
/* the bind credentials have changed */
l->bound = 0;
@@ -515,7 +515,7 @@ static util_ldap_connection_t *
*/
if (!l) {
- /*
+ /*
* Add the new connection entry to the linked list. Note that we
* don't actually establish an LDAP connection yet; that happens
* the first time authentication is requested.
@@ -568,18 +568,18 @@ static util_ldap_connection_t *
/*
* Compares two DNs to see if they're equal. The only way to do this correctly
* is to search for the dn and then do ldap_get_dn() on the result. This should
- * match the initial dn, since it would have been also retrieved with
- * ldap_get_dn(). This is expensive, so if the configuration value
+ * match the initial dn, since it would have been also retrieved with
+ * ldap_get_dn(). This is expensive, so if the configuration value
* compare_dn_on_server is false, just does an ordinary strcmp.
*
* The lock for the ldap cache should already be acquired.
*/
-static int uldap_cache_comparedn(request_rec *r, util_ldap_connection_t *ldc,
- const char *url, const char *dn,
+static 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)
{
int result = 0;
- util_url_node_t *curl;
+ util_url_node_t *curl;
util_url_node_t curnode;
util_dn_compare_node_t *node;
util_dn_compare_node_t newnode;
@@ -588,7 +588,7 @@ static int uldap_cache_comparedn(request_rec *r, util_ldap_connection_t *ldc,
char *searchdn;
util_ldap_state_t *st = (util_ldap_state_t *)
- ap_get_module_config(r->server->module_config,
+ ap_get_module_config(r->server->module_config,
&ldap_module);
/* get cache entry (or create one) */
@@ -617,7 +617,7 @@ static int uldap_cache_comparedn(request_rec *r, util_ldap_connection_t *ldc,
if (curl) {
/* no - it's a server side compare */
LDAP_CACHE_LOCK();
-
+
/* is it in the compare cache? */
newnode.reqdn = (char *)reqdn;
node = util_ald_cache_fetch(curl->dn_compare_cache, &newnode);
@@ -628,7 +628,7 @@ static int uldap_cache_comparedn(request_rec *r, util_ldap_connection_t *ldc,
ldc->reason = "DN Comparison TRUE (cached)";
return LDAP_COMPARE_TRUE;
}
-
+
/* unlock this read lock */
LDAP_CACHE_UNLOCK();
}
@@ -647,9 +647,9 @@ start_over:
/* search for reqdn */
if ((result = ldap_search_ext_s(ldc->ldap, (char *)reqdn, LDAP_SCOPE_BASE,
- "(objectclass=*)", NULL, 1,
- NULL, NULL, NULL, -1, &res))
- == LDAP_SERVER_DOWN)
+ "(objectclass=*)", NULL, 1,
+ NULL, NULL, NULL, -1, &res))
+ == LDAP_SERVER_DOWN)
{
ldc->reason = "DN Comparison ldap_search_ext_s() "
"failed with server down";
@@ -677,11 +677,11 @@ start_over:
LDAP_CACHE_LOCK();
newnode.reqdn = (char *)reqdn;
newnode.dn = (char *)dn;
-
+
node = util_ald_cache_fetch(curl->dn_compare_cache, &newnode);
if ( (node == NULL)
- || (strcmp(reqdn, node->reqdn) != 0)
- || (strcmp(dn, node->dn) != 0))
+ || (strcmp(reqdn, node->reqdn) != 0)
+ || (strcmp(dn, node->dn) != 0))
{
util_ald_cache_insert(curl->dn_compare_cache, &newnode);
}
@@ -697,10 +697,10 @@ start_over:
/*
* Does an generic ldap_compare operation. It accepts a cache that it will use
- * to lookup the compare in the cache. We cache two kinds of compares
+ * to lookup the compare in the cache. We cache two kinds of compares
* (require group compares) and (require user compares). Each compare has a different
* cache node: require group includes the DN; require user does not because the
- * require user cache is owned by the
+ * require user cache is owned by the
*
*/
static int uldap_cache_compare(request_rec *r, util_ldap_connection_t *ldc,
@@ -708,7 +708,7 @@ static int uldap_cache_compare(request_rec *r, util_ldap_connection_t *ldc,
const char *attrib, const char *value)
{
int result = 0;
- util_url_node_t *curl;
+ util_url_node_t *curl;
util_url_node_t curnode;
util_compare_node_t *compare_nodep;
util_compare_node_t the_compare_node;
@@ -732,15 +732,15 @@ static int uldap_cache_compare(request_rec *r, util_ldap_connection_t *ldc,
/* make a comparison to the cache */
LDAP_CACHE_LOCK();
curtime = apr_time_now();
-
+
the_compare_node.dn = (char *)dn;
the_compare_node.attrib = (char *)attrib;
the_compare_node.value = (char *)value;
the_compare_node.result = 0;
-
- compare_nodep = util_ald_cache_fetch(curl->compare_cache,
+
+ compare_nodep = util_ald_cache_fetch(curl->compare_cache,
&the_compare_node);
-
+
if (compare_nodep != NULL) {
/* found it... */
if (curtime - compare_nodep->lastcompare > st->compare_cache_ttl) {
@@ -787,7 +787,7 @@ start_over:
(char *)dn,
(char *)attrib,
(char *)value))
- == LDAP_SERVER_DOWN) {
+ == LDAP_SERVER_DOWN) {
/* connection failed - try again */
ldc->reason = "ldap_compare_s() failed with server down";
uldap_connection_unbind(ldc);
@@ -795,7 +795,7 @@ start_over:
}
ldc->reason = "Comparison complete";
- if ((LDAP_COMPARE_TRUE == result) ||
+ if ((LDAP_COMPARE_TRUE == result) ||
(LDAP_COMPARE_FALSE == result) ||
(LDAP_NO_SUCH_ATTRIBUTE == result)) {
if (curl) {
@@ -805,13 +805,13 @@ start_over:
the_compare_node.result = result;
/* If the node doesn't exist then insert it, otherwise just update
- * it with the last results
+ * it with the last results
*/
- compare_nodep = util_ald_cache_fetch(curl->compare_cache,
+ compare_nodep = util_ald_cache_fetch(curl->compare_cache,
&the_compare_node);
- if ( (compare_nodep == NULL)
- || (strcmp(the_compare_node.dn, compare_nodep->dn) != 0)
- || (strcmp(the_compare_node.attrib,compare_nodep->attrib) != 0)
+ if ( (compare_nodep == NULL)
+ || (strcmp(the_compare_node.dn, compare_nodep->dn) != 0)
+ || (strcmp(the_compare_node.attrib,compare_nodep->attrib) != 0)
|| (strcmp(the_compare_node.value, compare_nodep->value) != 0))
{
util_ald_cache_insert(curl->compare_cache, &the_compare_node);
@@ -839,9 +839,9 @@ start_over:
}
static int uldap_cache_checkuserid(request_rec *r, util_ldap_connection_t *ldc,
- const char *url, const char *basedn,
+ const char *url, const char *basedn,
int scope, char **attrs, const char *filter,
- const char *bindpw, const char **binddn,
+ const char *bindpw, const char **binddn,
const char ***retvals)
{
const char **vals = NULL;
@@ -857,14 +857,14 @@ static int uldap_cache_checkuserid(request_rec *r, util_ldap_connection_t *ldc,
util_search_node_t the_search_node;
apr_time_t curtime;
- util_ldap_state_t *st =
+ util_ldap_state_t *st =
(util_ldap_state_t *)ap_get_module_config(r->server->module_config,
&ldap_module);
/* Get the cache node for this url */
LDAP_CACHE_LOCK();
curnode.url = url;
- curl = (util_url_node_t *)util_ald_cache_fetch(st->util_ldap_cache,
+ curl = (util_url_node_t *)util_ald_cache_fetch(st->util_ldap_cache,
&curnode);
if (curl == NULL) {
curl = util_ald_create_caches(st, url);
@@ -874,26 +874,26 @@ static int uldap_cache_checkuserid(request_rec *r, util_ldap_connection_t *ldc,
if (curl) {
LDAP_CACHE_LOCK();
the_search_node.username = filter;
- search_nodep = util_ald_cache_fetch(curl->search_cache,
+ search_nodep = util_ald_cache_fetch(curl->search_cache,
&the_search_node);
if (search_nodep != NULL) {
-
+
/* found entry in search cache... */
curtime = apr_time_now();
-
+
/*
- * Remove this item from the cache if its expired. If the sent
- * password doesn't match the storepassword, the entry will
- * be removed and readded later if the credentials pass
+ * Remove this item from the cache if its expired. If the sent
+ * password doesn't match the storepassword, the entry will
+ * be removed and readded later if the credentials pass
* authentication.
*/
if ((curtime - search_nodep->lastbind) > st->search_cache_ttl) {
/* ...but entry is too old */
util_ald_cache_remove(curl->search_cache, search_nodep);
}
- else if ( (search_nodep->bindpw)
- && (search_nodep->bindpw[0] != '\0')
- && (strcmp(search_nodep->bindpw, bindpw) == 0))
+ else if ( (search_nodep->bindpw)
+ && (search_nodep->bindpw[0] != '\0')
+ && (strcmp(search_nodep->bindpw, bindpw) == 0))
{
/* ...and entry is valid */
*binddn = search_nodep->dn;
@@ -907,7 +907,7 @@ static int uldap_cache_checkuserid(request_rec *r, util_ldap_connection_t *ldc,
LDAP_CACHE_UNLOCK();
}
- /*
+ /*
* At this point, there is no valid cached search, so lets do the search.
*/
@@ -924,10 +924,10 @@ start_over:
/* try do the search */
if ((result = ldap_search_ext_s(ldc->ldap,
- (char *)basedn, scope,
- (char *)filter, attrs, 0,
- NULL, NULL, NULL, -1, &res))
- == LDAP_SERVER_DOWN)
+ (char *)basedn, scope,
+ (char *)filter, attrs, 0,
+ NULL, NULL, NULL, -1, &res))
+ == LDAP_SERVER_DOWN)
{
ldc->reason = "ldap_search_ext_s() for user failed with server down";
uldap_connection_unbind(ldc);
@@ -940,12 +940,12 @@ start_over:
return result;
}
- /*
+ /*
* We should have found exactly one entry; to find a different
* number is an error.
*/
count = ldap_count_entries(ldc->ldap, res);
- if (count != 1)
+ if (count != 1)
{
if (count == 0 )
ldc->reason = "User not found";
@@ -963,7 +963,7 @@ start_over:
*binddn = apr_pstrdup(r->pool, dn);
ldap_memfree(dn);
- /*
+ /*
* A bind to the server with an empty password always succeeds, so
* we check to ensure that the password is not empty. This implies
* that users who actually do have empty passwords will never be
@@ -976,7 +976,7 @@ start_over:
return LDAP_INVALID_CREDENTIALS;
}
- /*
+ /*
* Attempt to bind with the retrieved dn and the password. If the bind
* fails, it means that the password is wrong (the dn obviously
* exists, since we just retrieved it)
@@ -1024,7 +1024,7 @@ start_over:
/* get values */
values = ldap_get_values(ldc->ldap, entry, attrs[i]);
while (values && values[j]) {
- str = str ? apr_pstrcat(r->pool, str, "; ", values[j], NULL)
+ str = str ? apr_pstrcat(r->pool, str, "; ", values[j], NULL)
: apr_pstrdup(r->pool, values[j]);
j++;
}
@@ -1035,7 +1035,7 @@ start_over:
*retvals = vals;
}
- /*
+ /*
* Add the new username to the search cache.
*/
if (curl) {
@@ -1047,13 +1047,13 @@ start_over:
the_search_node.vals = vals;
the_search_node.numvals = numvals;
- /* Search again to make sure that another thread didn't ready insert
- * this node into the cache before we got here. If it does exist then
- * update the lastbind
+ /* Search again to make sure that another thread didn't ready insert
+ * this node into the cache before we got here. If it does exist then
+ * update the lastbind
*/
- search_nodep = util_ald_cache_fetch(curl->search_cache,
+ search_nodep = util_ald_cache_fetch(curl->search_cache,
&the_search_node);
- if ((search_nodep == NULL) ||
+ if ((search_nodep == NULL) ||
(strcmp(*binddn, search_nodep->dn) != 0)) {
/* Nothing in cache, insert new entry */
@@ -1086,8 +1086,8 @@ start_over:
* with password checking removed.
*/
static int uldap_cache_getuserdn(request_rec *r, util_ldap_connection_t *ldc,
- const char *url, const char *basedn,
- int scope, char **attrs, const char *filter,
+ const char *url, const char *basedn,
+ int scope, char **attrs, const char *filter,
const char **binddn, const char ***retvals)
{
const char **vals = NULL;
@@ -1103,14 +1103,14 @@ static int uldap_cache_getuserdn(request_rec *r, util_ldap_connection_t *ldc,
util_search_node_t the_search_node;
apr_time_t curtime;
- util_ldap_state_t *st =
+ util_ldap_state_t *st =
(util_ldap_state_t *)ap_get_module_config(r->server->module_config,
&ldap_module);
/* Get the cache node for this url */
LDAP_CACHE_LOCK();
curnode.url = url;
- curl = (util_url_node_t *)util_ald_cache_fetch(st->util_ldap_cache,
+ curl = (util_url_node_t *)util_ald_cache_fetch(st->util_ldap_cache,
&curnode);
if (curl == NULL) {
curl = util_ald_create_caches(st, url);
@@ -1120,13 +1120,13 @@ static int uldap_cache_getuserdn(request_rec *r, util_ldap_connection_t *ldc,
if (curl) {
LDAP_CACHE_LOCK();
the_search_node.username = filter;
- search_nodep = util_ald_cache_fetch(curl->search_cache,
+ search_nodep = util_ald_cache_fetch(curl->search_cache,
&the_search_node);
if (search_nodep != NULL) {
-
+
/* found entry in search cache... */
curtime = apr_time_now();
-
+
/*
* Remove this item from the cache if its expired.
*/
@@ -1147,7 +1147,7 @@ static int uldap_cache_getuserdn(request_rec *r, util_ldap_connection_t *ldc,
LDAP_CACHE_UNLOCK();
}
- /*
+ /*
* At this point, there is no valid cached search, so lets do the search.
*/
@@ -1165,9 +1165,9 @@ start_over:
/* try do the search */
if ((result = ldap_search_ext_s(ldc->ldap,
(char *)basedn, scope,
- (char *)filter, attrs, 0,
- NULL, NULL, NULL, -1, &res))
- == LDAP_SERVER_DOWN)
+ (char *)filter, attrs, 0,
+ NULL, NULL, NULL, -1, &res))
+ == LDAP_SERVER_DOWN)
{
ldc->reason = "ldap_search_ext_s() for user failed with server down";
uldap_connection_unbind(ldc);
@@ -1180,12 +1180,12 @@ start_over:
return result;
}
- /*
+ /*
* We should have found exactly one entry; to find a different
* number is an error.
*/
count = ldap_count_entries(ldc->ldap, res);
- if (count != 1)
+ if (count != 1)
{
if (count == 0 )
ldc->reason = "User not found";
@@ -1219,7 +1219,7 @@ start_over:
/* get values */
values = ldap_get_values(ldc->ldap, entry, attrs[i]);
while (values && values[j]) {
- str = str ? apr_pstrcat(r->pool, str, "; ", values[j], NULL)
+ str = str ? apr_pstrcat(r->pool, str, "; ", values[j], NULL)
: apr_pstrdup(r->pool, values[j]);
j++;
}
@@ -1230,7 +1230,7 @@ start_over:
*retvals = vals;
}
- /*
+ /*
* Add the new username to the search cache.
*/
if (curl) {
@@ -1242,13 +1242,13 @@ start_over:
the_search_node.vals = vals;
the_search_node.numvals = numvals;
- /* Search again to make sure that another thread didn't ready insert
- * this node into the cache before we got here. If it does exist then
- * update the lastbind
+ /* Search again to make sure that another thread didn't ready insert
+ * this node into the cache before we got here. If it does exist then
+ * update the lastbind
*/
search_nodep = util_ald_cache_fetch(curl->search_cache,
&the_search_node);
- if ((search_nodep == NULL) ||
+ if ((search_nodep == NULL) ||
(strcmp(*binddn, search_nodep->dn) != 0)) {
/* Nothing in cache, insert new entry */
@@ -1273,7 +1273,7 @@ start_over:
}
/*
- * Reports if ssl support is enabled
+ * Reports if ssl support is enabled
*
* 1 = enabled, 0 = not enabled
*/
@@ -1290,28 +1290,28 @@ static int uldap_ssl_supported(request_rec *r)
/* config directives */
-static const char *util_ldap_set_cache_bytes(cmd_parms *cmd, void *dummy,
+static const char *util_ldap_set_cache_bytes(cmd_parms *cmd, void *dummy,
const char *bytes)
{
- util_ldap_state_t *st =
- (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
+ util_ldap_state_t *st =
+ (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
&ldap_module);
st->cache_bytes = atol(bytes);
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
"[%" APR_PID_T_FMT "] ldap cache: Setting shared memory "
- " cache size to %" APR_SIZE_T_FMT " bytes.",
+ " cache size to %" APR_SIZE_T_FMT " bytes.",
getpid(), st->cache_bytes);
return NULL;
}
-static const char *util_ldap_set_cache_file(cmd_parms *cmd, void *dummy,
+static const char *util_ldap_set_cache_file(cmd_parms *cmd, void *dummy,
const char *file)
{
- util_ldap_state_t *st =
- (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
+ util_ldap_state_t *st =
+ (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
&ldap_module);
if (file) {
@@ -1321,34 +1321,34 @@ static const char *util_ldap_set_cache_file(cmd_parms *cmd, void *dummy,
st->cache_file = NULL;
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
- "LDAP cache: Setting shared memory cache file to %s bytes.",
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
+ "LDAP cache: Setting shared memory cache file to %s bytes.",
st->cache_file);
return NULL;
}
-static const char *util_ldap_set_cache_ttl(cmd_parms *cmd, void *dummy,
+static const char *util_ldap_set_cache_ttl(cmd_parms *cmd, void *dummy,
const char *ttl)
{
- util_ldap_state_t *st =
- (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
+ util_ldap_state_t *st =
+ (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
&ldap_module);
st->search_cache_ttl = atol(ttl) * 1000000;
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
"[%" APR_PID_T_FMT "] ldap cache: Setting cache TTL to %ld microseconds.",
getpid(), st->search_cache_ttl);
return NULL;
}
-static const char *util_ldap_set_cache_entries(cmd_parms *cmd, void *dummy,
+static const char *util_ldap_set_cache_entries(cmd_parms *cmd, void *dummy,
const char *size)
{
- util_ldap_state_t *st =
- (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
+ util_ldap_state_t *st =
+ (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
&ldap_module);
@@ -1357,34 +1357,34 @@ static const char *util_ldap_set_cache_entries(cmd_parms *cmd, void *dummy,
st->search_cache_size = 0;
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
"[%" APR_PID_T_FMT "] ldap cache: Setting search cache size to %ld entries.",
getpid(), st->search_cache_size);
return NULL;
}
-static const char *util_ldap_set_opcache_ttl(cmd_parms *cmd, void *dummy,
+static const char *util_ldap_set_opcache_ttl(cmd_parms *cmd, void *dummy,
const char *ttl)
{
- util_ldap_state_t *st =
- (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
+ util_ldap_state_t *st =
+ (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
&ldap_module);
st->compare_cache_ttl = atol(ttl) * 1000000;
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
- "[%" APR_PID_T_FMT "] ldap cache: Setting operation cache TTL to %ld microseconds.",
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
+ "[%" APR_PID_T_FMT "] ldap cache: Setting operation cache TTL to %ld microseconds.",
getpid(), st->compare_cache_ttl);
return NULL;
}
-static const char *util_ldap_set_opcache_entries(cmd_parms *cmd, void *dummy,
+static const char *util_ldap_set_opcache_entries(cmd_parms *cmd, void *dummy,
const char *size)
{
- util_ldap_state_t *st =
- (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
+ util_ldap_state_t *st =
+ (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
&ldap_module);
st->compare_cache_size = atol(size);
@@ -1392,7 +1392,7 @@ static const char *util_ldap_set_opcache_entries(cmd_parms *cmd, void *dummy,
st->compare_cache_size = 0;
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
"[%" APR_PID_T_FMT "] ldap cache: Setting operation cache size to %ld "
"entries.", getpid(), st->compare_cache_size);
@@ -1488,10 +1488,10 @@ static int util_ldap_parse_cert_type(const char *type)
*
* This directive may only be used globally.
*/
-static const char *util_ldap_set_trusted_global_cert(cmd_parms *cmd,
- void *dummy,
- const char *type,
- const char *file,
+static const char *util_ldap_set_trusted_global_cert(cmd_parms *cmd,
+ void *dummy,
+ const char *type,
+ const char *file,
const char *password)
{
util_ldap_state_t *st =
@@ -1539,8 +1539,8 @@ static const char *util_ldap_set_trusted_global_cert(cmd_parms *cmd,
cert->path = ap_server_root_relative(cmd->pool, file);
if (cert->path &&
- ((rv = apr_stat (&finfo, cert->path, APR_FINFO_MIN, cmd->pool))
- != APR_SUCCESS))
+ ((rv = apr_stat (&finfo, cert->path, APR_FINFO_MIN, cmd->pool))
+ != APR_SUCCESS))
{
ap_log_error(APLOG_MARK, APLOG_ERR, rv, cmd->server,
"LDAP: Could not open SSL trusted certificate "
@@ -1562,10 +1562,10 @@ static const char *util_ldap_set_trusted_global_cert(cmd_parms *cmd,
* - certificate file / directory / nickname
* - certificate password (optional)
*/
-static const char *util_ldap_set_trusted_client_cert(cmd_parms *cmd,
- void *config,
- const char *type,
- const char *file,
+static const char *util_ldap_set_trusted_client_cert(cmd_parms *cmd,
+ void *config,
+ const char *type,
+ const char *file,
const char *password)
{
util_ldap_state_t *st =
@@ -1584,7 +1584,7 @@ static const char *util_ldap_set_trusted_client_cert(cmd_parms *cmd,
"not recognised. It should be one "
"of CERT_DER, CERT_BASE64, "
"CERT_NICKNAME, CERT_PFX,"
- "KEY_DER, KEY_BASE64, KEY_PFX",
+ "KEY_DER, KEY_BASE64, KEY_PFX",
type);
}
else if (APR_LDAP_CA_TYPE_DER == cert_type ||
@@ -1611,7 +1611,7 @@ static const char *util_ldap_set_trusted_client_cert(cmd_parms *cmd,
/* add the certificate to the global array */
cert = (apr_ldap_opt_tls_cert_t *)apr_array_push(st->global_certs);
- cert->type = cert_type;
+ cert->type = cert_type;
cert->path = file;
cert->password = password;
@@ -1621,8 +1621,8 @@ static const char *util_ldap_set_trusted_client_cert(cmd_parms *cmd,
cert->path = ap_server_root_relative(cmd->pool, file);
if (cert->path &&
- ((rv = apr_stat (&finfo, cert->path, APR_FINFO_MIN, cmd->pool))
- != APR_SUCCESS))
+ ((rv = apr_stat (&finfo, cert->path, APR_FINFO_MIN, cmd->pool))
+ != APR_SUCCESS))
{
ap_log_error(APLOG_MARK, APLOG_ERR, rv, cmd->server,
"LDAP: Could not open SSL client certificate "
@@ -1639,13 +1639,13 @@ static const char *util_ldap_set_trusted_client_cert(cmd_parms *cmd,
/**
* Set LDAPTrustedMode.
- *
+ *
* This directive sets what encryption mode to use on a connection:
* - None (No encryption)
* - SSL (SSL encryption)
* - STARTTLS (TLS encryption)
- */
-static const char *util_ldap_set_trusted_mode(cmd_parms *cmd, void *dummy,
+ */
+static const char *util_ldap_set_trusted_mode(cmd_parms *cmd, void *dummy,
const char *mode)
{
util_ldap_state_t *st =
@@ -1675,8 +1675,8 @@ static const char *util_ldap_set_trusted_mode(cmd_parms *cmd, void *dummy,
return(NULL);
}
-static const char *util_ldap_set_verify_srv_cert(cmd_parms *cmd,
- void *dummy,
+static const char *util_ldap_set_verify_srv_cert(cmd_parms *cmd,
+ void *dummy,
int mode)
{
util_ldap_state_t *st =
@@ -1684,7 +1684,7 @@ static const char *util_ldap_set_verify_srv_cert(cmd_parms *cmd,
&ldap_module);
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
- "LDAP: SSL verify server certificate - %s",
+ "LDAP: SSL verify server certificate - %s",
mode?"TRUE":"FALSE");
st->verify_svr_cert = mode;
@@ -1693,12 +1693,12 @@ static const char *util_ldap_set_verify_srv_cert(cmd_parms *cmd,
}
-static const char *util_ldap_set_connection_timeout(cmd_parms *cmd,
- void *dummy,
+static const char *util_ldap_set_connection_timeout(cmd_parms *cmd,
+ void *dummy,
const char *ttl)
{
- util_ldap_state_t *st =
- (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
+ util_ldap_state_t *st =
+ (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
&ldap_module);
const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
@@ -1709,7 +1709,7 @@ static const char *util_ldap_set_connection_timeout(cmd_parms *cmd,
#ifdef LDAP_OPT_NETWORK_TIMEOUT
st->connectionTimeout = atol(ttl);
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
"[%" APR_PID_T_FMT "] ldap connection: Setting connection timeout to "
"%ld seconds.", getpid(), st->connectionTimeout);
#else
@@ -1724,7 +1724,7 @@ static const char *util_ldap_set_connection_timeout(cmd_parms *cmd,
static void *util_ldap_create_config(apr_pool_t *p, server_rec *s)
{
- util_ldap_state_t *st =
+ util_ldap_state_t *st =
(util_ldap_state_t *)apr_pcalloc(p, sizeof(util_ldap_state_t));
st->pool = p;
@@ -1746,7 +1746,7 @@ static void *util_ldap_create_config(apr_pool_t *p, server_rec *s)
return st;
}
-static void *util_ldap_merge_config(apr_pool_t *p, void *basev,
+static void *util_ldap_merge_config(apr_pool_t *p, void *basev,
void *overridesv)
{
util_ldap_state_t *st = apr_pcalloc(p, sizeof(util_ldap_state_t));
@@ -1762,11 +1762,11 @@ static void *util_ldap_merge_config(apr_pool_t *p, void *basev,
st->compare_cache_size = base->compare_cache_size;
st->connections = base->connections;
st->ssl_supported = base->ssl_supported;
- st->global_certs = apr_array_append(p, base->global_certs,
+ st->global_certs = apr_array_append(p, base->global_certs,
overrides->global_certs);
- st->client_certs = apr_array_append(p, base->client_certs,
+ st->client_certs = apr_array_append(p, base->client_certs,
overrides->client_certs);
- st->secure = (overrides->secure_set == 0) ? base->secure
+ st->secure = (overrides->secure_set == 0) ? base->secure
: overrides->secure;
return st;
@@ -1778,7 +1778,7 @@ static apr_status_t util_ldap_cleanup_module(void *data)
server_rec *s = data;
util_ldap_state_t *st = (util_ldap_state_t *)ap_get_module_config(
s->module_config, &ldap_module);
-
+
if (st->ssl_supported) {
apr_ldap_ssl_deinit();
}
@@ -1787,7 +1787,7 @@ static apr_status_t util_ldap_cleanup_module(void *data)
}
-static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
+static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
apr_pool_t *ptemp, server_rec *s)
{
apr_status_t result;
@@ -1795,7 +1795,7 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
util_ldap_state_t *st_vhost;
util_ldap_state_t *st = (util_ldap_state_t *)
- ap_get_module_config(s->module_config,
+ ap_get_module_config(s->module_config,
&ldap_module);
void *data;
@@ -1815,7 +1815,7 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
/* If the cache file already exists then delete it. Otherwise we are
* going to run into problems creating the shared memory. */
if (st->cache_file) {
- char *lck_file = apr_pstrcat(st->pool, st->cache_file, ".lck",
+ char *lck_file = apr_pstrcat(st->pool, st->cache_file, ".lck",
NULL);
apr_file_remove(lck_file, ptemp);
}
@@ -1824,8 +1824,8 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
}
#if APR_HAS_SHARED_MEMORY
- /* initializing cache if shared memory size is not zero and we already
- * don't have shm address
+ /* initializing cache if shared memory size is not zero and we already
+ * don't have shm address
*/
if (!st->cache_shm && st->cache_bytes > 0) {
#endif
@@ -1839,13 +1839,13 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
#if APR_HAS_SHARED_MEMORY
if (st->cache_file) {
- st->lock_file = apr_pstrcat(st->pool, st->cache_file, ".lck",
+ st->lock_file = apr_pstrcat(st->pool, st->cache_file, ".lck",
NULL);
}
#endif
- result = apr_global_mutex_create(&st->util_ldap_cache_lock,
- st->lock_file, APR_LOCK_DEFAULT,
+ result = apr_global_mutex_create(&st->util_ldap_cache_lock,
+ st->lock_file, APR_LOCK_DEFAULT,
st->pool);
if (result != APR_SUCCESS) {
return result;
@@ -1854,7 +1854,7 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
#ifdef AP_NEED_SET_MUTEX_PERMS
result = unixd_set_global_mutex_perms(st->util_ldap_cache_lock);
if (result != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, result, s,
+ ap_log_error(APLOG_MARK, APLOG_CRIT, result, s,
"LDAP cache: failed to set mutex permissions");
return result;
}
@@ -1864,16 +1864,16 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
s_vhost = s->next;
while (s_vhost) {
st_vhost = (util_ldap_state_t *)
- ap_get_module_config(s_vhost->module_config,
+ ap_get_module_config(s_vhost->module_config,
&ldap_module);
#if APR_HAS_SHARED_MEMORY
st_vhost->cache_shm = st->cache_shm;
st_vhost->cache_rmm = st->cache_rmm;
st_vhost->cache_file = st->cache_file;
- ap_log_error(APLOG_MARK, APLOG_DEBUG, result, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, result, s,
"LDAP merging Shared Cache conf: shm=0x%pp rmm=0x%pp "
- "for VHOST: %s", st->cache_shm, st->cache_rmm,
+ "for VHOST: %s", st->cache_shm, st->cache_rmm,
s_vhost->server_hostname);
#endif
st_vhost->lock_file = st->lock_file;
@@ -1882,13 +1882,13 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
#if APR_HAS_SHARED_MEMORY
}
else {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"LDAP cache: LDAPSharedCacheSize is zero, disabling "
"shared memory cache");
}
#endif
-
- /* log the LDAP SDK used
+
+ /* log the LDAP SDK used
*/
{
apr_ldap_err_t *result = NULL;
@@ -1899,7 +1899,7 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
}
apr_pool_cleanup_register(p, s, util_ldap_cleanup_module,
- util_ldap_cleanup_module);
+ util_ldap_cleanup_module);
/*
* Initialize SSL support, and log the result for the benefit of the admin.
@@ -1907,9 +1907,9 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
* If SSL is not supported it is not necessarily an error, as the
* application may not want to use it.
*/
- rc = apr_ldap_ssl_init(p,
- NULL,
- 0,
+ rc = apr_ldap_ssl_init(p,
+ NULL,
+ 0,
&(result_err));
if (APR_SUCCESS == rc) {
rc = apr_ldap_set_option(p, NULL, APR_LDAP_OPT_TLS_CERT,
@@ -1923,7 +1923,7 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
}
else {
st->ssl_supported = 0;
- ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"LDAP: SSL support unavailable%s%s",
result_err ? ": " : "",
result_err ? result_err->reason : "");
@@ -1935,12 +1935,12 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
static void util_ldap_child_init(apr_pool_t *p, server_rec *s)
{
apr_status_t sts;
- util_ldap_state_t *st = ap_get_module_config(s->module_config,
+ util_ldap_state_t *st = ap_get_module_config(s->module_config,
&ldap_module);
if (!st->util_ldap_cache_lock) return;
- sts = apr_global_mutex_child_init(&st->util_ldap_cache_lock,
+ sts = apr_global_mutex_child_init(&st->util_ldap_cache_lock,
st->lock_file, p);
if (sts != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_CRIT, sts, s,
@@ -1951,34 +1951,34 @@ static void util_ldap_child_init(apr_pool_t *p, server_rec *s)
}
static const command_rec util_ldap_cmds[] = {
- AP_INIT_TAKE1("LDAPSharedCacheSize", util_ldap_set_cache_bytes,
+ AP_INIT_TAKE1("LDAPSharedCacheSize", util_ldap_set_cache_bytes,
NULL, RSRC_CONF,
"Set the size of the shared memory cache (in bytes). Use "
"0 to disable the shared memory cache. (default: 100000)"),
- AP_INIT_TAKE1("LDAPSharedCacheFile", util_ldap_set_cache_file,
+ AP_INIT_TAKE1("LDAPSharedCacheFile", util_ldap_set_cache_file,
NULL, RSRC_CONF,
"Set the file name for the shared memory cache."),
- AP_INIT_TAKE1("LDAPCacheEntries", util_ldap_set_cache_entries,
+ AP_INIT_TAKE1("LDAPCacheEntries", util_ldap_set_cache_entries,
NULL, RSRC_CONF,
"Set the maximum number of entries that are possible in the "
"LDAP search cache. Use 0 for no limit. "
"-1 disables the cache. (default: 1024)"),
- AP_INIT_TAKE1("LDAPCacheTTL", util_ldap_set_cache_ttl,
+ AP_INIT_TAKE1("LDAPCacheTTL", util_ldap_set_cache_ttl,
NULL, RSRC_CONF,
"Set the maximum time (in seconds) that an item can be "
"cached in the LDAP search cache. Use 0 for no limit. "
"(default 600)"),
- AP_INIT_TAKE1("LDAPOpCacheEntries", util_ldap_set_opcache_entries,
+ AP_INIT_TAKE1("LDAPOpCacheEntries", util_ldap_set_opcache_entries,
NULL, RSRC_CONF,
"Set the maximum number of entries that are possible "
"in the LDAP compare cache. Use 0 for no limit. "
"Use -1 to disable the cache. (default: 1024)"),
- AP_INIT_TAKE1("LDAPOpCacheTTL", util_ldap_set_opcache_ttl,
+ AP_INIT_TAKE1("LDAPOpCacheTTL", util_ldap_set_opcache_ttl,
NULL, RSRC_CONF,
"Set the maximum time (in seconds) that an item is cached "
"in the LDAP operation cache. Use 0 for no limit. "
@@ -2004,17 +2004,17 @@ static const command_rec util_ldap_cmds[] = {
"CERT_NICKNAME, KEY_DER, or KEY_BASE64. Third arg is an "
"optional passphrase if applicable."),
- AP_INIT_TAKE1("LDAPTrustedMode", util_ldap_set_trusted_mode,
+ AP_INIT_TAKE1("LDAPTrustedMode", util_ldap_set_trusted_mode,
NULL, RSRC_CONF,
"Specify the type of security that should be applied to "
"an LDAP connection. One of; NONE, SSL or STARTTLS."),
- AP_INIT_FLAG("LDAPVerifyServerCert", util_ldap_set_verify_srv_cert,
+ AP_INIT_FLAG("LDAPVerifyServerCert", util_ldap_set_verify_srv_cert,
NULL, RSRC_CONF,
"Set to 'ON' requires that the server certificate be verified "
"before a secure LDAP connection can be establish. Default 'ON'"),
- AP_INIT_TAKE1("LDAPConnectionTimeout", util_ldap_set_connection_timeout,
+ AP_INIT_TAKE1("LDAPConnectionTimeout", util_ldap_set_connection_timeout,
NULL, RSRC_CONF,
"Specify the LDAP socket connection timeout in seconds "
"(default: 10)"),
diff --git a/modules/ldap/util_ldap_cache.c b/modules/ldap/util_ldap_cache.c
index c717904fd8..04c52a7040 100644
--- a/modules/ldap/util_ldap_cache.c
+++ b/modules/ldap/util_ldap_cache.c
@@ -16,9 +16,9 @@
/*
* util_ldap_cache.c: LDAP cache things
- *
+ *
* Original code from auth_ldap module for Apache v1.3:
- * Copyright 1998, 1999 Enbridge Pipelines Inc.
+ * Copyright 1998, 1999 Enbridge Pipelines Inc.
* Copyright 1999-2001 Dave Carrigan
*/
@@ -100,14 +100,14 @@ void util_ldap_url_node_display(request_rec *r, util_ald_cache_t *cache, void *n
type_str = "DN Compares";
break;
}
-
+
if (cache_node->marktime) {
apr_ctime(date_str, cache_node->marktime);
}
- else
+ else
date_str[0] = 0;
- ap_rprintf(r,
+ ap_rprintf(r,
"<tr valign='top'>"
"<td nowrap>%s (%s)</td>"
"<td nowrap>%ld</td>"
@@ -299,7 +299,7 @@ void util_ldap_compare_node_display(request_rec *r, util_ald_cache_t *cache, voi
cmp_result = apr_itoa(r->pool, node->result);
}
- ap_rprintf(r,
+ ap_rprintf(r,
"<tr valign='top'>"
"<td nowrap>%s</td>"
"<td nowrap>%s</td>"
@@ -360,7 +360,7 @@ void util_ldap_dn_compare_node_display(request_rec *r, util_ald_cache_t *cache,
{
util_dn_compare_node_t *node = n;
- ap_rprintf(r,
+ ap_rprintf(r,
"<tr valign='top'>"
"<td nowrap>%s</td>"
"<td nowrap>%s</td>"
@@ -412,8 +412,8 @@ apr_status_t util_ldap_cache_init(apr_pool_t *pool, util_ldap_state_t *st)
size = apr_shm_size_get(st->cache_shm);
/* This will create a rmm "handler" to get into the shared memory area */
- result = apr_rmm_init(&st->cache_rmm, NULL,
- apr_shm_baseaddr_get(st->cache_shm), size,
+ result = apr_rmm_init(&st->cache_rmm, NULL,
+ apr_shm_baseaddr_get(st->cache_shm), size,
st->pool);
if (result != APR_SUCCESS) {
return result;
diff --git a/modules/ldap/util_ldap_cache_mgr.c b/modules/ldap/util_ldap_cache_mgr.c
index 48018d1973..ad42ddbd0b 100644
--- a/modules/ldap/util_ldap_cache_mgr.c
+++ b/modules/ldap/util_ldap_cache_mgr.c
@@ -16,9 +16,9 @@
/*
* util_ldap_cache_mgr.c: LDAP cache manager things
- *
+ *
* Original code from auth_ldap module for Apache v1.3:
- * Copyright 1998, 1999 Enbridge Pipelines Inc.
+ * Copyright 1998, 1999 Enbridge Pipelines Inc.
* Copyright 1999-2001 Dave Carrigan
*/
@@ -138,7 +138,7 @@ const char *util_ald_strdup(util_ald_cache_t *cache, const char *s)
/*
* Computes the hash on a set of strings. The first argument is the number
- * of strings to hash, the rest of the args are strings.
+ * of strings to hash, the rest of the args are strings.
* Algorithm taken from glibc.
*/
unsigned long util_ald_hash_string(int nstr, ...)
@@ -147,7 +147,7 @@ unsigned long util_ald_hash_string(int nstr, ...)
va_list args;
unsigned long h=0, g;
char *str, *p;
-
+
va_start(args, nstr);
for (i=0; i < nstr; ++i) {
str = va_arg(args, char *);
@@ -204,8 +204,8 @@ void util_ald_cache_purge(util_ald_cache_t *cache)
}
t = apr_time_now();
- cache->avg_purgetime =
- ((t - cache->last_purge) + (cache->avg_purgetime * (cache->numpurges-1))) /
+ cache->avg_purgetime =
+ ((t - cache->last_purge) + (cache->avg_purgetime * (cache->numpurges-1))) /
cache->numpurges;
}
@@ -265,7 +265,7 @@ util_url_node_t *util_ald_create_caches(util_ldap_state_t *st, 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 *),
@@ -365,7 +365,7 @@ void *util_ald_cache_fetch(util_ald_cache_t *cache, void *payload)
cache->fetches++;
hashval = (*cache->hash)(payload) % cache->size;
- for (p = cache->nodes[hashval];
+ for (p = cache->nodes[hashval];
p && !(*cache->compare)(p->payload, payload);
p = p->next) ;
@@ -379,7 +379,7 @@ void *util_ald_cache_fetch(util_ald_cache_t *cache, void *payload)
}
/*
- * Insert an item into the cache.
+ * Insert an item into the cache.
* *** Does not catch duplicates!!! ***
*/
void *util_ald_cache_insert(util_ald_cache_t *cache, void *payload)
@@ -435,7 +435,7 @@ void util_ald_cache_remove(util_ald_cache_t *cache, void *payload)
{
unsigned long hashval;
util_cache_node_t *p, *q;
-
+
if (cache == NULL)
return;
@@ -491,7 +491,7 @@ char *util_ald_cache_display_stats(request_rec *r, util_ald_cache_t *cache, char
chainlen = nchains? (double)totchainlen / (double)nchains : 0;
if (id) {
- buf2 = apr_psprintf(p,
+ buf2 = apr_psprintf(p,
"<a href=\"%s?%s\">%s</a>",
r->uri,
id,
@@ -501,7 +501,7 @@ char *util_ald_cache_display_stats(request_rec *r, util_ald_cache_t *cache, char
buf2 = name;
}
- buf = apr_psprintf(p,
+ buf = apr_psprintf(p,
"<tr valign='top'>"
"<td nowrap>%s</td>"
"<td align='right' nowrap>%lu (%.0f%% full)</td>"
@@ -510,7 +510,7 @@ char *util_ald_cache_display_stats(request_rec *r, util_ald_cache_t *cache, char
"<td align='right'>%.0f%%</td>"
"<td align='right'>%lu/%lu</td>",
buf2,
- cache->numentries,
+ cache->numentries,
(double)cache->numentries / (double)cache->maxentries * 100.0,
chainlen,
cache->hits,
@@ -526,13 +526,13 @@ char *util_ald_cache_display_stats(request_rec *r, util_ald_cache_t *cache, char
buf = apr_psprintf(p,
"%s"
"<td align='right'>%lu</td>\n"
- "<td align='right' nowrap>%s</td>\n",
+ "<td align='right' nowrap>%s</td>\n",
buf,
cache->numpurges,
str_ctime);
}
else {
- buf = apr_psprintf(p,
+ buf = apr_psprintf(p,
"%s<td colspan='2' align='center'>(none)</td>\n",
buf);
}
@@ -585,10 +585,10 @@ char *util_ald_cache_display(request_rec *r, util_ldap_state_t *st)
"</tr>\n"
"</table>\n</p>\n",
buf,
- cachetype[0] == 'm'? "Main" :
- (cachetype[0] == 's' ? "Search" :
+ cachetype[0] == 'm'? "Main" :
+ (cachetype[0] == 's' ? "Search" :
(cachetype[0] == 'c' ? "Compares" : "DNCompares")));
-
+
switch (cachetype[0]) {
case 'm':
if (util_ldap_cache->marktime) {
@@ -645,7 +645,7 @@ char *util_ald_cache_display(request_rec *r, util_ldap_state_t *st)
}
}
ap_rputs("</table>\n</p>\n", r);
-
+
break;
case 's':
@@ -660,7 +660,7 @@ char *util_ald_cache_display(request_rec *r, util_ldap_state_t *st)
if (n) {
for (i=0; i < n->search_cache->size; ++i) {
for (p = n->search_cache->nodes[i]; p != NULL; p = p->next) {
-
+
(*n->search_cache->display)(r, n->search_cache, p->payload);
}
}
@@ -681,7 +681,7 @@ char *util_ald_cache_display(request_rec *r, util_ldap_state_t *st)
if (n) {
for (i=0; i < n->compare_cache->size; ++i) {
for (p = n->compare_cache->nodes[i]; p != NULL; p = p->next) {
-
+
(*n->compare_cache->display)(r, n->compare_cache, p->payload);
}
}
@@ -699,7 +699,7 @@ char *util_ald_cache_display(request_rec *r, util_ldap_state_t *st)
if (n) {
for (i=0; i < n->dn_compare_cache->size; ++i) {
for (p = n->dn_compare_cache->nodes[i]; p != NULL; p = p->next) {
-
+
(*n->dn_compare_cache->display)(r, n->dn_compare_cache, p->payload);
}
}
@@ -732,19 +732,19 @@ char *util_ald_cache_display(request_rec *r, util_ldap_state_t *st)
id1 = apr_psprintf(pool, argfmt, "main", 0, 0);
buf = util_ald_cache_display_stats(r, st->util_ldap_cache, "LDAP URL Cache", id1);
-
+
for (i=0; i < util_ldap_cache->size; ++i) {
for (p = util_ldap_cache->nodes[i],j=0; p != NULL; p = p->next,j++) {
-
+
n = (util_url_node_t *)p->payload;
-
+
t1 = apr_psprintf(pool, "%s (Searches)", n->url);
t2 = apr_psprintf(pool, "%s (Compares)", n->url);
t3 = apr_psprintf(pool, "%s (DNCompares)", n->url);
id1 = apr_psprintf(pool, argfmt, "srch", i, j);
id2 = apr_psprintf(pool, argfmt, "cmpr", i, j);
id3 = apr_psprintf(pool, argfmt, "dncp", i, j);
-
+
buf = apr_psprintf(pool, "%s\n\n"
"%s\n\n"
"%s\n\n"
diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c
index 268096ff58..629a1e79e9 100644
--- a/modules/loggers/mod_log_config.c
+++ b/modules/loggers/mod_log_config.c
@@ -45,7 +45,7 @@
* the VirtualHost will _not_ be used. This makes this module compatable
* with the CLF and config log modules, where the use of TransferLog
* inside the VirtualHost section overrides its use outside.
- *
+ *
* Examples:
*
* TransferLog logs/access_log
@@ -176,20 +176,20 @@ static int xfer_flags = (APR_WRITE | APR_APPEND | APR_CREATE | APR_LARGEFILE);
static apr_fileperms_t xfer_perms = APR_OS_DEFAULT;
static apr_hash_t *log_hash;
static apr_status_t ap_default_log_writer(request_rec *r,
- void *handle,
+ void *handle,
const char **strs,
int *strl,
int nelts,
apr_size_t len);
static apr_status_t ap_buffered_log_writer(request_rec *r,
- void *handle,
+ void *handle,
const char **strs,
int *strl,
int nelts,
apr_size_t len);
-static void *ap_default_log_writer_init(apr_pool_t *p, server_rec *s,
+static void *ap_default_log_writer_init(apr_pool_t *p, server_rec *s,
const char* name);
-static void *ap_buffered_log_writer_init(apr_pool_t *p, server_rec *s,
+static void *ap_buffered_log_writer_init(apr_pool_t *p, server_rec *s,
const char* name);
static ap_log_writer_init* ap_log_set_writer_init(ap_log_writer_init *handle);
@@ -242,10 +242,10 @@ typedef struct {
* be NULL, which means this module does no logging for this
* request. format might be NULL, in which case the default_format
* from the multi_log_state should be used, or if that is NULL as
- * well, use the CLF.
+ * well, use the CLF.
* log_writer is NULL before the log file is opened and is
* set to a opaque structure (usually a fd) after it is opened.
-
+
*/
typedef struct {
apr_file_t *handle;
@@ -507,7 +507,7 @@ static const char *log_cookie(request_rec *r, char *a)
start_cookie += strlen(a) + 1; /* cookie_name + '=' */
cookie = apr_pstrdup(r->pool, start_cookie);
/* kill everything in cookie after ';' */
- end_cookie = strchr(cookie, ';');
+ end_cookie = strchr(cookie, ';');
if (end_cookie) {
*end_cookie = '\0';
}
@@ -619,7 +619,7 @@ static const char *log_request_duration(request_rec *r, char *a)
static const char *log_request_duration_microseconds(request_rec *r, char *a)
{
- return apr_psprintf(r->pool, "%" APR_TIME_T_FMT,
+ return apr_psprintf(r->pool, "%" APR_TIME_T_FMT,
(apr_time_now() - r->request_time));
}
@@ -675,7 +675,7 @@ static const char *log_connection_status(request_rec *r, char *a)
if (r->connection->aborted)
return "X";
- if (r->connection->keepalive == AP_CONN_KEEPALIVE &&
+ if (r->connection->keepalive == AP_CONN_KEEPALIVE &&
(!r->server->keep_alive_max ||
(r->server->keep_alive_max - r->connection->keepalives) > 0)) {
return "+";
@@ -767,7 +767,7 @@ static char *parse_log_item(apr_pool_t *p, log_format_item *it, const char **sa)
it->arg = "%";
it->func = constant_item;
*sa = ++s;
-
+
return NULL;
}
@@ -1153,10 +1153,10 @@ static config_log_state *open_config_log(server_rec *s, apr_pool_t *p,
if (cls->fname == NULL) {
return cls; /* Leave it NULL to decline. */
}
-
+
cls->log_writer = log_writer_init(p, s, cls->fname);
if (cls->log_writer == NULL)
- return NULL;
+ return NULL;
return cls;
}
@@ -1175,7 +1175,7 @@ static int open_multi_logs(server_rec *s, apr_pool_t *p)
if (format) {
mls->default_format = parse_log_string(p, format, &dummy);
}
- }
+ }
if (!mls->default_format) {
mls->default_format = parse_log_string(p, DEFAULT_LOG_FORMAT, &dummy);
@@ -1233,7 +1233,7 @@ static apr_status_t flush_all_logs(void *data)
if (!buffered_logs)
return APR_SUCCESS;
-
+
for (; s; s = s->next) {
mls = ap_get_module_config(s->module_config, &log_config_module);
log_list = NULL;
@@ -1288,12 +1288,12 @@ static void init_child(apr_pool_t *p, server_rec *s)
if (buffered_logs) {
int i;
buffered_log **array = (buffered_log **)all_buffered_logs->elts;
-
+
apr_pool_cleanup_register(p, s, flush_all_logs, flush_all_logs);
for (i = 0; i < all_buffered_logs->nelts; i++) {
buffered_log *this = array[i];
-
+
#if APR_HAS_THREADS
if (mpm_threads > 1) {
apr_status_t rv;
@@ -1318,7 +1318,7 @@ static void init_child(apr_pool_t *p, server_rec *s)
}
}
-static void ap_register_log_handler(apr_pool_t *p, char *tag,
+static void ap_register_log_handler(apr_pool_t *p, char *tag,
ap_log_handler_fn_t *handler, int def)
{
ap_log_handler *log_struct = apr_palloc(p, sizeof(*log_struct));
@@ -1329,7 +1329,7 @@ static void ap_register_log_handler(apr_pool_t *p, char *tag,
}
static ap_log_writer_init* ap_log_set_writer_init(ap_log_writer_init *handle)
{
- ap_log_writer_init *old = log_writer_init;
+ ap_log_writer_init *old = log_writer_init;
log_writer_init = handle;
return old;
@@ -1337,14 +1337,14 @@ static ap_log_writer_init* ap_log_set_writer_init(ap_log_writer_init *handle)
}
static ap_log_writer *ap_log_set_writer(ap_log_writer *handle)
{
- ap_log_writer *old = log_writer;
+ ap_log_writer *old = log_writer;
log_writer = handle;
return old;
}
static apr_status_t ap_default_log_writer( request_rec *r,
- void *handle,
+ void *handle,
const char **strs,
int *strl,
int nelts,
@@ -1367,7 +1367,7 @@ static apr_status_t ap_default_log_writer( request_rec *r,
return rv;
}
-static void *ap_default_log_writer_init(apr_pool_t *p, server_rec *s,
+static void *ap_default_log_writer_init(apr_pool_t *p, server_rec *s,
const char* name)
{
if (*name == '|') {
@@ -1398,13 +1398,13 @@ static void *ap_default_log_writer_init(apr_pool_t *p, server_rec *s,
return fd;
}
}
-static void *ap_buffered_log_writer_init(apr_pool_t *p, server_rec *s,
+static void *ap_buffered_log_writer_init(apr_pool_t *p, server_rec *s,
const char* name)
{
buffered_log *b;
b = apr_pcalloc(p, sizeof(buffered_log));
b->handle = ap_default_log_writer_init(p, s, name);
-
+
if (b->handle) {
*(buffered_log **)apr_array_push(all_buffered_logs) = b;
return b;
@@ -1413,7 +1413,7 @@ static void *ap_buffered_log_writer_init(apr_pool_t *p, server_rec *s,
return NULL;
}
static apr_status_t ap_buffered_log_writer(request_rec *r,
- void *handle,
+ void *handle,
const char **strs,
int *strl,
int nelts,
@@ -1443,7 +1443,7 @@ static apr_status_t ap_buffered_log_writer(request_rec *r,
}
w = len;
rv = apr_file_write(buf->handle, str, &w);
-
+
}
else {
for (i = 0, s = &buf->outbuf[buf->outcnt]; i < nelts; ++i) {
@@ -1461,7 +1461,7 @@ static apr_status_t ap_buffered_log_writer(request_rec *r,
static int log_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp)
{
static APR_OPTIONAL_FN_TYPE(ap_register_log_handler) *log_pfn_register;
-
+
log_pfn_register = APR_RETRIEVE_OPTIONAL_FN(ap_register_log_handler);
if (log_pfn_register) {
@@ -1504,12 +1504,12 @@ static void register_hooks(apr_pool_t *p)
ap_hook_open_logs(init_config_log,NULL,NULL,APR_HOOK_MIDDLE);
ap_hook_log_transaction(multi_log_transaction,NULL,NULL,APR_HOOK_MIDDLE);
- /* Init log_hash before we register the optional function. It is
+ /* Init log_hash before we register the optional function. It is
* possible for the optional function, ap_register_log_handler,
* to be called before any other mod_log_config hooks are called.
* As a policy, we should init everything required by an optional function
* before calling APR_REGISTER_OPTIONAL_FN.
- */
+ */
log_hash = apr_hash_make(p);
APR_REGISTER_OPTIONAL_FN(ap_register_log_handler);
APR_REGISTER_OPTIONAL_FN(ap_log_set_writer_init);
diff --git a/modules/loggers/mod_log_forensic.c b/modules/loggers/mod_log_forensic.c
index f8cabfa97b..008243f98b 100644
--- a/modules/loggers/mod_log_forensic.c
+++ b/modules/loggers/mod_log_forensic.c
@@ -115,7 +115,7 @@ static int log_init(apr_pool_t *pc, apr_pool_t *p, apr_pool_t *pt,
return OK;
}
-
+
/* e is the first _invalid_ location in q
N.B. returns the terminating NUL.
*/
diff --git a/modules/loggers/mod_logio.c b/modules/loggers/mod_logio.c
index f4d639c435..c05e4c9fc1 100644
--- a/modules/loggers/mod_logio.c
+++ b/modules/loggers/mod_logio.c
@@ -139,7 +139,7 @@ static int logio_pre_conn(conn_rec *c, void *csd) {
static int logio_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp)
{
static APR_OPTIONAL_FN_TYPE(ap_register_log_handler) *log_pfn_register;
-
+
log_pfn_register = APR_RETRIEVE_OPTIONAL_FN(ap_register_log_handler);
if (log_pfn_register) {
diff --git a/modules/mappers/mod_actions.c b/modules/mappers/mod_actions.c
index 6c934eece1..643f6507d8 100644
--- a/modules/mappers/mod_actions.c
+++ b/modules/mappers/mod_actions.c
@@ -23,9 +23,9 @@
* Usage instructions:
*
* Action mime/type /cgi-bin/script
- *
- * will activate /cgi-bin/script when a file of content type mime/type is
- * requested. It sends the URL and file path of the requested document using
+ *
+ * will activate /cgi-bin/script when a file of content type mime/type is
+ * requested. It sends the URL and file path of the requested document using
* the standard CGI PATH_INFO and PATH_TRANSLATED environment variables.
*
* Script PUT /cgi-bin/script
@@ -89,7 +89,7 @@ static void *merge_action_dir_configs(apr_pool_t *p, void *basev, void *addv)
return new;
}
-static const char *add_action(cmd_parms *cmd, void *m_v,
+static const char *add_action(cmd_parms *cmd, void *m_v,
const char *type, const char *script,
const char *option)
{
@@ -110,8 +110,8 @@ static const char *add_action(cmd_parms *cmd, void *m_v,
static const char *set_script(cmd_parms *cmd, void *m_v,
const char *method, const char *script)
{
- action_dir_config *m = (action_dir_config *)m_v;
-
+ action_dir_config *m = (action_dir_config *)m_v;
+
/* ap_method_register recognizes already registered methods,
* so don't bother to check its previous existence explicitely.
*/
diff --git a/modules/mappers/mod_alias.c b/modules/mappers/mod_alias.c
index 2ddbf95255..efaf6011c4 100644
--- a/modules/mappers/mod_alias.c
+++ b/modules/mappers/mod_alias.c
@@ -16,10 +16,10 @@
/*
* http_alias.c: Stuff for dealing with directory aliases
- *
+ *
* Original by Rob McCool, rewritten in succession by David Robinson
* and rst.
- *
+ *
*/
#include "apr_strings.h"
@@ -168,7 +168,7 @@ static const char *add_alias_regex(cmd_parms *cmd, void *dummy, const char *f,
static const char *add_redirect_internal(cmd_parms *cmd,
alias_dir_conf *dirconf,
- const char *arg1, const char *arg2,
+ const char *arg1, const char *arg2,
const char *arg3, int use_regex)
{
alias_entry *new;
@@ -258,14 +258,14 @@ static const command_rec alias_cmds[] =
"a regular expression and a filename"),
AP_INIT_TAKE2("ScriptAliasMatch", add_alias_regex, "cgi-script", RSRC_CONF,
"a regular expression and a filename"),
- AP_INIT_TAKE23("RedirectMatch", add_redirect_regex,
+ AP_INIT_TAKE23("RedirectMatch", add_redirect_regex,
(void *) HTTP_MOVED_TEMPORARILY, OR_FILEINFO,
"an optional status, then a regular expression and "
"destination URL"),
AP_INIT_TAKE2("RedirectTemp", add_redirect2,
(void *) HTTP_MOVED_TEMPORARILY, OR_FILEINFO,
"a document to be redirected, then the destination URL"),
- AP_INIT_TAKE2("RedirectPermanent", add_redirect2,
+ AP_INIT_TAKE2("RedirectPermanent", add_redirect2,
(void *) HTTP_MOVED_PERMANENTLY, OR_FILEINFO,
"a document to be redirected, then the destination URL"),
{NULL}
@@ -331,15 +331,15 @@ static char *try_alias_list(request_rec *r, apr_array_header_t *aliases,
apr_uri_t uri;
apr_uri_parse(r->pool, found, &uri);
/* Do not escape the query string or fragment. */
- found = apr_uri_unparse(r->pool, &uri,
+ found = apr_uri_unparse(r->pool, &uri,
APR_URI_UNP_OMITQUERY);
found = ap_escape_uri(r->pool, found);
if (uri.query) {
- found = apr_pstrcat(r->pool, found, "?",
+ found = apr_pstrcat(r->pool, found, "?",
uri.query, NULL);
}
if (uri.fragment) {
- found = apr_pstrcat(r->pool, found, "#",
+ found = apr_pstrcat(r->pool, found, "#",
uri.fragment, NULL);
}
}
diff --git a/modules/mappers/mod_dir.c b/modules/mappers/mod_dir.c
index eca688fe27..bc870abfbf 100644
--- a/modules/mappers/mod_dir.c
+++ b/modules/mappers/mod_dir.c
@@ -105,7 +105,7 @@ static int fixup_dir(request_rec *r)
if (r->finfo.filetype != APR_DIR) {
return DECLINED;
}
-
+
/* In case mod_mime wasn't present, and no handler was assigned. */
if (!r->handler) {
r->handler = DIR_MAGIC_TYPE;
@@ -120,7 +120,7 @@ static int fixup_dir(request_rec *r)
&dir_module);
/* Redirect requests that are not '/' terminated */
- if (r->uri[0] == '\0' || r->uri[strlen(r->uri) - 1] != '/')
+ if (r->uri[0] == '\0' || r->uri[strlen(r->uri) - 1] != '/')
{
char *ifile;
@@ -129,8 +129,8 @@ static int fixup_dir(request_rec *r)
}
/* Only redirect non-get requests if we have no note to warn
- * that this browser cannot handle redirs on non-GET requests
- * (such as Microsoft's WebFolders).
+ * that this browser cannot handle redirs on non-GET requests
+ * (such as Microsoft's WebFolders).
*/
if ((r->method_number != M_GET)
&& apr_table_get(r->subprocess_env, "redirect-carefully")) {
@@ -180,12 +180,12 @@ static int fixup_dir(request_rec *r)
/* The sub request lookup is very liberal, and the core map_to_storage
* handler will almost always result in HTTP_OK as /foo/index.html
- * may be /foo with PATH_INFO="/index.html", or even / with
+ * may be /foo with PATH_INFO="/index.html", or even / with
* PATH_INFO="/foo/index.html". To get around this we insist that the
* the index be a regular filetype.
*
- * Another reason is that the core handler also makes the assumption
- * that if r->finfo is still NULL by the time it gets called, the
+ * Another reason is that the core handler also makes the assumption
+ * that if r->finfo is still NULL by the time it gets called, the
* file does not exist.
*/
if (rr->status == HTTP_OK
@@ -194,7 +194,7 @@ static int fixup_dir(request_rec *r)
ap_internal_fast_redirect(rr, r);
return OK;
}
-
+
/* If the request returned a redirect, propagate it to the client */
if (ap_is_HTTP_REDIRECT(rr->status)
diff --git a/modules/mappers/mod_imagemap.c b/modules/mappers/mod_imagemap.c
index 90ec579475..59aca9523b 100644
--- a/modules/mappers/mod_imagemap.c
+++ b/modules/mappers/mod_imagemap.c
@@ -29,14 +29,14 @@
*
* Randy Terbush, randy@zyzzyva.com
* port to Apache module format, "base_uri" and support for relative URLs
- *
+ *
* James H. Cloos, Jr., cloos@jhcloos.com
* Added point datatype, using code in NCSA's version 1.8 imagemap.c
* program, as distributed with version 1.4.1 of their server.
* The point code is originally added by Craig Milo Rogers, Rogers@ISI.Edu
*
* Nathan Kurz, nate@tripod.com
- * Rewrite/reorganization. New handling of default, base and relative URLs.
+ * Rewrite/reorganization. New handling of default, base and relative URLs.
* New Configuration directives:
* ImapMenu {none, formatted, semiformatted, unformatted}
* ImapDefault {error, nocontent, referer, menu, URL}
@@ -415,7 +415,7 @@ static char *imap_url(request_rec *r, const char *base, const char *value)
if (directory && (slen = strlen(directory))) {
- /* for each '..', knock a directory off the end
+ /* for each '..', knock a directory off the end
by ending the string right at the last slash.
But only consider the directory portion: don't eat
into the server name. And only try if a directory
@@ -591,7 +591,7 @@ static int imap_handler_internal(request_rec *r)
char *imap_default;
char *imap_base;
- ap_configfile_t *imap;
+ ap_configfile_t *imap;
icr = ap_get_module_config(r->per_dir_config, &imagemap_module);
diff --git a/modules/mappers/mod_negotiation.c b/modules/mappers/mod_negotiation.c
index 9676adf394..86a50d797e 100644
--- a/modules/mappers/mod_negotiation.c
+++ b/modules/mappers/mod_negotiation.c
@@ -381,7 +381,7 @@ static float atoq(const char *string)
/* better only one division later, than dealing with fscking
* IEEE format 0.1 factors ...
*/
- int i = 0;
+ int i = 0;
if (*++string >= '0' && *string <= '9') {
i += (*string - '0') * 100;
diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c
index 0baad43800..9e094b33a6 100644
--- a/modules/mappers/mod_rewrite.c
+++ b/modules/mappers/mod_rewrite.c
@@ -866,7 +866,7 @@ static int prefix_stat(const char *path, apr_pool_t *pool)
if (rv == APR_SUCCESS) {
apr_finfo_t sb;
-
+
if (apr_stat(&sb, statpath, APR_FINFO_MIN, pool) == APR_SUCCESS) {
return 1;
}
@@ -1296,7 +1296,7 @@ static char *lookup_map_dbmfile(request_rec *r, const char *file,
apr_datum_t dbmval;
char *value;
- if (apr_dbm_open_ex(&dbmfp, dbmtype, file, APR_DBM_READONLY, APR_OS_DEFAULT,
+ if (apr_dbm_open_ex(&dbmfp, dbmtype, file, APR_DBM_READONLY, APR_OS_DEFAULT,
r->pool) != APR_SUCCESS) {
return NULL;
}
@@ -1421,7 +1421,7 @@ static char *lookup_map_program(request_rec *r, apr_file_t *fpin,
else if (i) {
curbuf->next = apr_palloc(r->pool, sizeof(*buflist));
curbuf = curbuf->next;
-
+
}
curbuf->next = NULL;
@@ -1768,7 +1768,7 @@ static char *lookup_variable(char *var, rewrite_ctx *ctx)
return (char *)result;
}
break;
-
+
case 5:
if (!strcmp(var, "HTTPS")) {
int flag = rewrite_is_https && rewrite_is_https(r->connection);
@@ -4532,7 +4532,7 @@ static int hook_fixup(request_rec *r)
cp = r->filename + skip;
if ((cp = ap_strchr(cp, '/')) != NULL && *(++cp)) {
- rewritelog((r, 2, dconf->directory,
+ rewritelog((r, 2, dconf->directory,
"trying to replace prefix %s with %s",
dconf->directory, dconf->baseurl));
diff --git a/modules/mappers/mod_so.c b/modules/mappers/mod_so.c
index e9b316311b..7e23031e00 100644
--- a/modules/mappers/mod_so.c
+++ b/modules/mappers/mod_so.c
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-/*
+/*
* This module is used to load Apache modules at runtime. This means that the
* server functionality can be extended without recompiling and even without
- * taking the server down at all. Only a HUP or AP_SIG_GRACEFUL signal
+ * taking the server down at all. Only a HUP or AP_SIG_GRACEFUL signal
* needs to be sent to the server to reload the dynamically loaded modules.
*
* To use, you'll first need to build your module as a shared library, then
@@ -40,7 +40,7 @@
*
* To use the shared module, move the .so file(s) into an appropriate
* directory. You might like to create a directory called "modules" under you
- * server root for this (e.g. /usr/local/httpd/modules).
+ * server root for this (e.g. /usr/local/httpd/modules).
*
* Then edit your conf/httpd.conf file, and add LoadModule lines. For
* example
@@ -56,8 +56,8 @@
* directive to get these log messages).
*
* If you edit the LoadModule directives while the server is live you can get
- * Apache to re-load the modules by sending it a HUP or AP_SIG_GRACEFUL
- * signal as normal. You can use this to dynamically change the capability
+ * Apache to re-load the modules by sending it a HUP or AP_SIG_GRACEFUL
+ * signal as normal. You can use this to dynamically change the capability
* of your server without bringing it down.
*
* Because currently there is only limited builtin support in the Configure
@@ -114,7 +114,7 @@ static void *so_sconf_create(apr_pool_t *p, server_rec *s)
so_server_conf *soc;
soc = (so_server_conf *)apr_pcalloc(p, sizeof(so_server_conf));
- soc->loaded_modules = apr_array_make(p, DYNAMIC_MODULE_LIMIT,
+ soc->loaded_modules = apr_array_make(p, DYNAMIC_MODULE_LIMIT,
sizeof(ap_module_symbol_t));
return (void *)soc;
@@ -144,12 +144,12 @@ static apr_status_t unload_module(void *data)
return APR_SUCCESS;
}
-/*
+/*
* This is called for the directive LoadModule and actually loads
* a shared object file into the address space of the server process.
*/
-static const char *load_module(cmd_parms *cmd, void *dummy,
+static const char *load_module(cmd_parms *cmd, void *dummy,
const char *modname, const char *filename)
{
apr_dso_handle_t *modhandle;
@@ -169,16 +169,16 @@ static const char *load_module(cmd_parms *cmd, void *dummy,
*(ap_directive_t **)dummy = NULL;
if (!szModuleFile) {
- return apr_pstrcat(cmd->pool, "Invalid LoadModule path ",
+ return apr_pstrcat(cmd->pool, "Invalid LoadModule path ",
filename, NULL);
}
- /*
+ /*
* check for already existing module
- * If it already exists, we have nothing to do
+ * If it already exists, we have nothing to do
* Check both dynamically-loaded modules and statically-linked modules.
*/
- sconf = (so_server_conf *)ap_get_module_config(cmd->server->module_config,
+ sconf = (so_server_conf *)ap_get_module_config(cmd->server->module_config,
&so_module);
modie = (ap_module_symbol_t *)sconf->loaded_modules->elts;
for (i = 0; i < sconf->loaded_modules->nelts; i++) {
@@ -255,7 +255,7 @@ static const char *load_module(cmd_parms *cmd, void *dummy,
char my_error[256];
return apr_pstrcat(cmd->pool, "Can't locate API module structure `",
- modname, "' in file ", szModuleFile, ": ",
+ modname, "' in file ", szModuleFile, ": ",
apr_dso_error(modhandle, my_error, sizeof(my_error)),
NULL);
}
@@ -263,9 +263,9 @@ static const char *load_module(cmd_parms *cmd, void *dummy,
modp->dynamic_load_handle = (apr_dso_handle_t *)modhandle;
modi->modp = modp;
- /*
+ /*
* Make sure the found module structure is really a module structure
- *
+ *
*/
if (modp->magic != MODULE_MAGIC_COOKIE) {
return apr_pstrcat(cmd->pool, "API module structure `", modname,
@@ -273,7 +273,7 @@ static const char *load_module(cmd_parms *cmd, void *dummy,
" perhaps this is not an Apache module DSO?", NULL);
}
- /*
+ /*
* Add this module to the Apache core structures
*/
error = ap_add_loaded_module(modp, cmd->pool);
@@ -281,14 +281,14 @@ static const char *load_module(cmd_parms *cmd, void *dummy,
return error;
}
- /*
+ /*
* Register a cleanup in the config apr_pool_t (normally pconf). When
* we do a restart (or shutdown) this cleanup will cause the
* shared object to be unloaded.
*/
apr_pool_cleanup_register(cmd->pool, modi, unload_module, apr_pool_cleanup_null);
- /*
+ /*
* Finally we need to run the configuration process for the module
*/
ap_single_module_configure(cmd->pool, cmd->server, modp);
@@ -296,7 +296,7 @@ static const char *load_module(cmd_parms *cmd, void *dummy,
return NULL;
}
-/*
+/*
* This implements the LoadFile directive and loads an arbitrary
* shared object file into the adress space of the server process.
*/
@@ -307,21 +307,21 @@ static const char *load_file(cmd_parms *cmd, void *dummy, const char *filename)
const char *file;
file = ap_server_root_relative(cmd->pool, filename);
-
+
if (!file) {
- return apr_pstrcat(cmd->pool, "Invalid LoadFile path ",
+ return apr_pstrcat(cmd->pool, "Invalid LoadFile path ",
filename, NULL);
}
if (apr_dso_load(&handle, file, cmd->pool) != APR_SUCCESS) {
char my_error[256];
- return apr_pstrcat(cmd->pool, "Cannot load ", filename,
- " into server: ",
+ return apr_pstrcat(cmd->pool, "Cannot load ", filename,
+ " into server: ",
apr_dso_error(handle, my_error, sizeof(my_error)),
NULL);
}
-
+
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL,
"loaded file %s", filename);
@@ -335,7 +335,7 @@ static module *ap_find_loaded_module_symbol(server_rec *s, const char *modname)
ap_module_symbol_t *modie;
int i;
- sconf = (so_server_conf *)ap_get_module_config(s->module_config,
+ sconf = (so_server_conf *)ap_get_module_config(s->module_config,
&so_module);
modie = (ap_module_symbol_t *)sconf->loaded_modules->elts;
@@ -364,7 +364,7 @@ static void dump_loaded_modules(apr_pool_t *p, server_rec *s)
apr_file_printf(out, "Loaded Modules:\n");
- sconf = (so_server_conf *)ap_get_module_config(s->module_config,
+ sconf = (so_server_conf *)ap_get_module_config(s->module_config,
&so_module);
for (i = 0; ; i++) {
modi = &ap_prelinked_module_symbols[i];
@@ -389,15 +389,15 @@ static void dump_loaded_modules(apr_pool_t *p, server_rec *s)
static const char *load_file(cmd_parms *cmd, void *dummy, const char *filename)
{
- ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, cmd->pool,
+ ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, cmd->pool,
"WARNING: LoadFile not supported on this platform");
return NULL;
}
-static const char *load_module(cmd_parms *cmd, void *dummy,
+static const char *load_module(cmd_parms *cmd, void *dummy,
const char *modname, const char *filename)
{
- ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, cmd->pool,
+ ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, cmd->pool,
"WARNING: LoadModule not supported on this platform");
return NULL;
}
diff --git a/modules/mappers/mod_speling.c b/modules/mappers/mod_speling.c
index 82f15baa0c..4441d64efe 100644
--- a/modules/mappers/mod_speling.c
+++ b/modules/mappers/mod_speling.c
@@ -239,7 +239,7 @@ static int check_speling(request_rec *r)
filoc = ap_rind(r->filename, '/');
/*
* Don't do anything if the request doesn't contain a slash, or
- * requests "/"
+ * requests "/"
*/
if (filoc == -1 || strcmp(r->uri, "/") == 0) {
return DECLINED;
@@ -376,8 +376,8 @@ static int check_speling(request_rec *r)
sizeof(misspelled_file), sort_by_quality);
/*
- * Conditions for immediate redirection:
- * a) the first candidate was not found by stripping the suffix
+ * Conditions for immediate redirection:
+ * a) the first candidate was not found by stripping the suffix
* AND b) there exists only one candidate OR the best match is not
* ambiguous
* then return a redirection right away.
@@ -396,7 +396,7 @@ static int check_speling(request_rec *r)
ap_construct_url(r->pool, nuri, r));
ap_log_rerror(APLOG_MARK, APLOG_INFO, APR_SUCCESS,
- r,
+ r,
ref ? "Fixed spelling: %s to %s from %s"
: "Fixed spelling: %s to %s",
r->uri, nuri, ref);
@@ -478,7 +478,7 @@ static int check_speling(request_rec *r)
if (i > 0 && i < candidates->nelts - 1
&& variant[i].quality != SP_VERYDIFFERENT
&& variant[i + 1].quality == SP_VERYDIFFERENT) {
- *(const char **)apr_array_push(t) =
+ *(const char **)apr_array_push(t) =
"</ul>\nFurthermore, the following related "
"documents were found:\n<ul>\n";
}
@@ -501,7 +501,7 @@ static int check_speling(request_rec *r)
apr_table_mergen(r->subprocess_env, "VARIANTS",
apr_array_pstrcat(p, v, ','));
-
+
apr_pool_destroy(sub_pool);
ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
diff --git a/modules/mappers/mod_userdir.c b/modules/mappers/mod_userdir.c
index 495f34054a..0c84d4316f 100644
--- a/modules/mappers/mod_userdir.c
+++ b/modules/mappers/mod_userdir.c
@@ -73,8 +73,8 @@
#endif
-/*
- * The default directory in user's home dir
+/*
+ * The default directory in user's home dir
* In the default install, the module is disabled
*/
#ifndef DEFAULT_USER_DIR
@@ -259,7 +259,7 @@ static int translate_userdir(request_rec *r)
* Crummy hack. Need to figure out whether we have been
* redirected to a URL or to a file on some drive. Since I
* know of no protocols that are a single letter, ignore
- * a : as the first or second character, and assume a file
+ * a : as the first or second character, and assume a file
* was specified
*/
if (strchr(x + 2, ':'))
@@ -300,7 +300,7 @@ static int translate_userdir(request_rec *r)
* anyway, in the hope that some handler might handle it. This can be
* used, for example, to run a CGI script for the user.
*/
- if (filename && (!*userdirs
+ if (filename && (!*userdirs
|| ((rv = apr_stat(&statbuf, filename, APR_FINFO_MIN,
r->pool)) == APR_SUCCESS
|| rv == APR_INCOMPLETE))) {
@@ -342,7 +342,7 @@ static ap_unix_identity_t *get_suexec_id_doer(const request_rec *r)
}
ugid->userdir = 1;
-#endif
+#endif
return ugid;
}
#endif /* HAVE_UNIX_SUEXEC */
diff --git a/modules/mappers/mod_vhost_alias.c b/modules/mappers/mod_vhost_alias.c
index 5dd54f843f..4d3e1c823e 100644
--- a/modules/mappers/mod_vhost_alias.c
+++ b/modules/mappers/mod_vhost_alias.c
@@ -16,7 +16,7 @@
/*
* mod_vhost_alias.c: support for dynamically configured mass virtual hosting
- *
+ *
* Copyright (c) 1998-1999 Demon Internet Ltd.
*
* This software was submitted by Demon Internet to the Apache Software Foundation
@@ -123,7 +123,7 @@ static const char *vhost_alias_set(cmd_parms *cmd, void *dummy, const char *map)
mva_mode_e mode, *pmode;
const char **pmap;
const char *p;
-
+
conf = (mva_sconf_t *) ap_get_module_config(cmd->server->module_config,
&vhost_alias_module);
/* there ought to be a better way of doing this */
@@ -214,17 +214,17 @@ static const char *vhost_alias_set(cmd_parms *cmd, void *dummy, const char *map)
static const command_rec mva_commands[] =
{
- AP_INIT_TAKE1("VirtualScriptAlias", vhost_alias_set,
- &vhost_alias_set_cgi_root_name, RSRC_CONF,
+ AP_INIT_TAKE1("VirtualScriptAlias", vhost_alias_set,
+ &vhost_alias_set_cgi_root_name, RSRC_CONF,
"how to create a ScriptAlias based on the host"),
- AP_INIT_TAKE1("VirtualDocumentRoot", vhost_alias_set,
- &vhost_alias_set_doc_root_name, RSRC_CONF,
+ AP_INIT_TAKE1("VirtualDocumentRoot", vhost_alias_set,
+ &vhost_alias_set_doc_root_name, RSRC_CONF,
"how to create the DocumentRoot based on the host"),
- AP_INIT_TAKE1("VirtualScriptAliasIP", vhost_alias_set,
- &vhost_alias_set_cgi_root_ip, RSRC_CONF,
+ AP_INIT_TAKE1("VirtualScriptAliasIP", vhost_alias_set,
+ &vhost_alias_set_cgi_root_ip, RSRC_CONF,
"how to create a ScriptAlias based on the host"),
- AP_INIT_TAKE1("VirtualDocumentRootIP", vhost_alias_set,
- &vhost_alias_set_doc_root_ip, RSRC_CONF,
+ AP_INIT_TAKE1("VirtualDocumentRootIP", vhost_alias_set,
+ &vhost_alias_set_doc_root_ip, RSRC_CONF,
"how to create the DocumentRoot based on the host"),
{ NULL }
};
@@ -276,7 +276,7 @@ static void vhost_alias_interpolate(request_rec *r, const char *name,
dots[ndots] = p;
r->filename = NULL;
-
+
dest = buf;
last = '\0';
while (*map) {
@@ -386,7 +386,7 @@ static int mva_translate(request_rec *r)
const char *name, *map, *uri;
mva_mode_e mode;
const char *cgi;
-
+
conf = (mva_sconf_t *) ap_get_module_config(r->server->module_config,
&vhost_alias_module);
cgi = NULL;
@@ -409,7 +409,7 @@ static int mva_translate(request_rec *r)
else {
return DECLINED;
}
-
+
if (mode == VHOST_ALIAS_NAME) {
name = ap_get_server_name(r);
}
@@ -421,7 +421,7 @@ static int mva_translate(request_rec *r)
}
/* ### There is an optimization available here to determine the
- * absolute portion of the path from the server config phase,
+ * absolute portion of the path from the server config phase,
* through the first % segment, and note that portion of the path
* canonical_path buffer.
*/
diff --git a/modules/metadata/mod_cern_meta.c b/modules/metadata/mod_cern_meta.c
index ebe5933154..2afe210d7a 100644
--- a/modules/metadata/mod_cern_meta.c
+++ b/modules/metadata/mod_cern_meta.c
@@ -18,13 +18,13 @@
* mod_cern_meta.c
* version 0.1.0
* status beta
- *
+ *
* Andrew Wilson <Andrew.Wilson@cm.cf.ac.uk> 25.Jan.96
*
* *** IMPORTANT ***
* This version of mod_cern_meta.c controls Meta File behaviour on a
* per-directory basis. Previous versions of the module defined behaviour
- * on a per-server basis. The upshot is that you'll need to revisit your
+ * on a per-server basis. The upshot is that you'll need to revisit your
* configuration files in order to make use of the new module.
* ***
*
@@ -38,30 +38,30 @@
* who can exploit this module. It should be noted that there are probably
* more sensitive ways of managing the Expires: header specifically.
*
- * The module obeys the following directives, which can appear
+ * The module obeys the following directives, which can appear
* in the server's .conf files and in .htaccess files.
*
- * MetaFiles <on|off>
+ * MetaFiles <on|off>
*
- * turns on|off meta file processing for any directory.
+ * turns on|off meta file processing for any directory.
* Default value is off
*
* # turn on MetaFiles in this directory
* MetaFiles on
*
* MetaDir <directory name>
- *
+ *
* specifies the name of the directory in which Apache can find
* meta information files. The directory is usually a 'hidden'
* subdirectory of the directory that contains the file being
* accessed. eg:
*
- * # .meta files are in the *same* directory as the
+ * # .meta files are in the *same* directory as the
* # file being accessed
* MetaDir .
*
* the default is to look in a '.web' subdirectory. This is the
- * same as for CERN 3.+ webservers and behaviour is the same as
+ * same as for CERN 3.+ webservers and behaviour is the same as
* for the directive:
*
* MetaDir .web
@@ -87,7 +87,7 @@
*
* DOCUMENT_ROOT/somedir/.web/index.html.meta
*
- * and will use its contents to generate additional MIME header
+ * and will use its contents to generate additional MIME header
* information.
*
* For more information on the CERN Meta file semantics see:
@@ -98,7 +98,7 @@
* 29.Jan.96 pfopen/pfclose instead of fopen/fclose
* DECLINE when real file not found, we may be checking each
* of the index.html/index.shtml/index.htm variants and don't
- * need to report missing ones as spurious errors.
+ * need to report missing ones as spurious errors.
* 31.Jan.96 log_error reports about a malformed .meta file, rather
* than a script error.
* 20.Jun.96 MetaFiles <on|off> default off, added, so that module
diff --git a/modules/metadata/mod_env.c b/modules/metadata/mod_env.c
index abaed0192d..17398686ea 100644
--- a/modules/metadata/mod_env.c
+++ b/modules/metadata/mod_env.c
@@ -55,14 +55,14 @@ static void *merge_env_dir_configs(apr_pool_t *p, void *basev, void *addv)
int i;
- /*
+ /*
* res->vars = copy_table( p, base->vars );
* foreach $unsetenv ( @add->unsetenv )
* table_unset( res->vars, $unsetenv );
* foreach $element ( @add->vars )
* table_set( res->vars, $element.key, $element.val );
*
- * add->unsetenv already removed the vars from add->vars,
+ * add->unsetenv already removed the vars from add->vars,
* if they preceeded the UnsetEnv directive.
*/
res->vars = apr_table_copy(p, base->vars);
@@ -95,7 +95,7 @@ static const char *add_env_module_vars_passed(cmd_parms *cmd, void *sconf_,
env_dir_config_rec *sconf = sconf_;
apr_table_t *vars = sconf->vars;
const char *env_var;
-
+
env_var = getenv(arg);
if (env_var != NULL) {
apr_table_setn(vars, arg, apr_pstrdup(cmd->pool, env_var));
@@ -112,7 +112,7 @@ static const char *add_env_module_vars_set(cmd_parms *cmd, void *sconf_,
const char *name, const char *value)
{
env_dir_config_rec *sconf = sconf_;
-
+
/* name is mandatory, value is optional. no value means
* set the variable to an empty string
*/
diff --git a/modules/metadata/mod_expires.c b/modules/metadata/mod_expires.c
index 160329750c..f2e91fcf19 100644
--- a/modules/metadata/mod_expires.c
+++ b/modules/metadata/mod_expires.c
@@ -18,13 +18,13 @@
* mod_expires.c
* version 0.0.11
* status beta
- *
+ *
* Andrew Wilson <Andrew.Wilson@cm.cf.ac.uk> 26.Jan.96
*
* This module allows you to control the form of the Expires: header
* that Apache issues for each access. Directives can appear in
* configuration files or in .htaccess files so expiry semantics can
- * be defined on a per-directory basis.
+ * be defined on a per-directory basis.
*
* DIRECTIVE SYNTAX
*
@@ -56,7 +56,7 @@
*
* Another example, our html pages can change all the time, the gifs
* tend not to change often:
- *
+ *
* # pages are hot (1 week), images are cold (1 month)
* ExpiresByType text/html A604800
* ExpiresByType image/gif A2592000
@@ -85,7 +85,7 @@
* ExpiresByType type/encoding "<base> [plus] {<num> <type>}*"
*
* where <base> is one of:
- * access
+ * access
* now equivalent to 'access'
* modification
*
@@ -134,8 +134,8 @@
* rely on presence of HTTP_TIME_FORMAT in Apache 1.1+.
* 21.Feb.96 This version (0.0.9) reverses assumptions made in 0.0.8
* about star/star handlers. Reverting to 0.0.7 behaviour.
- * 08.Jun.96 allows ExpiresDefault to be used with responses that use
- * the DefaultType by not DECLINING, but instead skipping
+ * 08.Jun.96 allows ExpiresDefault to be used with responses that use
+ * the DefaultType by not DECLINING, but instead skipping
* the table_get check and then looking for an ExpiresDefault.
* [Rob Hartill]
* 04.Nov.96 'const' definitions added.
@@ -324,7 +324,7 @@ static const char *set_expiresbytype(cmd_parms *cmd, void *in_dir_config,
if ((strlen(++check) == 1) && (*check == '*')) {
dir_config->wildcards = 1;
}
-
+
if ((response = check_code(cmd->pool, code, &real_code)) == NULL) {
apr_table_setn(dir_config->expiresbytype, mime, real_code);
return NULL;
@@ -399,7 +399,7 @@ static int set_expiration_fields(request_rec *r, const char *code,
switch (code[0]) {
case 'M':
- if (r->finfo.filetype == 0) {
+ if (r->finfo.filetype == 0) {
/* file doesn't exist on disk, so we can't do anything based on
* modification time. Note that this does _not_ log an error.
*/
@@ -410,7 +410,7 @@ static int set_expiration_fields(request_rec *r, const char *code,
additional = apr_time_from_sec(additional_sec);
break;
case 'A':
- /* there's been some discussion and it's possible that
+ /* there's been some discussion and it's possible that
* 'access time' will be stored in request structure
*/
base = r->request_time;
@@ -418,7 +418,7 @@ static int set_expiration_fields(request_rec *r, const char *code,
additional = apr_time_from_sec(additional_sec);
break;
default:
- /* expecting the add_* routines to be case-hardened this
+ /* expecting the add_* routines to be case-hardened this
* is just a reminder that module is beta
*/
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
@@ -472,7 +472,7 @@ static apr_status_t expires_filter(ap_filter_t *f,
* this module. First, check to see if there is an applicable
* ExpiresByType directive.
*/
- expiry = apr_table_get(conf->expiresbytype,
+ expiry = apr_table_get(conf->expiresbytype,
ap_field_noparam(r->pool, r->content_type));
if (expiry == NULL) {
int usedefault = 1;
@@ -530,7 +530,7 @@ static void expires_insert_filter(request_rec *r)
conf = (expires_dir_config *) ap_get_module_config(r->per_dir_config,
&expires_module);
- /* Check to see if the filter is enabled and if there are any applicable
+ /* Check to see if the filter is enabled and if there are any applicable
* config directives for this directory scope
*/
if (conf->active != ACTIVE_ON ||
diff --git a/modules/metadata/mod_headers.c b/modules/metadata/mod_headers.c
index cf798d8ff4..ac8c515928 100644
--- a/modules/metadata/mod_headers.c
+++ b/modules/metadata/mod_headers.c
@@ -43,8 +43,8 @@
*
* When the request is processed, the header directives are processed in
* this order: firstly, the main server, then the virtual server handling
- * this request (if any), then any <Directory> sections (working downwards
- * from the root dir), then an <Location> sections (working down from
+ * this request (if any), then any <Directory> sections (working downwards
+ * from the root dir), then an <Location> sections (working down from
* shortest URL component), the any <File> sections. This order is
* important if any 'set' or 'unset' actions are used. For example,
* the following two directives have different effect if applied in
@@ -100,7 +100,7 @@ static char hdr_out = '1'; /* Header onsuccess */
static char hdr_err = '2'; /* Header always */
/*
- * There is an array of struct format_tag per Header/RequestHeader
+ * There is an array of struct format_tag per Header/RequestHeader
* config directive
*/
typedef struct {
@@ -151,8 +151,8 @@ static const char *constant_item(request_rec *r, char *stuff)
}
static const char *header_request_duration(request_rec *r, char *a)
{
- return apr_psprintf(r->pool, "D=%" APR_TIME_T_FMT,
- (apr_time_now() - r->request_time));
+ return apr_psprintf(r->pool, "D=%" APR_TIME_T_FMT,
+ (apr_time_now() - r->request_time));
}
static const char *header_request_time(request_rec *r, char *a)
{
@@ -165,9 +165,9 @@ static const char *unwrap_header(apr_pool_t *p, const char *hdr)
{
if (ap_strchr_c(hdr, APR_ASCII_LF) || ap_strchr_c(hdr, APR_ASCII_CR)) {
char *ptr;
-
+
hdr = ptr = apr_pstrdup(p, hdr);
-
+
do {
if (*ptr == APR_ASCII_LF || *ptr == APR_ASCII_CR)
*ptr = APR_ASCII_BLANK;
@@ -189,7 +189,7 @@ static const char *header_request_env_var(request_rec *r, char *a)
static const char *header_request_ssl_var(request_rec *r, char *name)
{
if (header_ssl_lookup) {
- const char *val = header_ssl_lookup(r->pool, r->server,
+ const char *val = header_ssl_lookup(r->pool, r->server,
r->connection, r, name);
if (val && val[0])
return unwrap_header(r->pool, val);
@@ -231,7 +231,7 @@ static void *merge_headers_config(apr_pool_t *p, void *basev, void *overridesv)
return newconf;
}
-
+
static char *parse_misc_string(apr_pool_t *p, format_tag *tag, const char **sa)
{
const char *s;
@@ -270,7 +270,7 @@ static char *parse_misc_string(apr_pool_t *p, format_tag *tag, const char **sa)
*d++ = '\n';
s++;
break;
- case 't':
+ case 't':
*d++ = '\t';
s++;
break;
@@ -293,7 +293,7 @@ static char *parse_misc_string(apr_pool_t *p, format_tag *tag, const char **sa)
}
static char *parse_format_tag(apr_pool_t *p, format_tag *tag, const char **sa)
-{
+{
const char *s = *sa;
const char * (*tag_handler)(request_rec *,char *);
@@ -333,13 +333,13 @@ static char *parse_format_tag(apr_pool_t *p, format_tag *tag, const char **sa)
}
/*
- * A format string consists of white space, text and optional format
- * tags in any order. E.g.,
+ * A format string consists of white space, text and optional format
+ * tags in any order. E.g.,
*
* Header add MyHeader "Free form text %D %t more text"
*
* Decompose the format string into its tags. Each tag (struct format_tag)
- * contains a pointer to the function used to format the tag. Then save each
+ * contains a pointer to the function used to format the tag. Then save each
* tag in the tag array anchored in the header_entry.
*/
static char *parse_format_string(apr_pool_t *p, header_entry *hdr, const char *s)
@@ -446,7 +446,7 @@ static APR_INLINE const char *header_inout_cmd(cmd_parms *cmd,
condition_var = envclause + 4;
}
}
-
+
if ((colon = ap_strchr_c(hdr, ':'))) {
hdr = apr_pstrmemdup(cmd->pool, hdr, colon-hdr);
}
@@ -489,23 +489,23 @@ static const char *header_cmd(cmd_parms *cmd, void *indirconf,
}
/*
- * Process the tags in the format string. Tags may be format specifiers
+ * Process the tags in the format string. Tags may be format specifiers
* (%D, %t, etc.), whitespace or text strings. For each tag, run the handler
* (formatter) specific to the tag. Handlers return text strings.
- * Concatenate the return from each handler into one string that is
+ * Concatenate the return from each handler into one string that is
* returned from this call.
*/
-static char* process_tags(header_entry *hdr, request_rec *r)
+static char* process_tags(header_entry *hdr, request_rec *r)
{
int i;
const char *s;
char *str = NULL;
format_tag *tag = (format_tag*) hdr->ta->elts;
-
+
for (i = 0; i < hdr->ta->nelts; i++) {
s = tag[i].func(r, tag[i].arg);
- if (str == NULL)
+ if (str == NULL)
str = apr_pstrdup(r->pool, s);
else
str = apr_pstrcat(r->pool, str, s, NULL);
@@ -515,7 +515,7 @@ static char* process_tags(header_entry *hdr, request_rec *r)
static int echo_header(echo_do *v, const char *key, const char *val)
{
- /* If the input header (key) matches the regex, echo it intact to
+ /* If the input header (key) matches the regex, echo it intact to
* r->headers_out.
*/
if (!ap_regexec(v->hdr->regex, key, 0, NULL, 0)) {
@@ -572,7 +572,7 @@ static void do_headers_fixup(request_rec *r, apr_table_t *headers,
echo_do v;
v.r = r;
v.hdr = hdr;
- apr_table_do((int (*) (void *, const char *, const char *))
+ apr_table_do((int (*) (void *, const char *, const char *))
echo_header, (void *) &v, r->headers_in, NULL);
break;
}
diff --git a/modules/metadata/mod_mime_magic.c b/modules/metadata/mod_mime_magic.c
index 6440c4d8de..faaea0ec35 100644
--- a/modules/metadata/mod_mime_magic.c
+++ b/modules/metadata/mod_mime_magic.c
@@ -229,7 +229,7 @@ static int mget(request_rec *, union VALUETYPE *, unsigned char *,
static int mcheck(request_rec *, union VALUETYPE *, struct magic *);
static void mprint(request_rec *, union VALUETYPE *, struct magic *);
-static int uncompress(request_rec *, int,
+static int uncompress(request_rec *, int,
unsigned char **, apr_size_t);
static long from_oct(int, char *);
static int fsmagic(request_rec *r, const char *fn);
@@ -885,7 +885,7 @@ static int tryit(request_rec *r, unsigned char *buf, apr_size_t nb,
/*
* Try compression stuff
*/
- if (checkzmagic == 1) {
+ if (checkzmagic == 1) {
if (zmagic(r, buf, nb) == 1)
return OK;
}
@@ -933,8 +933,8 @@ static int apprentice(server_rec *s, apr_pool_t *p)
ap_log_error(APLOG_MARK, APLOG_ERR, APR_EBADPATH, s,
MODNAME ": Invalid magic file path %s", conf->magicfile);
return -1;
- }
- if ((result = apr_file_open(&f, fname, APR_READ | APR_BUFFERED,
+ }
+ if ((result = apr_file_open(&f, fname, APR_READ | APR_BUFFERED,
APR_OS_DEFAULT, p) != APR_SUCCESS)) {
ap_log_error(APLOG_MARK, APLOG_ERR, result, s,
MODNAME ": can't read magic file %s", fname);
@@ -957,7 +957,7 @@ static int apprentice(server_rec *s, apr_pool_t *p)
*last = '\0';
--last;
}
-
+
/* skip leading whitespace */
ws_offset = 0;
while (line[ws_offset] && apr_isspace(line[ws_offset])) {
@@ -2127,16 +2127,16 @@ static int create_uncompress_child(struct uncompress_parms *parm, apr_pool_t *cn
apr_procattr_t *procattr;
apr_proc_t *procnew;
- /* XXX missing 1.3 logic:
+ /* XXX missing 1.3 logic:
*
* what happens when !compr[parm->method].silent?
* Should we create the err pipe, read it, and copy to the log?
*/
-
+
env = (const char *const *)ap_create_environment(child_context, r->subprocess_env);
if ((apr_procattr_create(&procattr, child_context) != APR_SUCCESS) ||
- (apr_procattr_io_set(procattr, APR_FULL_BLOCK,
+ (apr_procattr_io_set(procattr, APR_FULL_BLOCK,
APR_FULL_BLOCK, APR_NO_PIPE) != APR_SUCCESS) ||
(apr_procattr_dir_set(procattr, r->filename) != APR_SUCCESS) ||
(apr_procattr_cmdtype_set(procattr, APR_PROGRAM) != APR_SUCCESS)) {
@@ -2169,7 +2169,7 @@ static int create_uncompress_child(struct uncompress_parms *parm, apr_pool_t *cn
return (rc);
}
-static int uncompress(request_rec *r, int method,
+static int uncompress(request_rec *r, int method,
unsigned char **newch, apr_size_t n)
{
struct uncompress_parms parm;
@@ -2341,7 +2341,7 @@ static int revision_suffix(request_rec *r)
apr_pstrdup(r->pool, sub->content_encoding);
if (sub->content_languages) {
int n;
- r->content_languages = apr_array_copy(r->pool,
+ r->content_languages = apr_array_copy(r->pool,
sub->content_languages);
for (n = 0; n < r->content_languages->nelts; ++n) {
char **lang = ((char **)r->content_languages->elts) + n;
diff --git a/modules/metadata/mod_setenvif.c b/modules/metadata/mod_setenvif.c
index bd0ccfb747..c28fc1c021 100644
--- a/modules/metadata/mod_setenvif.c
+++ b/modules/metadata/mod_setenvif.c
@@ -18,7 +18,7 @@
* mod_setenvif.c
* Set environment variables based on matching request headers or
* attributes against regex strings
- *
+ *
* Paul Sutton <paul@ukweb.com> 27 Oct 1996
* Based on mod_browser by Alexei Kosut <akosut@organic.com>
*/
@@ -34,12 +34,12 @@
*
* where name is either a HTTP request header name, or one of the
* special values (see below). 'name' may be a regex when it is used
- * to specify an HTTP request header name. The 'value' of the header
+ * to specify an HTTP request header name. The 'value' of the header
& (or the value of the special value from below) are compared against
* the regex argument. If this is a simple string, a simple sub-string
* match is performed. Otherwise, a request expression match is
* done. If the value matches the string or regular expression, the
- * environment variables listed as var ... are set. Each var can
+ * environment variables listed as var ... are set. Each var can
* be in one of three formats: var, which sets the named variable
* (the value value "1"); var=value, which sets the variable to
* the given value; or !var, which unsets the variable is it has
@@ -169,7 +169,7 @@ static void *merge_setenvif_config(apr_pool_t *p, void *basev, void *overridesv)
#define ICASE_MAGIC ((void *)(&setenvif_module))
#define SEI_MAGIC_HEIRLOOM "setenvif-phase-flag"
-static int is_header_regex(apr_pool_t *p, const char* name)
+static int is_header_regex(apr_pool_t *p, const char* name)
{
/* If a Header name contains characters other than:
* -,_,[A-Z\, [a-z] and [0-9].
@@ -570,7 +570,7 @@ static int match_headers(request_rec *r)
elts = (const apr_table_entry_t *) arr->elts;
val = NULL;
for (j = 0; j < arr->nelts; ++j) {
- if (!ap_regexec(b->pnamereg, elts[j].key, 0, NULL, 0)) {
+ if (!ap_regexec(b->pnamereg, elts[j].key, 0, NULL, 0)) {
val = elts[j].val;
}
}
diff --git a/modules/metadata/mod_unique_id.c b/modules/metadata/mod_unique_id.c
index ebb63ebb21..1185f19147 100644
--- a/modules/metadata/mod_unique_id.c
+++ b/modules/metadata/mod_unique_id.c
@@ -47,10 +47,10 @@ typedef struct {
* cannot guarantee the thread_id will be an integer.
*
* This code looks like it won't give a unique ID with the new thread logic.
- * It will. The reason is, we don't increment the counter in a thread_safe
+ * It will. The reason is, we don't increment the counter in a thread_safe
* manner. Because the thread_index is also in the unique ID now, this does
* not matter. In order for the id to not be unique, the same thread would
- * have to get the same counter twice in the same second.
+ * have to get the same counter twice in the same second.
*/
/* Comments:
@@ -123,7 +123,7 @@ static unique_id_rec cur_unique_id;
/*
* Number of elements in the structure unique_id_rec.
*/
-#define UNIQUE_ID_REC_MAX 5
+#define UNIQUE_ID_REC_MAX 5
static unsigned short unique_id_rec_offset[UNIQUE_ID_REC_MAX],
unique_id_rec_size[UNIQUE_ID_REC_MAX],
@@ -199,12 +199,12 @@ static int unique_id_global_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *pt
* If the server is pummelled with restart requests we could possibly end
* up in a situation where we're starting again during the same second
* that has been used in previous identifiers. Avoid that situation.
- *
+ *
* In truth, for this to actually happen not only would it have to restart
* in the same second, but it would have to somehow get the same pids as
* one of the other servers that was running in that second. Which would
* mean a 64k wraparound on pids ... not very likely at all.
- *
+ *
* But protecting against it is relatively cheap. We just sleep into the
* next second.
*/
@@ -222,7 +222,7 @@ static void unique_id_child_init(apr_pool_t *p, server_rec *s)
* physical machine there are multiple servers (i.e. using Listen). But
* it's guaranteed that none of them will share the same pids between
* children.
- *
+ *
* XXX: for multithread this needs to use a pid/tid combo and probably
* needs to be expanded to 32 bits
*/
@@ -299,7 +299,7 @@ static int gen_unique_id(request_rec *r)
apr_table_setn(r->subprocess_env, "UNIQUE_ID", e);
return DECLINED;
}
-
+
new_unique_id.in_addr = cur_unique_id.in_addr;
new_unique_id.pid = cur_unique_id.pid;
new_unique_id.counter = cur_unique_id.counter;
@@ -323,7 +323,7 @@ static int gen_unique_id(request_rec *r)
*/
x[k++] = '\0';
x[k++] = '\0';
-
+
/* alloc str and do the uuencoding */
str = (char *)apr_palloc(r->pool, unique_id_rec_size_uu + 1);
k = 0;
@@ -353,7 +353,7 @@ static void register_hooks(apr_pool_t *p)
{
ap_hook_post_config(unique_id_global_init, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_child_init(unique_id_child_init, NULL, NULL, APR_HOOK_MIDDLE);
- ap_hook_post_read_request(gen_unique_id, NULL, NULL, APR_HOOK_MIDDLE);
+ ap_hook_post_read_request(gen_unique_id, NULL, NULL, APR_HOOK_MIDDLE);
}
module AP_MODULE_DECLARE_DATA unique_id_module = {
diff --git a/modules/metadata/mod_usertrack.c b/modules/metadata/mod_usertrack.c
index 21840f37d1..a7dd1a21c7 100644
--- a/modules/metadata/mod_usertrack.c
+++ b/modules/metadata/mod_usertrack.c
@@ -106,7 +106,7 @@ static void make_cookie(request_rec *r)
dcfg = ap_get_module_config(r->per_dir_config, &usertrack_module);
/* XXX: hmm, this should really tie in with mod_unique_id */
- apr_snprintf(cookiebuf, sizeof(cookiebuf), "%s.%" APR_TIME_T_FMT, rname,
+ apr_snprintf(cookiebuf, sizeof(cookiebuf), "%s.%" APR_TIME_T_FMT, rname,
apr_time_now());
if (cls->expires) {
@@ -117,7 +117,7 @@ static void make_cookie(request_rec *r)
if ((dcfg->style == CT_UNSET) || (dcfg->style == CT_NETSCAPE)) {
apr_time_exp_t tms;
- apr_time_exp_gmt(&tms, r->request_time
+ apr_time_exp_gmt(&tms, r->request_time
+ apr_time_from_sec(cls->expires));
new_cookie = apr_psprintf(r->pool,
"%s; expires=%s, "
@@ -295,7 +295,7 @@ static const char *set_cookie_exp(cmd_parms *parms, void *dummy,
}
/*
- * The harder case - stolen from mod_expires
+ * The harder case - stolen from mod_expires
*
* CookieExpires "[plus] {<num> <type>}*"
*/
diff --git a/modules/metadata/mod_version.c b/modules/metadata/mod_version.c
index 47b938a73b..203c12f55f 100644
--- a/modules/metadata/mod_version.c
+++ b/modules/metadata/mod_version.c
@@ -17,7 +17,7 @@
/*
* mod_version.c
* Allow conditional configuration depending on the httpd version
- *
+ *
* André Malo (nd/perlig.de), January 2004
*
* Some stuff coded here is heavily based on the core <IfModule>
@@ -163,7 +163,7 @@ static int match_version(apr_pool_t *pool, char *version_string,
rc = !ap_regexec(compiled, to_match, 0, NULL, 0);
ap_pregfree(pool, compiled);
- return rc;
+ return rc;
}
/*
diff --git a/modules/proxy/ajp_header.c b/modules/proxy/ajp_header.c
index a72183a415..002b5b3bb8 100644
--- a/modules/proxy/ajp_header.c
+++ b/modules/proxy/ajp_header.c
@@ -18,20 +18,20 @@
#include "ajp.h"
static const char *response_trans_headers[] = {
- "Content-Type",
- "Content-Language",
- "Content-Length",
- "Date",
- "Last-Modified",
- "Location",
- "Set-Cookie",
- "Set-Cookie2",
- "Servlet-Engine",
- "Status",
+ "Content-Type",
+ "Content-Language",
+ "Content-Length",
+ "Date",
+ "Last-Modified",
+ "Location",
+ "Set-Cookie",
+ "Set-Cookie2",
+ "Servlet-Engine",
+ "Status",
"WWW-Authenticate"
};
-static const char *long_res_header_for_sc(int sc)
+static const char *long_res_header_for_sc(int sc)
{
const char *rc = NULL;
sc = sc & 0X00FF;
@@ -56,7 +56,7 @@ static int sc_for_req_header(const char *header_name)
*/
if (len < 4 || len > 15)
return UNKNOWN_METHOD;
-
+
while (*p)
header[i++] = apr_toupper(*p++);
header[i] = '\0';
@@ -158,7 +158,7 @@ static const unsigned char sc_for_req_method_table[] = {
SC_M_MKWORKSPACE,
SC_M_MKACTIVITY,
SC_M_BASELINE_CONTROL,
- SC_M_MERGE,
+ SC_M_MERGE,
0 /* M_INVALID */
};
@@ -218,7 +218,7 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"Into ajp_marshal_into_msgb");
- if ((method = sc_for_req_method_by_id(r->method_number)) == UNKNOWN_METHOD) {
+ if ((method = sc_for_req_method_by_id(r->method_number)) == UNKNOWN_METHOD) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
"ajp_marshal_into_msgb - No such method %s",
r->method);
@@ -274,7 +274,7 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
return AJP_EOVERFLOW;
}
}
-
+
if (ajp_msg_append_string(msg, elts[i].val)) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
"ajp_marshal_into_msgb: "
@@ -297,7 +297,7 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
}
}
*/
-
+
if (r->user) {
if (ajp_msg_append_uint8(msg, SC_A_REMOTE_USER) ||
ajp_msg_append_string(msg, r->user)) {
@@ -337,7 +337,7 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
}
/* XXX: Is the subprocess_env a right place?
* <Location /examples>
- * ProxyPass ajp://remote:8009/servlets-examples
+ * ProxyPass ajp://remote:8009/servlets-examples
* SetEnv SSL_SESSION_ID CUSTOM_SSL_SESSION_ID
* </Location>
*/
@@ -436,10 +436,10 @@ AJPV13_RESPONSE/AJPV14_RESPONSE:=
*body_chunk
terminator boolean <! -- recycle connection or not -->
-req_header_name :=
+req_header_name :=
sc_req_header_name | (string)
-res_header_name :=
+res_header_name :=
sc_res_header_name | (string)
header_value :=
@@ -504,7 +504,7 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
if (rc != APR_SUCCESS) {
return rc;
}
-
+
if ((name & 0XFF00) == 0XA000) {
ajp_msg_peek_uint16(msg, &name);
stringname = long_res_header_for_sc(name);
@@ -555,7 +555,7 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
ap_xlate_proto_from_ascii(value, strlen(value));
#endif
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "ajp_unmarshal_response: Header[%d] [%s] = [%s]",
+ "ajp_unmarshal_response: Header[%d] [%s] = [%s]",
i, stringname, value);
apr_table_add(r->headers_out, stringname, value);
@@ -589,7 +589,7 @@ apr_status_t ajp_send_header(apr_socket_t *sock,
return rc;
}
- rc = ajp_marshal_into_msgb(msg, r, uri);
+ rc = ajp_marshal_into_msgb(msg, r, uri);
if (rc != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
"ajp_send_header: ajp_marshal_into_msgb failed");
@@ -615,7 +615,7 @@ apr_status_t ajp_read_header(apr_socket_t *sock,
{
apr_byte_t result;
apr_status_t rc;
-
+
if (*msg) {
rc = ajp_msg_reuse(*msg);
if (rc != APR_SUCCESS) {
diff --git a/modules/proxy/ajp_link.c b/modules/proxy/ajp_link.c
index 8a735060f5..e5cd2c16eb 100644
--- a/modules/proxy/ajp_link.c
+++ b/modules/proxy/ajp_link.c
@@ -28,9 +28,9 @@ apr_status_t ajp_ilink_send(apr_socket_t *sock, ajp_msg_t *msg)
"ajp_ilink_send(): NULL socket provided");
return AJP_EINVAL;
}
-
+
ajp_msg_end(msg);
-
+
length = msg->len;
buf = (char *)msg->buf;
@@ -68,7 +68,7 @@ static apr_status_t ilink_read(apr_socket_t *sock, apr_byte_t *buf,
continue;
else if (status != APR_SUCCESS)
return status; /* any error. */
-
+
rdlen += length;
length = len - rdlen;
}
@@ -89,15 +89,15 @@ apr_status_t ajp_ilink_receive(apr_socket_t *sock, ajp_msg_t *msg)
}
hlen = msg->header_len;
-
+
status = ilink_read(sock, msg->buf, hlen);
-
+
if (status != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, status, NULL,
"ajp_ilink_receive() can't receive header");
return AJP_ENO_HEADER;
}
-
+
status = ajp_msg_check_header(msg, &blen);
if (status != APR_SUCCESS) {
diff --git a/modules/proxy/ajp_msg.c b/modules/proxy/ajp_msg.c
index 21bda25241..53988bc7e7 100644
--- a/modules/proxy/ajp_msg.c
+++ b/modules/proxy/ajp_msg.c
@@ -42,7 +42,7 @@ char * ajp_msg_dump(apr_pool_t *pool, ajp_msg_t *msg, char *err)
len = 1024;
rv = apr_palloc(pool, bl);
apr_snprintf(rv, bl,
- "ajp_msg_dump(): %s pos=%" APR_SIZE_T_FMT
+ "ajp_msg_dump(): %s pos=%" APR_SIZE_T_FMT
" len=%" APR_SIZE_T_FMT " max=%d\n",
err, msg->pos, msg->len, AJP_MSG_BUFFER_SZ);
bl -= strlen(rv);
@@ -79,7 +79,7 @@ char * ajp_msg_dump(apr_pool_t *pool, ajp_msg_t *msg, char *err)
p = rv + strlen(rv);
}
-
+
return rv;
}
@@ -120,7 +120,7 @@ apr_status_t ajp_msg_check_header(ajp_msg_t *msg, apr_size_t *len)
msg->len = msglen + AJP_HEADER_LEN;
msg->pos = AJP_HEADER_LEN;
*len = msglen;
-
+
return APR_SUCCESS;
}
@@ -134,7 +134,7 @@ apr_status_t ajp_msg_reset(ajp_msg_t *msg)
{
msg->len = AJP_HEADER_LEN;
msg->pos = AJP_HEADER_LEN;
-
+
return APR_SUCCESS;
}
@@ -177,14 +177,14 @@ apr_status_t ajp_msg_end(ajp_msg_t *msg)
msg->buf[2] = (apr_byte_t)((len >> 8) & 0xFF);
msg->buf[3] = (apr_byte_t)(len & 0xFF);
-
+
return APR_SUCCESS;
}
static APR_INLINE int ajp_log_overflow(ajp_msg_t *msg, const char *context)
{
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
- "%s(): BufferOverflowException %" APR_SIZE_T_FMT
+ "%s(): BufferOverflowException %" APR_SIZE_T_FMT
" %" APR_SIZE_T_FMT,
context, msg->pos, msg->len);
return AJP_EOVERFLOW;
@@ -260,8 +260,8 @@ 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
@@ -341,7 +341,7 @@ apr_status_t ajp_msg_get_uint32(ajp_msg_t *msg, apr_uint32_t *rvalue)
value |= ((msg->buf[(msg->pos++)] & 0xFF) << 16);
value |= ((msg->buf[(msg->pos++)] & 0xFF) << 8);
value |= ((msg->buf[(msg->pos++)] & 0xFF));
-
+
*rvalue = value;
return APR_SUCCESS;
}
@@ -357,7 +357,7 @@ apr_status_t ajp_msg_get_uint32(ajp_msg_t *msg, apr_uint32_t *rvalue)
apr_status_t ajp_msg_get_uint16(ajp_msg_t *msg, apr_uint16_t *rvalue)
{
apr_uint16_t value;
-
+
if ((msg->pos + 1) > msg->len) {
return ajp_log_overflow(msg, "ajp_msg_get_uint16");
}
@@ -384,10 +384,10 @@ apr_status_t ajp_msg_peek_uint16(ajp_msg_t *msg, apr_uint16_t *rvalue)
if ((msg->pos + 1) > msg->len) {
return ajp_log_overflow(msg, "ajp_msg_peek_uint16");
}
-
+
value = ((msg->buf[(msg->pos)] & 0xFF) << 8);
value += ((msg->buf[(msg->pos + 1)] & 0xFF));
-
+
*rvalue = value;
return APR_SUCCESS;
}
@@ -405,7 +405,7 @@ apr_status_t ajp_msg_peek_uint8(ajp_msg_t *msg, apr_byte_t *rvalue)
if (msg->pos > msg->len) {
return ajp_log_overflow(msg, "ajp_msg_peek_uint8");
}
-
+
*rvalue = msg->buf[msg->pos];
return APR_SUCCESS;
}
@@ -423,7 +423,7 @@ apr_status_t ajp_msg_get_uint8(ajp_msg_t *msg, apr_byte_t *rvalue)
if (msg->pos > msg->len) {
return ajp_log_overflow(msg, "ajp_msg_get_uint8");
}
-
+
*rvalue = msg->buf[msg->pos++];
return APR_SUCCESS;
}
@@ -441,7 +441,7 @@ apr_status_t ajp_msg_get_string(ajp_msg_t *msg, const char **rvalue)
apr_uint16_t size;
apr_size_t start;
apr_status_t status;
-
+
status = ajp_msg_get_uint16(msg, &size);
start = msg->pos;
@@ -504,11 +504,11 @@ apr_status_t ajp_msg_create(apr_pool_t *pool, ajp_msg_t **rmsg)
"ajp_msg_create(): can't allocate AJP message memory");
return APR_ENOPOOL;
}
-
+
msg->server_side = 0;
msg->buf = (apr_byte_t *)apr_palloc(pool, AJP_MSG_BUFFER_SZ);
-
+
/* XXX: This should never happen
* In case if the OS cannont allocate 8K of data
* we are in serious trouble
@@ -524,7 +524,7 @@ apr_status_t ajp_msg_create(apr_pool_t *pool, ajp_msg_t **rmsg)
msg->len = 0;
msg->header_len = AJP_HEADER_LEN;
*rmsg = msg;
-
+
return APR_SUCCESS;
}
@@ -542,7 +542,7 @@ apr_status_t ajp_msg_copy(ajp_msg_t *smsg, ajp_msg_t *dmsg)
"ajp_msg_copy(): destination msg is null");
return AJP_EINVAL;
}
-
+
if (smsg->len > AJP_MSG_BUFFER_SZ) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
"ajp_msg_copy(): destination buffer too "
@@ -576,11 +576,11 @@ apr_status_t ajp_msg_serialize_ping(ajp_msg_t *msg)
if ((rc = ajp_msg_append_uint8(msg, CMD_AJP13_PING)) != APR_SUCCESS)
return rc;
-
+
return APR_SUCCESS;
}
-/**
+/**
* Serialize in an AJP Message a CPING command
*
* +-----------------------+
@@ -597,6 +597,6 @@ apr_status_t ajp_msg_serialize_cping(ajp_msg_t *msg)
if ((rc = ajp_msg_append_uint8(msg, CMD_AJP13_CPING)) != APR_SUCCESS)
return rc;
-
+
return APR_SUCCESS;
}
diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c
index 1ee15ba13e..1424fe7429 100644
--- a/modules/proxy/mod_proxy.c
+++ b/modules/proxy/mod_proxy.c
@@ -91,7 +91,7 @@ static const char *set_worker_param(apr_pool_t *p,
}
else if (!strcasecmp(key, "ttl")) {
/* Time in seconds that will destroy all the connections
- * that exced the smax
+ * that exced the smax
*/
ival = atoi(val);
if (ival < 1)
@@ -166,7 +166,7 @@ static const char *set_worker_param(apr_pool_t *p,
else
return "KeepAlive must be On|Off";
worker->keepalive_set = 1;
- }
+ }
else if (!strcasecmp(key, "route")) {
/* Worker route.
*/
@@ -189,35 +189,35 @@ static const char *set_worker_param(apr_pool_t *p,
for (v = val; *v; v++) {
if (*v == '+') {
mode = 1;
- v++;
+ v++;
}
else if (*v == '-') {
mode = 0;
- v++;
+ v++;
}
if (*v == 'D' || *v == 'd') {
if (mode)
worker->status |= PROXY_WORKER_DISABLED;
else
- worker->status &= ~PROXY_WORKER_DISABLED;
+ worker->status &= ~PROXY_WORKER_DISABLED;
}
else if (*v == 'S' || *v == 's') {
if (mode)
worker->status |= PROXY_WORKER_STOPPED;
else
- worker->status &= ~PROXY_WORKER_STOPPED;
+ worker->status &= ~PROXY_WORKER_STOPPED;
}
else if (*v == 'E' || *v == 'e') {
if (mode)
worker->status |= PROXY_WORKER_IN_ERROR;
else
- worker->status &= ~PROXY_WORKER_IN_ERROR;
+ worker->status &= ~PROXY_WORKER_IN_ERROR;
}
else {
- return "Unknow status parameter option";
+ return "Unknow status parameter option";
}
}
- }
+ }
else {
return "unknown Worker parameter";
}
@@ -364,7 +364,7 @@ static int proxy_detect(request_rec *r)
if (!(r->parsed_uri.hostname
&& !strcasecmp(r->parsed_uri.scheme, ap_http_scheme(r))
&& ap_matches_request_vhost(r, r->parsed_uri.hostname,
- (apr_port_t)(r->parsed_uri.port_str ? r->parsed_uri.port
+ (apr_port_t)(r->parsed_uri.port_str ? r->parsed_uri.port
: ap_default_port(r))))) {
r->proxyreq = PROXYREQ_PROXY;
r->uri = r->unparsed_uri;
@@ -432,25 +432,25 @@ static int proxy_walk(request_rec *r)
proxy_dir_conf *entry_proxy;
int num_sec = sconf->sec_proxy->nelts;
/* XXX: shouldn't we use URI here? Canonicalize it first?
- * Pass over "proxy:" prefix
+ * Pass over "proxy:" prefix
*/
const char *proxyname = r->filename + 6;
int j;
- for (j = 0; j < num_sec; ++j)
+ for (j = 0; j < num_sec; ++j)
{
entry_config = sec_proxy[j];
entry_proxy = ap_get_module_config(entry_config, &proxy_module);
/* XXX: What about case insensitive matching ???
* Compare regex, fnmatch or string as appropriate
- * If the entry doesn't relate, then continue
+ * If the entry doesn't relate, then continue
*/
- if (entry_proxy->r
+ if (entry_proxy->r
? ap_regexec(entry_proxy->r, proxyname, 0, NULL, 0)
: (entry_proxy->p_is_fnmatch
? apr_fnmatch(entry_proxy->p, proxyname, 0)
- : strncmp(proxyname, entry_proxy->p,
+ : strncmp(proxyname, entry_proxy->p,
strlen(entry_proxy->p)))) {
continue;
}
@@ -608,14 +608,14 @@ static int proxy_handler(request_rec *r)
/* set configured max-forwards */
maxfwd = conf->maxfwd;
}
- apr_table_set(r->headers_in, "Max-Forwards",
+ apr_table_set(r->headers_in, "Max-Forwards",
apr_psprintf(r->pool, "%ld", (maxfwd > 0) ? maxfwd : 0));
if (r->method_number == M_TRACE) {
core_server_config *coreconf = (core_server_config *)
ap_get_module_config(sconf, &core_module);
- if (coreconf->trace_enable == AP_TRACE_DISABLE)
+ if (coreconf->trace_enable == AP_TRACE_DISABLE)
{
/* Allow "error-notes" string to be printed by ap_send_error_response()
* Note; this goes nowhere, canned error response need an overhaul.
@@ -632,7 +632,7 @@ static int proxy_handler(request_rec *r)
* the client a 100 Continue response till the connection has
* been established
*/
- if (coreconf->trace_enable != AP_TRACE_EXTENDED
+ if (coreconf->trace_enable != AP_TRACE_EXTENDED
&& (r->read_length || r->read_chunked || r->remaining))
{
/* Allow "error-notes" string to be printed by ap_send_error_response()
@@ -751,7 +751,7 @@ static int proxy_handler(request_rec *r)
}
else if (access_status == HTTP_SERVICE_UNAVAILABLE) {
/* Recoverable server error.
- * We can failover to another worker
+ * We can failover to another worker
* Mark the worker as unusable if member of load balancer
*/
if (balancer) {
@@ -767,7 +767,7 @@ static int proxy_handler(request_rec *r)
/* Try again if the worker is unusable and the service is
* unavailable.
*/
- } while (!PROXY_WORKER_IS_USABLE(worker) &&
+ } while (!PROXY_WORKER_IS_USABLE(worker) &&
max_attempts > attempts++);
if (DECLINED == access_status) {
@@ -821,16 +821,16 @@ static void * create_proxy_config(apr_pool_t *p, server_rec *s)
ps->io_buffer_size_set = 0;
ps->maxfwd = DEFAULT_MAX_FORWARDS;
ps->maxfwd_set = 0;
- ps->error_override = 0;
- ps->error_override_set = 0;
+ ps->error_override = 0;
+ ps->error_override_set = 0;
ps->preserve_host_set = 0;
- ps->preserve_host = 0;
+ ps->preserve_host = 0;
ps->timeout = 0;
ps->timeout_set = 0;
ps->badopt = bad_error;
ps->badopt_set = 0;
ps->pool = p;
-
+
return ps;
}
@@ -993,7 +993,7 @@ static const char *
const apr_array_header_t *arr;
const apr_table_entry_t *elts;
int i;
-
+
while (*arg) {
word = ap_getword_conf(cmd->pool, &arg);
if (!f)
@@ -1007,7 +1007,7 @@ static const char *
return "Invalid ProxyPass parameter. Parameter must be "
"in the form 'key=value'";
else
- return "ProxyPass can not have a path when defined in a location";
+ return "ProxyPass can not have a path when defined in a location";
}
else
*val++ = '\0';
@@ -1023,7 +1023,7 @@ static const char *
new->real = apr_pstrdup(cmd->pool, r);
if (r[0] == '!' && r[1] == '\0')
return NULL;
-
+
arr = apr_table_elts(params);
elts = (const apr_table_entry_t *)arr->elts;
/* Distinguish the balancer from woker */
@@ -1035,7 +1035,7 @@ static const char *
conf, r);
if (err)
return apr_pstrcat(cmd->temp_pool, "ProxyPass ", err, NULL);
- }
+ }
for (i = 0; i < arr->nelts; i++) {
const char *err = set_balancer_param(conf, cmd->pool, balancer, elts[i].key,
elts[i].val);
@@ -1079,7 +1079,7 @@ static const char *
} else {
if ( r == NULL)
return "ProxyPassReverse needs a path when not defined in a location";
- else
+ else
return "ProxyPassReverse can not have a path when defined in a location";
}
@@ -1325,7 +1325,7 @@ static const char*
psf->timeout_set=1;
psf->timeout=apr_time_from_sec(timeout);
- return NULL;
+ return NULL;
}
static const char*
@@ -1348,7 +1348,7 @@ static const char*
}
psf->viaopt_set = 1;
- return NULL;
+ return NULL;
}
static const char*
@@ -1369,7 +1369,7 @@ static const char*
}
psf->badopt_set = 1;
- return NULL;
+ return NULL;
}
static const char*
@@ -1390,7 +1390,7 @@ static const char*
}
psf->proxy_status_set = 1;
- return NULL;
+ return NULL;
}
static const char *add_member(cmd_parms *cmd, void *dummy, const char *arg)
@@ -1407,7 +1407,7 @@ static const char *add_member(cmd_parms *cmd, void *dummy, const char *arg)
const apr_array_header_t *arr;
const apr_table_entry_t *elts;
int i;
-
+
if (cmd->path)
path = apr_pstrdup(cmd->pool, cmd->path);
while (*arg) {
@@ -1433,7 +1433,7 @@ static const char *add_member(cmd_parms *cmd, void *dummy, const char *arg)
return "BalancerMember must define balancer name when outside <Proxy > section";
if (!name)
return "BalancerMember must define remote proxy server";
-
+
ap_str_tolower(path); /* lowercase scheme://hostname */
/* Try to find existing worker */
@@ -1441,10 +1441,10 @@ static const char *add_member(cmd_parms *cmd, void *dummy, const char *arg)
if (!worker) {
const char *err;
if ((err = ap_proxy_add_worker(&worker, cmd->pool, conf, name)) != NULL)
- return apr_pstrcat(cmd->temp_pool, "BalancerMember ", err, NULL);
+ return apr_pstrcat(cmd->temp_pool, "BalancerMember ", err, NULL);
}
PROXY_COPY_CONF_PARAMS(worker, conf);
-
+
arr = apr_table_elts(params);
elts = (const apr_table_entry_t *)arr->elts;
for (i = 0; i < arr->nelts; i++) {
@@ -1454,7 +1454,7 @@ static const char *add_member(cmd_parms *cmd, void *dummy, const char *arg)
return apr_pstrcat(cmd->temp_pool, "BalancerMember ", err, NULL);
}
/* Try to find the balancer */
- balancer = ap_proxy_get_balancer(cmd->temp_pool, conf, path);
+ balancer = ap_proxy_get_balancer(cmd->temp_pool, conf, path);
if (!balancer) {
const char *err = ap_proxy_add_balancer(&balancer,
cmd->pool,
@@ -1496,13 +1496,13 @@ static const char *
*/
name = ap_getword_conf(cmd->temp_pool, &arg);
}
-
+
if (strncasecmp(name, "balancer:", 9) == 0) {
balancer = ap_proxy_get_balancer(cmd->pool, conf, name);
if (!balancer) {
return apr_pstrcat(cmd->temp_pool, "ProxySet can not find '",
name, "' Balancer.", NULL);
- }
+ }
}
else {
worker = ap_proxy_get_worker(cmd->temp_pool, conf, name);
@@ -1538,7 +1538,7 @@ static void ap_add_per_proxy_conf(server_rec *s, ap_conf_vector_t *dir_config)
proxy_server_conf *sconf = ap_get_module_config(s->module_config,
&proxy_module);
void **new_space = (void **)apr_array_push(sconf->sec_proxy);
-
+
*new_space = dir_config;
}
@@ -1579,7 +1579,7 @@ static const char *proxysection(cmd_parms *cmd, void *mconfig, const char *arg)
if (!strncasecmp(cmd->path, "proxy:", 6))
cmd->path += 6;
- /* XXX Ignore case? What if we proxy a case-insensitive server?!?
+ /* XXX Ignore case? What if we proxy a case-insensitive server?!?
* While we are at it, shouldn't we also canonicalize the entire
* scheme? See proxy_fixup()
*/
@@ -1628,7 +1628,7 @@ static const char *proxysection(cmd_parms *cmd, void *mconfig, const char *arg)
static const command_rec proxy_cmds[] =
{
- AP_INIT_RAW_ARGS("<Proxy", proxysection, NULL, RSRC_CONF,
+ AP_INIT_RAW_ARGS("<Proxy", proxysection, NULL, RSRC_CONF,
"Container for directives affecting resources located in the proxied "
"location"),
AP_INIT_RAW_ARGS("<ProxyMatch", proxysection, (void*)1, RSRC_CONF,
@@ -1674,7 +1674,7 @@ static const command_rec proxy_cmds[] =
AP_INIT_TAKE1("ProxyBadHeader", set_bad_opt, NULL, RSRC_CONF,
"How to handle bad header line in response: IsError | Ignore | StartBody"),
AP_INIT_RAW_ARGS("BalancerMember", add_member, NULL, RSRC_CONF|ACCESS_CONF,
- "A balancer name and scheme with list of params"),
+ "A balancer name and scheme with list of params"),
AP_INIT_TAKE1("ProxyStatus", set_status_opt, NULL, RSRC_CONF,
"Configure Status: proxy status to one of: on | off | full"),
AP_INIT_RAW_ARGS("ProxySet", set_proxy_param, NULL, RSRC_CONF|ACCESS_CONF,
@@ -1689,7 +1689,7 @@ static APR_OPTIONAL_FN_TYPE(ssl_var_lookup) *proxy_ssl_val = NULL;
PROXY_DECLARE(int) ap_proxy_ssl_enable(conn_rec *c)
{
- /*
+ /*
* if c == NULL just check if the optional function was imported
* else run the optional function so ssl filters are inserted
*/
@@ -1764,7 +1764,7 @@ static int proxy_status_hook(request_rec *r, int flags)
ap_rvputs(r, balancer->name, "</h1>\n\n", NULL);
ap_rputs("\n\n<table border=\"0\"><tr>"
"<th>SSes</th><th>Timeout</th><th>Method</th>"
- "</tr>\n<tr>", r);
+ "</tr>\n<tr>", r);
ap_rvputs(r, "<td>", balancer->sticky, NULL);
ap_rprintf(r, "</td><td>%" APR_TIME_T_FMT "</td>",
apr_time_sec(balancer->timeout));
@@ -1827,7 +1827,7 @@ static int proxy_status_hook(request_rec *r, int flags)
static void child_init(apr_pool_t *p, server_rec *s)
{
proxy_worker *reverse = NULL;
-
+
while (s) {
void *sconf = s->module_config;
proxy_server_conf *conf;
@@ -1835,7 +1835,7 @@ static void child_init(apr_pool_t *p, server_rec *s)
int i;
conf = (proxy_server_conf *)ap_get_module_config(sconf, &proxy_module);
- /* Initialize worker's shared scoreboard data */
+ /* Initialize worker's shared scoreboard data */
worker = (proxy_worker *)conf->workers->elts;
for (i = 0; i < conf->workers->nelts; i++) {
ap_proxy_initialize_worker_share(conf, worker, s);
@@ -1848,7 +1848,7 @@ static void child_init(apr_pool_t *p, server_rec *s)
ap_proxy_initialize_worker(conf->forward, s);
/* Do not disable worker in case of errors */
conf->forward->s->status |= PROXY_WORKER_IGNORE_ERRORS;
- /* Disable address cache for generic forward worker */
+ /* Disable address cache for generic forward worker */
conf->forward->is_address_reusable = 0;
}
if (!reverse) {
@@ -1860,7 +1860,7 @@ static void child_init(apr_pool_t *p, server_rec *s)
ap_proxy_initialize_worker(reverse, s);
/* Do not disable worker in case of errors */
reverse->s->status |= PROXY_WORKER_IGNORE_ERRORS;
- /* Disable address cache for generic reverse worker */
+ /* Disable address cache for generic reverse worker */
reverse->is_address_reusable = 0;
}
conf->reverse = reverse;
@@ -1877,7 +1877,7 @@ static int proxy_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
{
APR_OPTIONAL_HOOK(ap, status_hook, proxy_status_hook, NULL, NULL,
APR_HOOK_MIDDLE);
- /* Reset workers count on gracefull restart */
+ /* Reset workers count on gracefull restart */
proxy_lb_workers = 0;
return OK;
}
@@ -1893,7 +1893,7 @@ static void register_hooks(apr_pool_t *p)
* initializes.
*/
static const char *const aszPred[] = { "mpm_winnt.c", NULL};
-
+
APR_REGISTER_OPTIONAL_FN(ap_proxy_lb_workers);
/* handler */
ap_hook_handler(proxy_handler, NULL, NULL, APR_HOOK_FIRST);
@@ -1906,11 +1906,11 @@ static void register_hooks(apr_pool_t *p)
/* post read_request handling */
ap_hook_post_read_request(proxy_detect, NULL, NULL, APR_HOOK_FIRST);
/* pre config handling */
- ap_hook_pre_config(proxy_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
+ ap_hook_pre_config(proxy_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
/* post config handling */
ap_hook_post_config(proxy_post_config, NULL, NULL, APR_HOOK_MIDDLE);
/* child init handling */
- ap_hook_child_init(child_init, aszPred, NULL, APR_HOOK_MIDDLE);
+ ap_hook_child_init(child_init, aszPred, NULL, APR_HOOK_MIDDLE);
}
@@ -1933,19 +1933,19 @@ APR_HOOK_STRUCT(
APR_HOOK_LINK(request_status)
)
-APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(proxy, PROXY, int, scheme_handler,
+APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(proxy, PROXY, int, scheme_handler,
(request_rec *r, proxy_worker *worker,
- proxy_server_conf *conf,
- char *url, const char *proxyhost,
+ proxy_server_conf *conf,
+ char *url, const char *proxyhost,
apr_port_t proxyport),(r,worker,conf,
url,proxyhost,proxyport),DECLINED)
-APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(proxy, PROXY, int, canon_handler,
+APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(proxy, PROXY, int, canon_handler,
(request_rec *r, char *url),(r,
url),DECLINED)
APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(proxy, PROXY, int, pre_request, (
proxy_worker **worker,
proxy_balancer **balancer,
- request_rec *r,
+ request_rec *r,
proxy_server_conf *conf,
char **url),(worker,balancer,
r,conf,url),DECLINED)
@@ -1959,6 +1959,6 @@ APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(proxy, PROXY, int, fixups,
(request_rec *r), (r),
OK, DECLINED)
APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(proxy, PROXY, int, request_status,
- (int *status, request_rec *r),
+ (int *status, request_rec *r),
(status, r),
OK, DECLINED)
diff --git a/modules/proxy/mod_proxy_ajp.c b/modules/proxy/mod_proxy_ajp.c
index afee93eafb..22e7cefcd7 100644
--- a/modules/proxy/mod_proxy_ajp.c
+++ b/modules/proxy/mod_proxy_ajp.c
@@ -198,7 +198,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
/* Try to send something */
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: data to read (max %" APR_SIZE_T_FMT
+ "proxy: data to read (max %" APR_SIZE_T_FMT
" at %" APR_SIZE_T_FMT ")", bufsiz, msg->pos);
status = apr_brigade_flatten(input_brigade, buff, &bufsiz);
diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c
index 0862854b7b..988508adf3 100644
--- a/modules/proxy/mod_proxy_balancer.c
+++ b/modules/proxy/mod_proxy_balancer.c
@@ -33,7 +33,7 @@ static int proxy_balancer_canon(request_rec *r, char *url)
if (strncasecmp(url, "balancer:", 9) == 0) {
url += 9;
- }
+ }
else {
return DECLINED;
}
@@ -78,7 +78,7 @@ static int init_balancer_members(proxy_server_conf *conf, server_rec *s,
proxy_balancer *balancer)
{
int i;
- proxy_worker *workers;
+ proxy_worker *workers;
workers = (proxy_worker *)balancer->workers->elts;
@@ -111,7 +111,7 @@ static char *get_path_param(apr_pool_t *pool, char *url,
const char *name)
{
char *path = NULL;
-
+
for (path = strstr(url, name); path; path = strstr(path + 1, name)) {
path += (strlen(name) + 1);
if (*path == '=') {
@@ -137,13 +137,13 @@ static char *get_cookie_param(request_rec *r, const char *name)
const char *start_cookie;
if ((cookies = apr_table_get(r->headers_in, "Cookie"))) {
- for (start_cookie = ap_strstr_c(cookies, name); start_cookie;
+ for (start_cookie = ap_strstr_c(cookies, name); start_cookie;
start_cookie = ap_strstr_c(start_cookie + 1, name)) {
if (start_cookie == cookies ||
start_cookie[-1] == ';' ||
start_cookie[-1] == ',' ||
isspace(start_cookie[-1])) {
-
+
start_cookie += strlen(name);
while(*start_cookie && isspace(*start_cookie))
++start_cookie;
@@ -161,7 +161,7 @@ static char *get_cookie_param(request_rec *r, const char *name)
return cookie;
}
}
- }
+ }
}
return NULL;
}
@@ -235,13 +235,13 @@ static proxy_worker *find_best_worker(proxy_balancer *balancer,
request_rec *r)
{
proxy_worker *candidate = NULL;
-
+
if (PROXY_THREAD_LOCK(balancer) != APR_SUCCESS)
- return NULL;
+ return NULL;
candidate = (*balancer->lbmethod->finder)(balancer, r);
-/*
+/*
PROXY_THREAD_UNLOCK(balancer);
return NULL;
*/
@@ -258,10 +258,10 @@ static proxy_worker *find_best_worker(proxy_balancer *balancer,
*/
#if APR_HAS_THREADS
if (balancer->timeout) {
- /* XXX: This can perhaps be build using some
+ /* XXX: This can perhaps be build using some
* smarter mechanism, like tread_cond.
- * But since the statuses can came from
- * different childs, use the provided algo.
+ * But since the statuses can came from
+ * different childs, use the provided algo.
*/
apr_interval_time_t timeout = balancer->timeout;
apr_interval_time_t step, tval = 0;
@@ -290,7 +290,7 @@ static int rewrite_url(request_rec *r, proxy_worker *worker,
{
const char *scheme = strstr(*url, "://");
const char *path = NULL;
-
+
if (scheme)
path = ap_strchr_c(scheme + 3, '/');
@@ -302,7 +302,7 @@ static int rewrite_url(request_rec *r, proxy_worker *worker,
}
*url = apr_pstrcat(r->pool, worker->name, path, NULL);
-
+
return OK;
}
@@ -317,7 +317,7 @@ static int proxy_balancer_pre_request(proxy_worker **worker,
apr_status_t rv;
*worker = NULL;
- /* Step 1: check if the url is for us
+ /* Step 1: check if the url is for us
* The url we can handle starts with 'balancer://'
* If balancer is already provided skip the search
* for balancer, because this is failover attempt.
@@ -325,9 +325,9 @@ static int proxy_balancer_pre_request(proxy_worker **worker,
if (!*balancer &&
!(*balancer = ap_proxy_get_balancer(r->pool, conf, *url)))
return DECLINED;
-
+
/* Step 2: find the session route */
-
+
runtime = find_session_route(*balancer, r, &route, url);
/* Lock the LoadBalancer
* XXX: perhaps we need the process lock here
@@ -341,7 +341,7 @@ static int proxy_balancer_pre_request(proxy_worker **worker,
int i, total_factor = 0;
proxy_worker *workers;
/* We have a sticky load balancer
- * Update the workers status
+ * Update the workers status
* so that even session routes get
* into account.
*/
@@ -376,7 +376,7 @@ static int proxy_balancer_pre_request(proxy_worker **worker,
ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
"proxy: BALANCER: (%s). All workers are in error state",
(*balancer)->name);
-
+
return HTTP_SERVICE_UNAVAILABLE;
}
*worker = runtime;
@@ -398,7 +398,7 @@ static int proxy_balancer_pre_request(proxy_worker **worker,
(*balancer)->name, (*worker)->name, *url);
return access_status;
-}
+}
static int proxy_balancer_post_request(proxy_worker *worker,
proxy_balancer *balancer,
@@ -420,17 +420,17 @@ static int proxy_balancer_post_request(proxy_worker *worker,
* track on that.
*/
- PROXY_THREAD_UNLOCK(balancer);
+ PROXY_THREAD_UNLOCK(balancer);
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"proxy_balancer_post_request for (%s)", balancer->name);
return OK;
-}
+}
static void recalc_factors(proxy_balancer *balancer)
{
int i;
- proxy_worker *workers;
+ proxy_worker *workers;
/* Recalculate lbfactors */
@@ -448,7 +448,7 @@ static void recalc_factors(proxy_balancer *balancer)
}
}
-/* Manages the loadfactors and member status
+/* Manages the loadfactors and member status
*/
static int balancer_handler(request_rec *r)
{
@@ -580,9 +580,9 @@ static int balancer_handler(request_rec *r)
for (n = 0; n < balancer->workers->nelts; n++) {
ap_rputs(" <httpd:worker>\n", r);
ap_rvputs(r, " <httpd:scheme>", worker->scheme,
- "</httpd:scheme>\n", NULL);
+ "</httpd:scheme>\n", NULL);
ap_rvputs(r, " <httpd:hostname>", worker->hostname,
- "</httpd:hostname>\n", NULL);
+ "</httpd:hostname>\n", NULL);
ap_rprintf(r, " <httpd:loadfactor>%d</httpd:loadfactor>\n",
worker->s->lbfactor);
ap_rputs(" </httpd:worker>\n", r);
@@ -593,7 +593,7 @@ static int balancer_handler(request_rec *r)
++balancer;
}
ap_rputs(" </httpd:balancers>\n", r);
- ap_rputs("</httpd:manager>", r);
+ ap_rputs("</httpd:manager>", r);
}
else {
ap_set_content_type(r, "text/html");
@@ -611,11 +611,11 @@ static int balancer_handler(request_rec *r)
ap_rputs("<hr />\n<h3>LoadBalancer Status for ", r);
ap_rvputs(r, "<a href=\"", r->uri, "?b=",
balancer->name + sizeof("balancer://") - 1,
- "\">", NULL);
+ "\">", NULL);
ap_rvputs(r, balancer->name, "</a></h3>\n\n", NULL);
ap_rputs("\n\n<table border=\"0\" style=\"text-align: left;\"><tr>"
"<th>StickySession</th><th>Timeout</th><th>FailoverAttempts</th><th>Method</th>"
- "</tr>\n<tr>", r);
+ "</tr>\n<tr>", r);
ap_rvputs(r, "<td>", balancer->sticky, NULL);
ap_rprintf(r, "</td><td>%" APR_TIME_T_FMT "</td>",
apr_time_sec(balancer->timeout));
@@ -635,7 +635,7 @@ static int balancer_handler(request_rec *r)
ap_rvputs(r, "<tr>\n<td><a href=\"", r->uri, "?b=",
balancer->name + sizeof("balancer://") - 1, "&w=",
ap_escape_uri(r->pool, worker->name),
- "\">", NULL);
+ "\">", NULL);
ap_rvputs(r, worker->name, "</a></td>", NULL);
ap_rvputs(r, "<td>", worker->s->route, NULL);
ap_rvputs(r, "</td><td>", worker->s->redirect, NULL);
@@ -660,25 +660,25 @@ static int balancer_handler(request_rec *r)
ap_rputs("<h3>Edit worker settings for ", r);
ap_rvputs(r, wsel->name, "</h3>\n", NULL);
ap_rvputs(r, "<form method=\"GET\" action=\"", NULL);
- ap_rvputs(r, r->uri, "\">\n<dl>", NULL);
+ ap_rvputs(r, r->uri, "\">\n<dl>", NULL);
ap_rputs("<table><tr><td>Load factor:</td><td><input name=\"lf\" type=text ", r);
- ap_rprintf(r, "value=\"%d\"></td><tr>\n", wsel->s->lbfactor);
+ ap_rprintf(r, "value=\"%d\"></td><tr>\n", wsel->s->lbfactor);
ap_rputs("<tr><td>Route:</td><td><input name=\"wr\" type=text ", r);
- ap_rvputs(r, "value=\"", wsel->route, NULL);
- ap_rputs("\"></td><tr>\n", r);
+ ap_rvputs(r, "value=\"", wsel->route, NULL);
+ ap_rputs("\"></td><tr>\n", r);
ap_rputs("<tr><td>Route Redirect:</td><td><input name=\"rr\" type=text ", r);
- ap_rvputs(r, "value=\"", wsel->redirect, NULL);
- ap_rputs("\"></td><tr>\n", r);
+ ap_rvputs(r, "value=\"", wsel->redirect, NULL);
+ ap_rputs("\"></td><tr>\n", r);
ap_rputs("<tr><td>Status:</td><td>Disabled: <input name=\"dw\" value=\"Disable\" type=radio", r);
if (wsel->s->status & PROXY_WORKER_DISABLED)
ap_rputs(" checked", r);
ap_rputs("> | Enabled: <input name=\"dw\" value=\"Enable\" type=radio", r);
if (!(wsel->s->status & PROXY_WORKER_DISABLED))
ap_rputs(" checked", r);
- ap_rputs("></td><tr>\n", r);
+ ap_rputs("></td><tr>\n", r);
ap_rputs("<tr><td colspan=2><input type=submit value=\"Submit\"></td></tr>\n", r);
ap_rvputs(r, "</table>\n<input type=hidden name=\"w\" ", NULL);
- ap_rvputs(r, "value=\"", ap_escape_uri(r->pool, wsel->name), "\">\n", NULL);
+ ap_rvputs(r, "value=\"", ap_escape_uri(r->pool, wsel->name), "\">\n", NULL);
ap_rvputs(r, "<input type=hidden name=\"b\" ", NULL);
ap_rvputs(r, "value=\"", bsel->name + sizeof("balancer://") - 1,
"\">\n</form>\n", NULL);
@@ -688,7 +688,7 @@ static int balancer_handler(request_rec *r)
ap_rputs("<h3>Edit balancer settings for ", r);
ap_rvputs(r, bsel->name, "</h3>\n", NULL);
ap_rvputs(r, "<form method=\"GET\" action=\"", NULL);
- ap_rvputs(r, r->uri, "\">\n<dl>", NULL);
+ ap_rvputs(r, r->uri, "\">\n<dl>", NULL);
ap_rputs("<table><tr><td>StickySession Identifier:</td><td><input name=\"ss\" type=text ", r);
if (bsel->sticky)
ap_rvputs(r, "value=\"", bsel->sticky, "\"", NULL);
@@ -733,8 +733,8 @@ static void child_init(apr_pool_t *p, server_rec *s)
proxy_balancer *balancer;
int i;
conf = (proxy_server_conf *)ap_get_module_config(sconf, &proxy_module);
-
- /* Initialize shared scoreboard data */
+
+ /* Initialize shared scoreboard data */
balancer = (proxy_balancer *)conf->balancers->elts;
for (i = 0; i < conf->balancers->nelts; i++) {
init_balancer_members(conf, s, balancer);
@@ -790,7 +790,7 @@ static void child_init(apr_pool_t *p, server_rec *s)
* b a d c d a c d b d ...
*
*/
-
+
static proxy_worker *find_best_byrequests(proxy_balancer *balancer,
request_rec *r)
{
@@ -798,7 +798,7 @@ static proxy_worker *find_best_byrequests(proxy_balancer *balancer,
int total_factor = 0;
proxy_worker *worker = (proxy_worker *)balancer->workers->elts;
proxy_worker *mycandidate = NULL;
-
+
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"proxy: Entering byrequests for BALANCER (%s)",
@@ -859,7 +859,7 @@ static proxy_worker *find_best_bytraffic(proxy_balancer *balancer,
apr_off_t curmin = 0;
proxy_worker *worker = (proxy_worker *)balancer->workers->elts;
proxy_worker *mycandidate = NULL;
-
+
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"proxy: Entering bytraffic for BALANCER (%s)",
balancer->name);
@@ -887,7 +887,7 @@ static proxy_worker *find_best_bytraffic(proxy_balancer *balancer,
}
worker++;
}
-
+
if (mycandidate) {
mycandidate->s->elected++;
}
@@ -925,8 +925,8 @@ static void ap_proxy_balancer_register_hook(apr_pool_t *p)
/* manager handler */
ap_hook_handler(balancer_handler, NULL, NULL, APR_HOOK_FIRST);
ap_hook_child_init(child_init, aszPred, NULL, APR_HOOK_MIDDLE);
- proxy_hook_pre_request(proxy_balancer_pre_request, NULL, NULL, APR_HOOK_FIRST);
- proxy_hook_post_request(proxy_balancer_post_request, NULL, NULL, APR_HOOK_FIRST);
+ proxy_hook_pre_request(proxy_balancer_pre_request, NULL, NULL, APR_HOOK_FIRST);
+ proxy_hook_post_request(proxy_balancer_post_request, NULL, NULL, APR_HOOK_FIRST);
proxy_hook_canon_handler(proxy_balancer_canon, NULL, NULL, APR_HOOK_FIRST);
ap_register_provider(p, PROXY_LBMETHOD, "bytraffic", "0", &bytraffic);
ap_register_provider(p, PROXY_LBMETHOD, "byrequests", "0", &byrequests);
diff --git a/modules/proxy/mod_proxy_connect.c b/modules/proxy/mod_proxy_connect.c
index 4444a3ca76..4238362c06 100644
--- a/modules/proxy/mod_proxy_connect.c
+++ b/modules/proxy/mod_proxy_connect.c
@@ -23,7 +23,7 @@
module AP_MODULE_DECLARE_DATA proxy_connect_module;
-/*
+/*
* This handles Netscape CONNECT method secure proxy requests.
* A connection is opened to the specified host and data is
* passed through between the WWW site and the browser.
@@ -32,8 +32,8 @@ module AP_MODULE_DECLARE_DATA proxy_connect_module;
* "Tunneling SSL Through a WWW Proxy" currently at
* http://www.mcom.com/newsref/std/tunneling_ssl.html.
*
- * If proxyhost and proxyport are set, we send a CONNECT to
- * the specified proxy..
+ * If proxyhost and proxyport are set, we send a CONNECT to
+ * the specified proxy..
*
* FIXME: this doesn't log the number of bytes sent, but
* that may be okay, since the data is supposed to
@@ -73,8 +73,8 @@ static int proxy_connect_canon(request_rec *r, char *url)
/* CONNECT handler */
static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
- proxy_server_conf *conf,
- char *url, const char *proxyname,
+ proxy_server_conf *conf,
+ char *url, const char *proxyname,
apr_port_t proxyport)
{
apr_pool_t *p = r->pool;
@@ -239,7 +239,7 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
ap_xlate_proto_to_ascii(buffer, nbytes);
apr_socket_send(client_socket, buffer, &nbytes);
#if 0
- /* This is safer code, but it doesn't work yet. I'm leaving it
+ /* This is safer code, but it doesn't work yet. I'm leaving it
* here so that I can fix it later.
*/
r->status = HTTP_OK;
diff --git a/modules/proxy/mod_proxy_ftp.c b/modules/proxy/mod_proxy_ftp.c
index 1465827dfc..ef2bb90207 100644
--- a/modules/proxy/mod_proxy_ftp.c
+++ b/modules/proxy/mod_proxy_ftp.c
@@ -733,7 +733,7 @@ apr_status_t proxy_ftp_cleanup(request_rec *r, proxy_conn_rec *backend)
backend->close_on_recycle = 1;
ap_set_module_config(r->connection->conn_config, &proxy_ftp_module, NULL);
- ap_proxy_release_connection("FTP", backend, r->server);
+ ap_proxy_release_connection("FTP", backend, r->server);
return OK;
}
@@ -769,7 +769,7 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
char buffer[MAX_STRING_LEN];
char *ftpmessage = NULL;
char *path, *strp, *type_suffix, *cwd = NULL;
- apr_uri_t uri;
+ apr_uri_t uri;
char *user = NULL;
/* char *account = NULL; how to supply an account in a URL? */
const char *password = NULL;
@@ -914,8 +914,8 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
connectname, APR_UNSPEC,
connectport, 0,
address_pool);
- if (worker->is_address_reusable && !worker->cp->addr) {
- worker->cp->addr = connect_addr;
+ if (worker->is_address_reusable && !worker->cp->addr) {
+ worker->cp->addr = connect_addr;
PROXY_THREAD_UNLOCK(worker);
}
/*
@@ -945,9 +945,9 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
}
return status;
}
- /* TODO: see if ftp could use determine_connection */
+ /* TODO: see if ftp could use determine_connection */
backend->addr = connect_addr;
- ap_set_module_config(c->conn_config, &proxy_ftp_module, backend);
+ ap_set_module_config(c->conn_config, &proxy_ftp_module, backend);
}
@@ -1221,7 +1221,7 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
}
#if !defined (TPF) && !defined(BEOS)
- if (conf->recv_buffer_size > 0
+ if (conf->recv_buffer_size > 0
&& (rv = apr_socket_opt_set(data_sock, APR_SO_RCVBUF,
conf->recv_buffer_size))) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
@@ -1309,7 +1309,7 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
}
#if !defined (TPF) && !defined(BEOS)
- if (conf->recv_buffer_size > 0
+ if (conf->recv_buffer_size > 0
&& (rv = apr_socket_opt_set(data_sock, APR_SO_RCVBUF,
conf->recv_buffer_size))) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
@@ -1355,7 +1355,7 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
local_port = local_addr->port;
apr_sockaddr_ip_get(&local_ip, local_addr);
- if ((rv = apr_socket_opt_set(local_sock, APR_SO_REUSEADDR, one))
+ if ((rv = apr_socket_opt_set(local_sock, APR_SO_REUSEADDR, one))
!= APR_SUCCESS) {
#ifndef _OSD_POSIX /* BS2000 has this option "always on" */
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
@@ -1478,7 +1478,7 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"proxy: FTP: SIZE shows this is a directory");
dirlisting = 1;
- rc = proxy_ftp_command(apr_pstrcat(p, "CWD ",
+ rc = proxy_ftp_command(apr_pstrcat(p, "CWD ",
ftp_escape_globbingchars(p, path), CRLF, NULL),
r, origin, bb, &ftpmessage);
/* possible results: 250, 421, 500, 501, 502, 530, 550 */
@@ -1778,10 +1778,10 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
"proxy: FTP: start body send");
/* read the body, pass it to the output filters */
- while (ap_get_brigade(data->input_filters,
- bb,
- AP_MODE_READBYTES,
- APR_BLOCK_READ,
+ while (ap_get_brigade(data->input_filters,
+ bb,
+ AP_MODE_READBYTES,
+ APR_BLOCK_READ,
conf->io_buffer_size) == APR_SUCCESS) {
#if DEBUGGING
{
diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c
index 449cb9fe20..8333321780 100644
--- a/modules/proxy/mod_proxy_http.c
+++ b/modules/proxy/mod_proxy_http.c
@@ -92,7 +92,7 @@ static int proxy_http_canon(request_rec *r, char *url)
if (ap_strchr_c(host, ':')) { /* if literal IPv6 address */
host = apr_pstrcat(r->pool, "[", host, "]", NULL);
}
- r->filename = apr_pstrcat(r->pool, "proxy:", scheme, "://", host, sport,
+ r->filename = apr_pstrcat(r->pool, "proxy:", scheme, "://", host, sport,
"/", path, (search) ? "?" : "", (search) ? search : "", NULL);
return OK;
}
@@ -228,20 +228,20 @@ static apr_status_t stream_reqbody_chunked(apr_pool_t *p,
apr_brigade_length(input_brigade, 1, &bytes);
hdr_len = apr_snprintf(chunk_hdr, sizeof(chunk_hdr),
- "%" APR_UINT64_T_HEX_FMT CRLF,
+ "%" APR_UINT64_T_HEX_FMT CRLF,
(apr_uint64_t)bytes);
-
+
ap_xlate_proto_to_ascii(chunk_hdr, hdr_len);
e = apr_bucket_transient_create(chunk_hdr, hdr_len,
bucket_alloc);
APR_BRIGADE_INSERT_HEAD(input_brigade, e);
-
+
/*
* Append the end-of-chunk CRLF
*/
e = apr_bucket_immortal_create(ASCII_CRLF, 2, bucket_alloc);
APR_BRIGADE_INSERT_TAIL(input_brigade, e);
-
+
if (header_brigade) {
/* we never sent the header brigade, so go ahead and
* take care of that now
@@ -267,7 +267,7 @@ static apr_status_t stream_reqbody_chunked(apr_pool_t *p,
else {
bb = input_brigade;
}
-
+
/* The request is flushed below this loop with chunk EOS header */
status = pass_brigade(bucket_alloc, r, p_conn, origin, bb, 0);
if (status != APR_SUCCESS) {
@@ -388,7 +388,7 @@ static apr_status_t stream_reqbody_cl(apr_pool_t *p,
else {
bb = input_brigade;
}
-
+
/* Once we hit EOS, we are ready to flush. */
status = pass_brigade(bucket_alloc, r, p_conn, origin, bb, seen_eos);
if (status != APR_SUCCESS) {
@@ -407,7 +407,7 @@ static apr_status_t stream_reqbody_cl(apr_pool_t *p,
return status;
}
}
-
+
if (bytes_streamed != cl_val) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
"proxy: client %s given Content-Length did not match"
@@ -520,7 +520,7 @@ static apr_status_t spool_reqbody_cl(apr_pool_t *p,
}
}
-
+
bytes_spooled += bytes;
if (seen_eos) {
@@ -605,7 +605,7 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
/* strip connection listed hop-by-hop headers from the request */
/* even though in theory a connection: close coming from the client
* should not affect the connection to the server, it's unlikely
- * that subsequent client requests will hit this thread/process,
+ * that subsequent client requests will hit this thread/process,
* so we cancel server keepalive if the client does.
*/
if (ap_proxy_liststr(apr_table_get(r->headers_in,
@@ -641,25 +641,25 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
} else {
buf = apr_pstrcat(p, "Host: ", uri->hostname, CRLF, NULL);
}
- }
+ }
else {
- /* don't want to use r->hostname, as the incoming header might have a
- * port attached
+ /* don't want to use r->hostname, as the incoming header might have a
+ * port attached
*/
- const char* hostname = apr_table_get(r->headers_in,"Host");
+ const char* hostname = apr_table_get(r->headers_in,"Host");
if (!hostname) {
hostname = r->server->server_hostname;
ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
"proxy: no HTTP 0.9 request (with no host line) "
"on incoming request and preserve host set "
- "forcing hostname to be %s for uri %s",
- hostname,
+ "forcing hostname to be %s for uri %s",
+ hostname,
r->uri );
}
buf = apr_pstrcat(p, "Host: ", hostname, CRLF, NULL);
}
ap_xlate_proto_to_ascii(buf, strlen(buf));
- e = apr_bucket_pool_create(buf, strlen(buf), p, c->bucket_alloc);
+ e = apr_bucket_pool_create(buf, strlen(buf), p, c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(header_brigade, e);
/* handle Via */
@@ -741,7 +741,7 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
headers_in_array = apr_table_elts(r->headers_in);
headers_in = (const apr_table_entry_t *) headers_in_array->elts;
for (counter = 0; counter < headers_in_array->nelts; counter++) {
- if (headers_in[counter].key == NULL
+ if (headers_in[counter].key == NULL
|| headers_in[counter].val == NULL
/* Already sent */
@@ -755,7 +755,7 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
|| !strcasecmp(headers_in[counter].key, "Trailer")
|| !strcasecmp(headers_in[counter].key, "Upgrade")
- /* XXX: @@@ FIXME: "Proxy-Authorization" should *only* be
+ /* XXX: @@@ FIXME: "Proxy-Authorization" should *only* be
* suppressed if THIS server requested the authentication,
* not when a frontend proxy requested it!
*
@@ -830,7 +830,7 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
* that the can and have done so unless they they remove
* their decoding from the headers_in T-E list.
* XXX: Make this extensible, but in doing so, presume the
- * encoding has been done by the extensions' handler, and
+ * encoding has been done by the extensions' handler, and
* do not modify add_te_chunked's logic
*/
if (old_te_val && strcmp(old_te_val, "chunked") != 0) {
@@ -900,7 +900,7 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
* surrender once we hit 80 bytes less than MAX_MEM_SPOOL
* (an arbitrary value.)
*/
- } while ((bytes_read < MAX_MEM_SPOOL - 80)
+ } while ((bytes_read < MAX_MEM_SPOOL - 80)
&& !APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(input_brigade)));
/* Use chunked request body encoding or send a content-length body?
@@ -909,10 +909,10 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
*
* We have no request body (handled by RB_STREAM_CL)
*
- * We have a request body length <= MAX_MEM_SPOOL
+ * We have a request body length <= MAX_MEM_SPOOL
*
* The administrator has setenv force-proxy-request-1.0
- *
+ *
* The client sent a C-L body, and the administrator has
* not setenv proxy-sendchunked or has set setenv proxy-sendcl
*
@@ -935,12 +935,12 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
* input to a temporary file. Chunked is always preferable.
*
* We can only trust the client-provided C-L if the T-E header
- * is absent, and the filters are unchanged (the body won't
+ * is absent, and the filters are unchanged (the body won't
* be resized by another content filter).
*/
if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(input_brigade))) {
/* The whole thing fit, so our decision is trivial, use
- * the filtered bytes read from the client for the request
+ * the filtered bytes read from the client for the request
* body Content-Length.
*
* If we expected no body, and read no body, do not set
@@ -952,7 +952,7 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
rb_method = RB_STREAM_CL;
}
else if (old_te_val) {
- if (force10
+ if (force10
|| (apr_table_get(r->subprocess_env, "proxy-sendcl")
&& !apr_table_get(r->subprocess_env, "proxy-sendchunks"))) {
rb_method = RB_SPOOL_CL;
@@ -965,7 +965,7 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
if (r->input_filters == r->proto_input_filters) {
rb_method = RB_STREAM_CL;
}
- else if (!force10
+ else if (!force10
&& apr_table_get(r->subprocess_env, "proxy-sendchunks")
&& !apr_table_get(r->subprocess_env, "proxy-sendcl")) {
rb_method = RB_STREAM_CHUNKED;
@@ -995,11 +995,11 @@ skip_body:
/* send the request body, if any. */
switch(rb_method) {
case RB_STREAM_CHUNKED:
- status = stream_reqbody_chunked(p, r, p_conn, origin, header_brigade,
+ status = stream_reqbody_chunked(p, r, p_conn, origin, header_brigade,
input_brigade);
break;
case RB_STREAM_CL:
- status = stream_reqbody_cl(p, r, p_conn, origin, header_brigade,
+ status = stream_reqbody_cl(p, r, p_conn, origin, header_brigade,
input_brigade, old_cl_val);
break;
case RB_SPOOL_CL:
@@ -1018,7 +1018,7 @@ skip_body:
ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
"proxy: pass request body failed to %pI (%s)"
" from %s (%s)",
- p_conn->addr,
+ p_conn->addr,
p_conn->hostname ? p_conn->hostname: "",
c->remote_ip,
c->remote_host ? c->remote_host: "");
@@ -1265,7 +1265,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
buffer[13] = '\0';
}
r->status_line = apr_pstrdup(p, &buffer[9]);
-
+
/* read the headers. */
/* N.B. for HTTP/1.0 clients, we have to fold line-wrapped headers*/
@@ -1312,10 +1312,10 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
/* can't have both Content-Length and Transfer-Encoding */
if (apr_table_get(r->headers_out, "Transfer-Encoding")
&& apr_table_get(r->headers_out, "Content-Length")) {
- /*
+ /*
* 2616 section 4.4, point 3: "if both Transfer-Encoding
* and Content-Length are received, the latter MUST be
- * ignored";
+ * ignored";
*
* To help mitigate HTTP Splitting, unset Content-Length
* and shut down the backend server connection
@@ -1335,7 +1335,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
ap_proxy_clear_connection(p, r->headers_out);
if ((buf = apr_table_get(r->headers_out, "Content-Type"))) {
ap_set_content_type(r, apr_pstrdup(p, buf));
- }
+ }
ap_proxy_pre_http_request(origin,rp);
/* handle Via header in response */
@@ -1442,7 +1442,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"proxy: start body send");
-
+
/*
* if we are overriding the errors, we can't put the content
* of the page into the brigade
@@ -1456,7 +1456,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
apr_off_t readbytes;
apr_status_t rv;
- rv = ap_get_brigade(rp->input_filters, bb,
+ rv = ap_get_brigade(rp->input_filters, bb,
AP_MODE_READBYTES, mode,
conf->io_buffer_size);
@@ -1467,7 +1467,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
/* flush to the client and switch to blocking mode */
e = apr_bucket_flush_create(c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, e);
- if (ap_pass_brigade(r->output_filters, bb)
+ if (ap_pass_brigade(r->output_filters, bb)
|| c->aborted) {
backend->close = 1;
break;
@@ -1486,7 +1486,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
}
/* next time try a non-blocking read */
mode = APR_NONBLOCK_READ;
-
+
apr_brigade_length(bb, 0, &readbytes);
backend->worker->s->read += readbytes;
#if DEBUGGING
@@ -1565,7 +1565,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
}
return status;
}
- } else
+ } else
return OK;
}
@@ -1583,7 +1583,7 @@ apr_status_t ap_proxy_http_cleanup(const char *scheme, request_rec *r,
if (backend->close || (r->proto_num < HTTP_VERSION(1,1))) {
backend->close_on_recycle = 1;
ap_set_module_config(r->connection->conn_config, &proxy_http_module, NULL);
- ap_proxy_release_connection(scheme, backend, r->server);
+ ap_proxy_release_connection(scheme, backend, r->server);
}
return OK;
}
@@ -1599,7 +1599,7 @@ apr_status_t ap_proxy_http_cleanup(const char *scheme, request_rec *r,
*/
static int proxy_http_handler(request_rec *r, proxy_worker *worker,
proxy_server_conf *conf,
- char *url, const char *proxyname,
+ char *url, const char *proxyname,
apr_port_t proxyport)
{
int status;
@@ -1660,9 +1660,9 @@ static int proxy_http_handler(request_rec *r, proxy_worker *worker,
}
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"proxy: HTTP: serving URL %s", url);
-
-
- /* only use stored info for top-level pages. Sub requests don't share
+
+
+ /* only use stored info for top-level pages. Sub requests don't share
* in keepalives
*/
if (!r->main) {
@@ -1705,7 +1705,7 @@ static int proxy_http_handler(request_rec *r, proxy_worker *worker,
c, r->server)) != OK)
goto cleanup;
}
-
+
/* Step Four: Send the Request */
if ((status = ap_proxy_http_request(p, r, backend, backend->connection,
conf, uri, url, server_portstr)) != OK)
diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c
index 0fb499be5d..96a743eadc 100644
--- a/modules/proxy/proxy_util.c
+++ b/modules/proxy/proxy_util.c
@@ -38,7 +38,7 @@ static int proxy_match_domainname(struct dirconn_entry *This, request_rec *r);
static int proxy_match_hostname(struct dirconn_entry *This, request_rec *r);
static int proxy_match_word(struct dirconn_entry *This, request_rec *r);
-APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(proxy, PROXY, int, create_req,
+APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(proxy, PROXY, int, create_req,
(request_rec *r, request_rec *pr), (r, pr),
OK, DECLINED)
@@ -132,7 +132,7 @@ PROXY_DECLARE(void) ap_proxy_c2hex(int ch, char *x)
* Convert a URL-encoded string to canonical form.
* It decodes characters which need not be encoded,
* and encodes those which must be encoded, and does not touch
- * those which must not be touched.
+ * those which must not be touched.
*/
PROXY_DECLARE(char *)ap_proxy_canonenc(apr_pool_t *p, const char *x, int len, enum enctype t,
int forcedec, int proxyreq)
@@ -495,14 +495,14 @@ PROXY_DECLARE(void) ap_proxy_sec2hex(int t, char *y)
PROXY_DECLARE(int) ap_proxyerror(request_rec *r, int statuscode, const char *message)
{
apr_table_setn(r->notes, "error-notes",
- apr_pstrcat(r->pool,
+ apr_pstrcat(r->pool,
"The proxy server could not handle the request "
"<em><a href=\"", ap_escape_uri(r->pool, r->uri),
"\">", ap_escape_html(r->pool, r->method),
- "&nbsp;",
+ "&nbsp;",
ap_escape_html(r->pool, r->uri), "</a></em>.<p>\n"
"Reason: <strong>",
- ap_escape_html(r->pool, message),
+ ap_escape_html(r->pool, message),
"</strong></p>", NULL));
/* Allow "error-notes" string to be printed by ap_send_error_response() */
@@ -698,7 +698,7 @@ static int proxy_match_ipaddr(struct dirconn_entry *This, request_rec *r)
!= APR_SUCCESS) {
#if DEBUGGING
ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
- "2)IP-NoMatch: hostname=%s msg=Host not found",
+ "2)IP-NoMatch: hostname=%s msg=Host not found",
host);
#endif
return 0;
@@ -711,7 +711,7 @@ static int proxy_match_ipaddr(struct dirconn_entry *This, request_rec *r)
if (This->addr.s_addr == (ip->s_addr & This->mask.s_addr)) {
#if DEBUGGING
ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
- "3)IP-Match: %s[%s] <-> ", host,
+ "3)IP-Match: %s[%s] <-> ", host,
inet_ntoa(*ip));
ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
"%s/", inet_ntoa(This->addr));
@@ -723,7 +723,7 @@ static int proxy_match_ipaddr(struct dirconn_entry *This, request_rec *r)
#if DEBUGGING
else {
ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
- "3)IP-NoMatch: %s[%s] <-> ", host,
+ "3)IP-NoMatch: %s[%s] <-> ", host,
inet_ntoa(*ip));
ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
"%s/", inet_ntoa(This->addr));
@@ -868,7 +868,7 @@ static int proxy_match_word(struct dirconn_entry *This, request_rec *r)
}
/* checks whether a host in uri_addr matches proxyblock */
-PROXY_DECLARE(int) ap_proxy_checkproxyblock(request_rec *r, proxy_server_conf *conf,
+PROXY_DECLARE(int) ap_proxy_checkproxyblock(request_rec *r, proxy_server_conf *conf,
apr_sockaddr_t *uri_addr)
{
int j;
@@ -915,7 +915,7 @@ PROXY_DECLARE(int) ap_proxy_pre_http_request(conn_rec *c, request_rec *r)
}
/*
- * converts a series of buckets into a string
+ * converts a series of buckets into a string
* XXX: BillS says this function performs essentially the same function as
* ap_rgetline() in protocol.c. Deprecate this function and use ap_rgetline()
* instead? I think ap_proxy_string_read() will not work properly on non ASCII
@@ -938,7 +938,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_string_read(conn_rec *c, apr_bucket_brigade
/* loop through each brigade */
while (!found) {
/* get brigade from network one line at a time */
- if (APR_SUCCESS != (rv = ap_get_brigade(c->input_filters, bb,
+ if (APR_SUCCESS != (rv = ap_get_brigade(c->input_filters, bb,
AP_MODE_GETLINE,
APR_BLOCK_READ,
0))) {
@@ -1149,7 +1149,7 @@ PROXY_DECLARE(proxy_balancer *) ap_proxy_get_balancer(apr_pool_t *p,
char *c, *uri = apr_pstrdup(p, url);
int i;
- c = strchr(uri, ':');
+ c = strchr(uri, ':');
if (c == NULL || c[1] != '/' || c[2] != '/' || c[3] == '\0')
return NULL;
/* remove path from uri */
@@ -1243,7 +1243,7 @@ PROXY_DECLARE(proxy_worker *) ap_proxy_get_worker(apr_pool_t *p,
} else {
ap_str_tolower(url_copy);
}
-
+
worker = (proxy_worker *)conf->workers->elts;
/*
@@ -1280,7 +1280,7 @@ static void init_conn_pool(apr_pool_t *p, proxy_worker *worker)
proxy_conn_pool *cp;
/*
- * Create a connection pool's subpool.
+ * Create a connection pool's subpool.
* This pool is used for connection recycling.
* Once the worker is added it is never removed but
* it can be disabled.
@@ -1288,10 +1288,10 @@ static void init_conn_pool(apr_pool_t *p, proxy_worker *worker)
apr_pool_create(&pool, p);
/*
* Alloc from the same pool as worker.
- * proxy_conn_pool is permanently attached to the worker.
+ * proxy_conn_pool is permanently attached to the worker.
*/
cp = (proxy_conn_pool *)apr_pcalloc(p, sizeof(proxy_conn_pool));
- cp->pool = pool;
+ cp->pool = pool;
worker->cp = cp;
}
@@ -1345,7 +1345,7 @@ PROXY_DECLARE(proxy_worker *) ap_proxy_create_worker(apr_pool_t *p)
return worker;
}
-PROXY_DECLARE(void)
+PROXY_DECLARE(void)
ap_proxy_add_worker_to_balancer(apr_pool_t *pool, proxy_balancer *balancer,
proxy_worker *worker)
{
@@ -1562,7 +1562,7 @@ static apr_status_t connection_destructor(void *resource, void *params,
{
proxy_conn_rec *conn = (proxy_conn_rec *)resource;
- /* Destroy the pool only if not called from reslist_destroy */
+ /* Destroy the pool only if not called from reslist_destroy */
if (conn->worker->cp->pool)
apr_pool_destroy(conn->pool);
@@ -1645,7 +1645,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, ser
worker->smax = worker->hmax;
/* Set min to be lower then smax */
if (worker->min > worker->smax)
- worker->min = worker->smax;
+ worker->min = worker->smax;
}
else {
/* This will supress the apr_reslist creation */
@@ -1813,7 +1813,7 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r,
uri->port);
/*
- * allocate these out of the specified connection pool
+ * allocate these out of the specified connection pool
* The scheme handler decides if this is permanent or
* short living pool.
*/
@@ -1918,7 +1918,7 @@ static int is_socket_connected(apr_socket_t *sock)
{
apr_size_t buffer_len = 1;
- char test_buffer[1];
+ char test_buffer[1];
apr_status_t socket_status;
apr_interval_time_t current_timeout;
@@ -1995,7 +1995,7 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
}
/* Set a keepalive option */
if (worker->keepalive) {
- if ((rv = apr_socket_opt_set(newsock,
+ if ((rv = apr_socket_opt_set(newsock,
APR_SO_KEEPALIVE, 1)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
"apr_socket_opt_set(SO_KEEPALIVE): Failed to set"
@@ -2088,7 +2088,7 @@ PROXY_DECLARE(int) ap_proxy_connection_create(const char *proxy_function,
if (!ap_proxy_ssl_enable(conn->connection)) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0,
s, "proxy: %s: failed to enable ssl support "
- "for %pI (%s)", proxy_function,
+ "for %pI (%s)", proxy_function,
backend_addr, conn->hostname);
return HTTP_INTERNAL_SERVER_ERROR;
}
diff --git a/modules/ssl/mod_ssl.c b/modules/ssl/mod_ssl.c
index af91fa5ac2..6602a31b61 100644
--- a/modules/ssl/mod_ssl.c
+++ b/modules/ssl/mod_ssl.c
@@ -146,7 +146,7 @@ static const command_rec ssl_config_cmds[] = {
SSL_CMD_ALL(UserName, TAKE1,
"Set user name to SSL variable value")
- /*
+ /*
* Proxy configuration for remote SSL connections
*/
SSL_CMD_SRV(ProxyEngine, FLAG,
@@ -197,11 +197,11 @@ static const command_rec ssl_config_cmds[] = {
"(arbitrary complex boolean expression - see manual)")
/* Deprecated directives. */
- AP_INIT_RAW_ARGS("SSLLog", ap_set_deprecated, NULL, OR_ALL,
+ AP_INIT_RAW_ARGS("SSLLog", ap_set_deprecated, NULL, OR_ALL,
"SSLLog directive is no longer supported - use ErrorLog."),
- AP_INIT_RAW_ARGS("SSLLogLevel", ap_set_deprecated, NULL, OR_ALL,
+ AP_INIT_RAW_ARGS("SSLLogLevel", ap_set_deprecated, NULL, OR_ALL,
"SSLLogLevel directive is no longer supported - use LogLevel."),
-
+
AP_END_CMD
};
@@ -238,8 +238,8 @@ static apr_status_t ssl_cleanup_pre_config(void *data)
* actually load the error strings once per process due to static
* variable abuse in OpenSSL. */
- /*
- * TODO: determine somewhere we can safely shove out diagnostics
+ /*
+ * TODO: determine somewhere we can safely shove out diagnostics
* (when enabled) at this late stage in the game:
* CRYPTO_mem_leaks_fp(stderr);
*/
@@ -250,7 +250,7 @@ static int ssl_hook_pre_config(apr_pool_t *pconf,
apr_pool_t *plog,
apr_pool_t *ptemp)
{
- /* We must register the library in full, to ensure our configuration
+ /* We must register the library in full, to ensure our configuration
* code can successfully test the SSL environment.
*/
CRYPTO_malloc_init();
@@ -480,7 +480,7 @@ static void ssl_hook_Insert_Filter(request_rec *r)
static void ssl_register_hooks(apr_pool_t *p)
{
/* ssl_hook_ReadReq needs to use the BrowserMatch settings so must
- * run after mod_setenvif's post_read_request hook. */
+ * run after mod_setenvif's post_read_request hook. */
static const char *pre_prr[] = { "mod_setenvif.c", NULL };
ssl_io_filter_register(p);
diff --git a/modules/ssl/ssl_engine_config.c b/modules/ssl/ssl_engine_config.c
index 640837a9f4..3105c15b60 100644
--- a/modules/ssl/ssl_engine_config.c
+++ b/modules/ssl/ssl_engine_config.c
@@ -345,7 +345,7 @@ const char *ssl_cmd_SSLMutex(cmd_parms *cmd,
file = NULL;
}
}
-
+
if ((err = ap_check_cmd_context(cmd, GLOBAL_ONLY))) {
return err;
}
@@ -382,7 +382,7 @@ const char *ssl_cmd_SSLMutex(cmd_parms *cmd,
#if APR_HAS_POSIXSEM_SERIALIZE
else if (!strcasecmp(meth, "posixsem") || !strcasecmp(meth, "sem")) {
mc->nMutexMech = APR_LOCK_POSIXSEM;
- /* Posix/SysV semaphores aren't file based, use the literal name
+ /* Posix/SysV semaphores aren't file based, use the literal name
* if provided and fall back on APR's default if not. Today, APR
* will ignore it, but once supported it has an absurdly short limit.
*/
@@ -415,7 +415,7 @@ const char *ssl_cmd_SSLMutex(cmd_parms *cmd,
if (file) {
mc->szMutexFile = ap_server_root_relative(cmd->server->process->pool, file);
if (!mc->szMutexFile) {
- return apr_pstrcat(cmd->pool, "Invalid SSLMutex ", meth,
+ return apr_pstrcat(cmd->pool, "Invalid SSLMutex ", meth,
": filepath ", file, NULL);
}
}
@@ -493,10 +493,10 @@ const char *ssl_cmd_SSLCryptoDevice(cmd_parms *cmd,
else {
err = "SSLCryptoDevice: Invalid argument; must be one of: "
"'builtin' (none)";
- e = ENGINE_get_first();
+ e = ENGINE_get_first();
while (e) {
ENGINE *en;
- err = apr_pstrcat(cmd->pool, err, ", '", ENGINE_get_id(e),
+ err = apr_pstrcat(cmd->pool, err, ", '", ENGINE_get_id(e),
"' (", ENGINE_get_name(e), ")", NULL);
en = ENGINE_get_next(e);
ENGINE_free(e);
@@ -511,7 +511,7 @@ const char *ssl_cmd_SSLCryptoDevice(cmd_parms *cmd,
const char *ssl_cmd_SSLRandomSeed(cmd_parms *cmd,
void *dcfg,
- const char *arg1,
+ const char *arg1,
const char *arg2,
const char *arg3)
{
@@ -658,7 +658,7 @@ static const char *ssl_cmd_check_file(cmd_parms *parms,
}
return apr_pstrcat(parms->pool, parms->cmd->name,
- ": file '", *file,
+ ": file '", *file,
"' does not exist or is empty", NULL);
}
@@ -690,7 +690,7 @@ static const char *ssl_cmd_check_dir(cmd_parms *parms,
}
return apr_pstrcat(parms->pool, parms->cmd->name,
- ": directory '", *dir,
+ ": directory '", *dir,
"' does not exist", NULL);
}
@@ -730,7 +730,7 @@ static const char *ssl_cmd_check_aidx_max(cmd_parms *parms,
return apr_psprintf(parms->pool,
"%s: only up to %d "
- "different %s per virtual host allowed",
+ "different %s per virtual host allowed",
parms->cmd->name, SSL_AIDX_MAX, desc);
}
@@ -930,7 +930,7 @@ const char *ssl_cmd_SSLVerifyClient(cmd_parms *cmd,
if ((err = ssl_cmd_verify_parse(cmd, arg, &mode))) {
return err;
}
-
+
if (cmd->path) {
dc->nVerifyClient = mode;
}
@@ -1064,7 +1064,7 @@ const char *ssl_cmd_SSLSessionCache(cmd_parms *cmd,
mc->nSessionCacheMode = SSL_SCMODE_DC;
mc->szSessionCacheDataFile = apr_pstrdup(mc->pPool, arg+3);
if (!mc->szSessionCacheDataFile) {
- return apr_pstrcat(cmd->pool,
+ return apr_pstrcat(cmd->pool,
"SSLSessionCache: Invalid cache file path: ",
arg+3, NULL);
}
@@ -1252,7 +1252,7 @@ const char *ssl_cmd_SSLProxyEngine(cmd_parms *cmd, void *dcfg, int flag)
return NULL;
}
-const char *ssl_cmd_SSLProxyProtocol(cmd_parms *cmd,
+const char *ssl_cmd_SSLProxyProtocol(cmd_parms *cmd,
void *dcfg,
const char *arg)
{
@@ -1403,7 +1403,7 @@ const char *ssl_cmd_SSLProxyMachineCertificatePath(cmd_parms *cmd,
}
-const char *ssl_cmd_SSLUserName(cmd_parms *cmd, void *dcfg,
+const char *ssl_cmd_SSLUserName(cmd_parms *cmd, void *dcfg,
const char *arg)
{
SSLDirConfigRec *dc = (SSLDirConfigRec *)dcfg;
diff --git a/modules/ssl/ssl_engine_dh.c b/modules/ssl/ssl_engine_dh.c
index 0b9107ff1c..89c4d4980c 100644
--- a/modules/ssl/ssl_engine_dh.c
+++ b/modules/ssl/ssl_engine_dh.c
@@ -24,7 +24,7 @@
* | | | | | | (_) | (_| | \__ \__ \ |
* |_| |_| |_|\___/ \__,_|___|___/___/_|
* |_____|
- * ssl_engine_dh.c
+ * ssl_engine_dh.c
* Diffie-Hellman Built-in Temporary Parameters
*/
@@ -153,7 +153,7 @@ close(FP);
# generate the DH parameters
print "1. Generate 512 and 1024 bit Diffie-Hellman parameters (p, g)\n";
my $rand = '';
-foreach $file (qw(/var/log/messages /var/adm/messages
+foreach $file (qw(/var/log/messages /var/adm/messages
/kernel /vmunix /vmlinuz /etc/hosts /etc/resolv.conf)) {
if (-f $file) {
$rand = $file if ($rand eq '');
@@ -164,7 +164,7 @@ $rand = "-rand $rand" if ($rand ne '');
system("openssl gendh $rand -out dh512.pem 512");
system("openssl gendh $rand -out dh1024.pem 1024");
-# generate DH param info
+# generate DH param info
my $dhinfo = '';
open(FP, "openssl dh -noout -text -in dh512.pem |") || die;
$dhinfo .= $_ while (<FP>);
diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c
index 8ba727c806..54c85fd741 100644
--- a/modules/ssl/ssl_engine_init.c
+++ b/modules/ssl/ssl_engine_init.c
@@ -171,7 +171,7 @@ int ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
* but it should be initialized for startup before we
* call ssl_rand_seed() below.
*/
- mc->pid = getpid();
+ mc->pid = getpid();
/*
* Let us cleanup on restarts and exists
@@ -207,7 +207,7 @@ int ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
sc->vhost_id = ssl_util_vhostid(p, s);
sc->vhost_id_len = strlen(sc->vhost_id);
- if (ap_get_server_protocol(s) &&
+ if (ap_get_server_protocol(s) &&
strcmp("https", ap_get_server_protocol(s)) == 0) {
sc->enabled = SSL_ENABLED_TRUE;
}
@@ -460,7 +460,7 @@ static void ssl_init_ctx_protocol(server_rec *s,
SSL_CTX_set_options(ctx, SSL_OP_SINGLE_DH_USE);
#ifdef SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
- /*
+ /*
* Disallow a session from being resumed during a renegotiation,
* so that an acceptable cipher suite can be negotiated.
*/
@@ -608,7 +608,7 @@ static void ssl_init_ctx_cipher_suite(server_rec *s,
}
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- "Configuring permitted SSL ciphers [%s]",
+ "Configuring permitted SSL ciphers [%s]",
suite);
if (!SSL_CTX_set_cipher_list(ctx, MODSSL_PCHAR_CAST suite)) {
@@ -657,7 +657,7 @@ static void ssl_init_ctx_cert_chain(server_rec *s,
int i, n;
const char *chain = mctx->cert_chain;
- /*
+ /*
* Optionally configure extra server certificate chain certificates.
* This is usually done by OpenSSL automatically when one of the
* server cert issuers are found under SSLCACertificatePath or in
@@ -683,7 +683,7 @@ static void ssl_init_ctx_cert_chain(server_rec *s,
}
n = SSL_CTX_use_certificate_chain(mctx->ssl_ctx,
- (char *)chain,
+ (char *)chain,
skip_first, NULL);
if (n < 0) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
@@ -833,7 +833,7 @@ static void ssl_check_public_cert(server_rec *s,
if (SSL_X509_isSGC(cert)) {
ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"%s server certificate enables "
- "Server Gated Cryptography (SGC)",
+ "Server Gated Cryptography (SGC)",
ssl_asn1_keystr(type));
}
@@ -1019,7 +1019,7 @@ void ssl_init_CheckServers(server_rec *base_server, apr_pool_t *p)
BOOL conflict = FALSE;
/*
- * Give out warnings when a server has HTTPS configured
+ * Give out warnings when a server has HTTPS configured
* for the HTTP port or vice versa
*/
for (s = base_server; s; s = s->next) {
@@ -1070,11 +1070,11 @@ void ssl_init_CheckServers(server_rec *base_server, apr_pool_t *p)
base_server,
"Init: SSL server IP/port conflict: "
"%s (%s:%d) vs. %s (%s:%d)",
- ssl_util_vhostid(p, s),
+ ssl_util_vhostid(p, s),
(s->defn_name ? s->defn_name : "unknown"),
s->defn_line_number,
ssl_util_vhostid(p, ps),
- (ps->defn_name ? ps->defn_name : "unknown"),
+ (ps->defn_name ? ps->defn_name : "unknown"),
ps->defn_line_number);
conflict = TRUE;
continue;
@@ -1258,7 +1258,7 @@ apr_status_t ssl_init_ModuleKill(void *data)
*/
ssl_scache_kill(base_server);
- /*
+ /*
* Destroy the temporary keys and params
*/
ssl_tmp_keys_free(base_server);
diff --git a/modules/ssl/ssl_engine_io.c b/modules/ssl/ssl_engine_io.c
index 5527a5ebf9..0093e3b95e 100644
--- a/modules/ssl/ssl_engine_io.c
+++ b/modules/ssl/ssl_engine_io.c
@@ -64,10 +64,10 @@
* - The char* is placed in a brigade and returned
*
* Since connection-level input filters in httpd need to be able to
- * handle AP_MODE_GETLINE calls (namely identifying LF-terminated strings),
+ * handle AP_MODE_GETLINE calls (namely identifying LF-terminated strings),
* ssl_io_input_getline which will handle this special case.
*
- * Due to AP_MODE_GETLINE and AP_MODE_SPECULATIVE, we may sometimes have
+ * Due to AP_MODE_GETLINE and AP_MODE_SPECULATIVE, we may sometimes have
* 'leftover' decoded data which must be setaside for the next read. That
* is currently handled by the char_buffer_{read|write} functions. So,
* ssl_io_input_read may be able to fulfill reads without invoking
@@ -81,7 +81,7 @@
*
*/
-/* this custom BIO allows us to hook SSL_write directly into
+/* this custom BIO allows us to hook SSL_write directly into
* an apr_bucket_brigade and use transient buckets with the SSL
* malloc-ed buffer, rather than copying into a mem BIO.
* also allows us to pass the brigade as data is being written
@@ -141,7 +141,7 @@ static int bio_filter_out_flush(BIO *bio)
if (outctx->blen) {
e = apr_bucket_transient_create(outctx->buffer, outctx->blen,
outctx->bb->bucket_alloc);
- /* we filled this buffer first so add it to the
+ /* we filled this buffer first so add it to the
* head of the brigade
*/
APR_BRIGADE_INSERT_HEAD(outctx->bb, e);
@@ -182,7 +182,7 @@ static int bio_filter_destroy(BIO *bio)
*/
return 1;
}
-
+
static int bio_filter_out_read(BIO *bio, char *out, int outl)
{
/* this is never called */
@@ -213,7 +213,7 @@ static int bio_filter_out_write(BIO *bio, const char *in, int inl)
}
else {
/* pass along the encrypted data
- * need to flush since we're using SSL's malloc-ed buffer
+ * need to flush since we're using SSL's malloc-ed buffer
* which will be overwritten once we leave here
*/
apr_bucket *bucket = apr_bucket_transient_create(in, inl,
@@ -375,7 +375,7 @@ static apr_status_t brigade_consume(apr_bucket_brigade *bb,
{
apr_size_t actual = 0;
apr_status_t status = APR_SUCCESS;
-
+
while (!APR_BRIGADE_EMPTY(bb)) {
apr_bucket *b = APR_BRIGADE_FIRST(bb);
const char *str;
@@ -398,11 +398,11 @@ static apr_status_t brigade_consume(apr_bucket_brigade *bb,
* this sort of case (caller provided buffer) it
* would be much more trivial for apr_bucket_consume
* to do all the work that follows, based on the
- * particular characteristics of the bucket we are
+ * particular characteristics of the bucket we are
* consuming here.
*/
status = apr_bucket_read(b, &str, &str_len, block);
-
+
if (status != APR_SUCCESS) {
if (APR_STATUS_IS_EOF(status)) {
/* This stream bucket was consumed */
@@ -471,7 +471,7 @@ static int bio_filter_in_read(BIO *bio, char *in, int inlen)
*/
if ((SSL_version(inctx->ssl) == SSL2_VERSION) || sslconn->is_proxy) {
if (bio_filter_out_flush(inctx->bio_out) < 0) {
- bio_filter_out_ctx_t *outctx =
+ bio_filter_out_ctx_t *outctx =
(bio_filter_out_ctx_t *)(inctx->bio_out->ptr);
inctx->rc = outctx->rc;
return -1;
@@ -488,7 +488,7 @@ static int bio_filter_in_read(BIO *bio, char *in, int inlen)
if (APR_BRIGADE_EMPTY(inctx->bb)) {
inctx->rc = ap_get_brigade(inctx->f->next, inctx->bb,
- AP_MODE_READBYTES, block,
+ AP_MODE_READBYTES, block,
inl);
/* If the read returns EAGAIN or success with an empty
@@ -515,12 +515,12 @@ static int bio_filter_in_read(BIO *bio, char *in, int inlen)
return (int)inl;
}
- if (APR_STATUS_IS_EAGAIN(inctx->rc)
+ if (APR_STATUS_IS_EAGAIN(inctx->rc)
|| APR_STATUS_IS_EINTR(inctx->rc)) {
BIO_set_retry_read(bio);
return (int)inl;
}
-
+
/* Unexpected errors and APR_EOF clean out the brigade.
* Subsequent calls will return APR_EOF.
*/
@@ -625,7 +625,7 @@ static apr_status_t ssl_io_input_read(bio_filter_in_ctx_t *inctx,
*/
if (APR_STATUS_IS_EAGAIN(inctx->rc)
|| APR_STATUS_IS_EINTR(inctx->rc)) {
- /* Already read something, return APR_SUCCESS instead.
+ /* Already read something, return APR_SUCCESS instead.
* On win32 in particular, but perhaps on other kernels,
* a blocking call isn't 'always' blocking.
*/
@@ -725,7 +725,7 @@ static apr_status_t ssl_io_input_getline(bio_filter_in_ctx_t *inctx,
while (tmplen > 0) {
status = ssl_io_input_read(inctx, buf + offset, &tmplen);
-
+
if (status != APR_SUCCESS) {
return status;
}
@@ -815,7 +815,7 @@ static apr_status_t ssl_filter_write(ap_filter_t *f,
}
ap_log_cerror(APLOG_MARK, APLOG_INFO, outctx->rc, c,
- "failed to write %" APR_SSIZE_T_FMT
+ "failed to write %" APR_SSIZE_T_FMT
" of %" APR_SIZE_T_FMT " bytes (%s)",
len - (apr_size_t)res, len, reason);
@@ -887,7 +887,7 @@ static const char ssl_io_buffer[] = "SSL/TLS Buffer";
/*
* Close the SSL part of the socket connection
* (called immediately _before_ the socket is closed)
- * or called with
+ * or called with
*/
static apr_status_t ssl_filter_io_shutdown(ssl_filter_ctx_t *filter_ctx,
conn_rec *c,
@@ -974,7 +974,7 @@ static apr_status_t ssl_filter_io_shutdown(ssl_filter_ctx_t *filter_ctx,
if (c->base_server->loglevel >= APLOG_INFO) {
ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, c,
"Connection closed to child %ld with %s shutdown "
- "(server %s)",
+ "(server %s)",
c->id, type, ssl_util_vhostid(c->pool, c->base_server));
}
@@ -1006,7 +1006,7 @@ static apr_status_t ssl_io_filter_cleanup(void *data)
SSL_free(filter_ctx->pssl);
sslconn->ssl = filter_ctx->pssl = NULL;
}
-
+
return APR_SUCCESS;
}
@@ -1051,7 +1051,7 @@ static int ssl_io_filter_connect(ssl_filter_ctx_t *filter_ctx)
(filter_ctx->pbioWrite->ptr);
apr_status_t rc = inctx->rc ? inctx->rc : outctx->rc ;
ssl_err = SSL_get_error(filter_ctx->pssl, n);
-
+
if (ssl_err == SSL_ERROR_ZERO_RETURN) {
/*
* The case where the connection was closed before any data
@@ -1063,7 +1063,7 @@ static int ssl_io_filter_connect(ssl_filter_ctx_t *filter_ctx)
}
else if (ssl_err == SSL_ERROR_WANT_READ) {
/*
- * This is in addition to what was present earlier. It is
+ * This is in addition to what was present earlier. It is
* borrowed from openssl_state_machine.c [mod_tls].
* TBD.
*/
@@ -1117,7 +1117,7 @@ static int ssl_io_filter_connect(ssl_filter_ctx_t *filter_ctx)
/* leaving this log message as an error for the moment,
* according to the mod_ssl docs:
* "level optional_no_ca is actually against the idea
- * of authentication (but can be used to establish
+ * of authentication (but can be used to establish
* SSL test pages, etc.)"
* optional_no_ca doesn't appear to work as advertised
* in 1.x
@@ -1205,20 +1205,20 @@ static apr_status_t ssl_io_filter_Upgrade(ap_filter_t *f,
/* Send the interim 101 response. */
upgradebb = apr_brigade_create(r->pool, f->c->bucket_alloc);
-
+
ap_fputstrs(f->next, upgradebb, SWITCH_STATUS_LINE, CRLF,
UPGRADE_HEADER, CRLF, CONNECTION_HEADER, CRLF, CRLF, NULL);
b = apr_bucket_flush_create(f->c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(upgradebb, b);
-
+
rv = ap_pass_brigade(f->next, upgradebb);
if (rv) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
"could not send interim 101 Upgrade response");
return AP_FILTER_ERROR;
}
-
+
ssl_init_ssl_connection(f->c);
ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
@@ -1228,7 +1228,7 @@ static apr_status_t ssl_io_filter_Upgrade(ap_filter_t *f,
ssl = sslconn->ssl;
/* XXX: Should replace SSL_set_state with SSL_renegotiate(ssl);
- * However, this causes failures in perl-framework currently,
+ * However, this causes failures in perl-framework currently,
* perhaps pre-test if we have already negotiated?
*/
SSL_set_accept_state(ssl);
@@ -1242,8 +1242,8 @@ static apr_status_t ssl_io_filter_Upgrade(ap_filter_t *f,
return AP_FILTER_ERROR;
}
- /* Now that we have initialized the ssl connection which added the ssl_io_filter,
- pass the brigade off to the connection based output filters so that the
+ /* Now that we have initialized the ssl connection which added the ssl_io_filter,
+ pass the brigade off to the connection based output filters so that the
request can complete encrypted */
return ap_pass_brigade(f->c->output_filters, bb);
@@ -1276,7 +1276,7 @@ static apr_status_t ssl_io_filter_input(ap_filter_t *f,
}
/* XXX: we don't currently support anything other than these modes. */
- if (mode != AP_MODE_READBYTES && mode != AP_MODE_GETLINE &&
+ if (mode != AP_MODE_READBYTES && mode != AP_MODE_GETLINE &&
mode != AP_MODE_SPECULATIVE && mode != AP_MODE_INIT) {
return APR_ENOTIMPL;
}
@@ -1300,9 +1300,9 @@ static apr_status_t ssl_io_filter_input(ap_filter_t *f,
return APR_SUCCESS;
}
- if (inctx->mode == AP_MODE_READBYTES ||
+ if (inctx->mode == AP_MODE_READBYTES ||
inctx->mode == AP_MODE_SPECULATIVE) {
- /* Protected from truncation, readbytes < MAX_SIZE_T
+ /* Protected from truncation, readbytes < MAX_SIZE_T
* FIXME: No, it's *not* protected. -- jre */
if (readbytes < len) {
len = (apr_size_t)readbytes;
@@ -1367,8 +1367,8 @@ static apr_status_t ssl_io_filter_output(ap_filter_t *f,
while (!APR_BRIGADE_EMPTY(bb)) {
apr_bucket *bucket = APR_BRIGADE_FIRST(bb);
- /* If it is a flush or EOS, we need to pass this down.
- * These types do not require translation by OpenSSL.
+ /* If it is a flush or EOS, we need to pass this down.
+ * These types do not require translation by OpenSSL.
*/
if (APR_BUCKET_IS_EOS(bucket) || APR_BUCKET_IS_FLUSH(bucket)) {
if (bio_filter_out_flush(filter_ctx->pbioWrite) < 0) {
@@ -1416,7 +1416,7 @@ static apr_status_t ssl_io_filter_output(ap_filter_t *f,
/* filter output */
const char *data;
apr_size_t len;
-
+
status = apr_bucket_read(bucket, &data, &len, rblock);
if (APR_STATUS_IS_EAGAIN(status)) {
@@ -1464,7 +1464,7 @@ int ssl_io_buffer_fill(request_rec *r)
apr_bucket_brigade *tempb;
apr_off_t total = 0; /* total length buffered */
int eos = 0; /* non-zero once EOS is seen */
-
+
/* Create the context which will be passed to the input filter;
* containing a setaside pool and a brigade which constrain the
* lifetime of the buffered data. */
@@ -1493,10 +1493,10 @@ int ssl_io_buffer_fill(request_rec *r)
"could not read request body for SSL buffer");
return HTTP_INTERNAL_SERVER_ERROR;
}
-
+
/* Iterate through the returned brigade: setaside each bucket
* into the context's pool and move it into the brigade. */
- for (e = APR_BRIGADE_FIRST(tempb);
+ for (e = APR_BRIGADE_FIRST(tempb);
e != APR_BRIGADE_SENTINEL(tempb) && !eos; e = next) {
const char *data;
apr_size_t len;
@@ -1514,19 +1514,19 @@ int ssl_io_buffer_fill(request_rec *r)
}
total += len;
}
-
+
rv = apr_bucket_setaside(e, ctx->pool);
if (rv != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
"could not setaside bucket for SSL buffer");
return HTTP_INTERNAL_SERVER_ERROR;
}
-
+
APR_BUCKET_REMOVE(e);
APR_BRIGADE_INSERT_TAIL(ctx->bb, e);
}
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
"total of %" APR_OFF_T_FMT " bytes in buffer, eos=%d",
total, eos);
@@ -1587,7 +1587,7 @@ static apr_status_t ssl_io_filter_buffer(ap_filter_t *f,
apr_bucket *d = APR_BRIGADE_FIRST(ctx->bb);
e = APR_BUCKET_PREV(e);
-
+
/* Unsplice the partitioned segment and move it into the
* passed-in brigade; no convenient way to do this with
* the APR_BRIGADE_* macros. */
@@ -1612,7 +1612,7 @@ static apr_status_t ssl_io_filter_buffer(ap_filter_t *f,
if (APR_BRIGADE_EMPTY(ctx->bb)) {
apr_bucket *e = APR_BRIGADE_LAST(bb);
-
+
/* Ensure that the brigade is terminated by an EOS if the
* buffered request body has been entirely consumed. */
if (e == APR_BRIGADE_SENTINEL(bb) || !APR_BUCKET_IS_EOS(e)) {
@@ -1690,7 +1690,7 @@ void ssl_io_filter_register(apr_pool_t *p)
ap_register_input_filter (ssl_io_filter, ssl_io_filter_input, NULL, AP_FTYPE_CONNECTION + 5);
ap_register_output_filter (ssl_io_filter, ssl_io_filter_output, NULL, AP_FTYPE_CONNECTION + 5);
-
+
ap_register_input_filter (ssl_io_buffer, ssl_io_filter_buffer, NULL, AP_FTYPE_PROTOCOL - 1);
return;
diff --git a/modules/ssl/ssl_engine_kernel.c b/modules/ssl/ssl_engine_kernel.c
index 032e142475..688cb47359 100644
--- a/modules/ssl/ssl_engine_kernel.c
+++ b/modules/ssl/ssl_engine_kernel.c
@@ -74,7 +74,7 @@ int ssl_hook_ReadReq(request_rec *r)
* with using SSL on this request.
*/
sslconn->non_ssl_request = 0;
-
+
return HTTP_BAD_REQUEST;
}
@@ -191,7 +191,7 @@ int ssl_hook_Access(request_rec *r)
return HTTP_UPGRADE_REQUIRED;
}
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"access to %s failed, reason: %s",
r->filename, "SSL connection required");
@@ -214,8 +214,8 @@ int ssl_hook_Access(request_rec *r)
* reconfigured parameter suite. But Apache's internal API processing
* makes our life very hard here, because when internal sub-requests occur
* we nevertheless should avoid multiple unnecessary SSL handshakes (they
- * require extra network I/O and especially time to perform).
- *
+ * require extra network I/O and especially time to perform).
+ *
* But the optimization for filtering out the unnecessary handshakes isn't
* obvious and trivial. Especially because while Apache is in its
* sub-request processing the client could force additional handshakes,
@@ -369,7 +369,7 @@ int ssl_hook_Access(request_rec *r)
* override of SSLVerifyClient
*
* We force a renegotiation if the reconfigured/new verify type is
- * stronger than the currently active verify type.
+ * stronger than the currently active verify type.
*
* The order is: none << optional_no_ca << optional << require
*
@@ -498,7 +498,7 @@ int ssl_hook_Access(request_rec *r)
* handshake immediately; once the SSL library moves to the
* "accept" state, it will reject the SSL packets which the client
* is sending for the request body.
- *
+ *
* To allow authentication to complete in this auth hook, the
* solution used here is to fill a (bounded) buffer with the
* request body, and then to reinject that request body later.
@@ -633,7 +633,7 @@ int ssl_hook_Access(request_rec *r)
"Awaiting re-negotiation handshake");
/* XXX: Should replace SSL_set_state with SSL_renegotiate(ssl);
- * However, this causes failures in perl-framework currently,
+ * However, this causes failures in perl-framework currently,
* perhaps pre-test if we have already negotiated?
*/
SSL_set_state(ssl, SSL_ST_ACCEPT);
@@ -686,7 +686,7 @@ int ssl_hook_Access(request_rec *r)
X509_free(peercert);
}
}
-
+
/*
* Also check that SSLCipherSuite has been enforced as expected.
*/
@@ -718,7 +718,7 @@ int ssl_hook_Access(request_rec *r)
else
ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
"Failed to set r->user to '%s'", dc->szUserName);
- }
+ }
/*
* Check SSLRequire boolean expressions
@@ -736,7 +736,7 @@ int ssl_hook_Access(request_rec *r)
"SSL requirement expression: %s",
ssl_expr_get_error());
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"access to %s failed, reason: %s",
r->filename, cp);
@@ -755,7 +755,7 @@ int ssl_hook_Access(request_rec *r)
ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server,
"Failed expression: %s", req->cpExpr);
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"access to %s failed, reason: %s",
r->filename,
"SSL requirement expression not fulfilled "
@@ -844,13 +844,13 @@ int ssl_hook_UserCheck(request_rec *r)
* - ssl not enabled
* - client did not present a certificate
*/
- if (!((sc->enabled == SSL_ENABLED_TRUE || sc->enabled == SSL_ENABLED_OPTIONAL)
+ if (!((sc->enabled == SSL_ENABLED_TRUE || sc->enabled == SSL_ENABLED_OPTIONAL)
&& sslconn && sslconn->ssl && sslconn->client_cert) ||
!(dc->nOptions & SSL_OPT_FAKEBASICAUTH) || r->user)
{
return DECLINED;
}
-
+
if (!sslconn->client_dn) {
X509_NAME *name = X509_get_subject_name(sslconn->client_cert);
char *cp = X509_NAME_oneline(name, NULL, 0);
@@ -871,9 +871,9 @@ int ssl_hook_UserCheck(request_rec *r)
* adding the string "xxj31ZMTZzkVA" as the password in the user file.
* This is just the crypted variant of the word "password" ;-)
*/
- auth_line = apr_pstrcat(r->pool, "Basic ",
- ap_pbase64encode(r->pool,
- apr_pstrcat(r->pool, clientdn,
+ auth_line = apr_pstrcat(r->pool, "Basic ",
+ ap_pbase64encode(r->pool,
+ apr_pstrcat(r->pool, clientdn,
":password", NULL)),
NULL);
apr_table_set(r->headers_in, "Authorization", auth_line);
@@ -1016,7 +1016,7 @@ int ssl_hook_Fixup(request_rec *r)
* Annotate the SSI/CGI environment with standard SSL information
*/
/* the always present HTTPS (=HTTP over SSL) flag! */
- apr_table_setn(env, "HTTPS", "on");
+ apr_table_setn(env, "HTTPS", "on");
/* standard SSL environment variables */
if (dc->nOptions & SSL_OPT_STDENVVARS) {
@@ -1131,7 +1131,7 @@ RSA *ssl_callback_TmpRSA(SSL *ssl, int export, int keylen)
return (RSA *)mc->pTmpKeys[idx];
}
-/*
+/*
* Hand out the already generated DH parameters...
*/
DH *ssl_callback_TmpDH(SSL *ssl, int export, int keylen)
@@ -1214,7 +1214,7 @@ int ssl_callback_SSLVerify(int ok, X509_STORE_CTX *ctx)
}
if (verify == SSL_CVERIFY_NONE) {
- /*
+ /*
* SSLProxyVerify is either not configured or set to "none".
* (this callback doesn't happen in the server context if SSLVerify
* is not configured or set to "none")
@@ -1497,7 +1497,7 @@ static void modssl_proxy_info_log(server_rec *s,
dn = X509_NAME_oneline(name, name_buf, sizeof(name_buf));
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- SSLPROXY_CERT_CB_LOG_FMT "%s, sending %s",
+ SSLPROXY_CERT_CB_LOG_FMT "%s, sending %s",
sc->vhost_id, msg, dn ? dn : "-uknown-");
}
@@ -1512,7 +1512,7 @@ static void modssl_proxy_info_log(server_rec *s,
*pkey = info->x_pkey->dec_pkey; \
EVP_PKEY_reference_inc(*pkey)
-int ssl_callback_proxy_cert(SSL *ssl, MODSSL_CLIENT_CERT_CB_ARG_TYPE **x509, EVP_PKEY **pkey)
+int ssl_callback_proxy_cert(SSL *ssl, MODSSL_CLIENT_CERT_CB_ARG_TYPE **x509, EVP_PKEY **pkey)
{
conn_rec *c = (conn_rec *)SSL_get_app_data(ssl);
server_rec *s = c->base_server;
@@ -1522,8 +1522,8 @@ int ssl_callback_proxy_cert(SSL *ssl, MODSSL_CLIENT_CERT_CB_ARG_TYPE **x509, EVP
STACK_OF(X509_NAME) *ca_list;
STACK_OF(X509_INFO) *certs = sc->proxy->pkp->certs;
int i, j;
-
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
+
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
SSLPROXY_CERT_CB_LOG_FMT "entered",
sc->vhost_id);
@@ -1533,23 +1533,23 @@ int ssl_callback_proxy_cert(SSL *ssl, MODSSL_CLIENT_CERT_CB_ARG_TYPE **x509, EVP
"downstream server wanted client certificate "
"but none are configured", sc->vhost_id);
return FALSE;
- }
+ }
ca_list = SSL_get_client_CA_list(ssl);
if (!ca_list || (sk_X509_NAME_num(ca_list) <= 0)) {
- /*
- * downstream server didn't send us a list of acceptable CA certs,
+ /*
+ * downstream server didn't send us a list of acceptable CA certs,
* so we send the first client cert in the list.
- */
+ */
info = sk_X509_INFO_value(certs, 0);
-
+
modssl_proxy_info_log(s, info, "no acceptable CA list");
modssl_set_cert_info(info, x509, pkey);
return TRUE;
- }
+ }
for (i = 0; i < sk_X509_NAME_num(ca_list); i++) {
ca_name = sk_X509_NAME_value(ca_list, i);
@@ -1572,7 +1572,7 @@ int ssl_callback_proxy_cert(SSL *ssl, MODSSL_CLIENT_CERT_CB_ARG_TYPE **x509, EVP
SSLPROXY_CERT_CB_LOG_FMT
"no client certificate found!?", sc->vhost_id);
- return FALSE;
+ return FALSE;
}
static void ssl_session_log(server_rec *s,
diff --git a/modules/ssl/ssl_engine_log.c b/modules/ssl/ssl_engine_log.c
index 0c1d1cc2d0..e7766c1439 100644
--- a/modules/ssl/ssl_engine_log.c
+++ b/modules/ssl/ssl_engine_log.c
@@ -56,7 +56,7 @@ static const char *ssl_log_annotation(const char *error)
{
int i = 0;
- while (ssl_log_annotate[i].cpPattern != NULL
+ while (ssl_log_annotate[i].cpPattern != NULL
&& ap_strcmp_match(error, ssl_log_annotate[i].cpPattern) != 0)
i++;
@@ -90,12 +90,12 @@ void ssl_log_ssl_error(const char *file, int line, int level, server_rec *s)
if (annotation) {
ap_log_error(file, line, level, 0, s,
"SSL Library Error: %lu %s %s",
- e, err, annotation);
+ e, err, annotation);
}
else {
ap_log_error(file, line, level, 0, s,
"SSL Library Error: %lu %s",
- e, err);
+ e, err);
}
}
}
diff --git a/modules/ssl/ssl_engine_mutex.c b/modules/ssl/ssl_engine_mutex.c
index 65924d269e..effb01d484 100644
--- a/modules/ssl/ssl_engine_mutex.c
+++ b/modules/ssl/ssl_engine_mutex.c
@@ -39,7 +39,7 @@ int ssl_mutex_init(server_rec *s, apr_pool_t *p)
SSLModConfigRec *mc = myModConfig(s);
apr_status_t rv;
- if (mc->nMutexMode == SSL_MUTEXMODE_NONE)
+ if (mc->nMutexMode == SSL_MUTEXMODE_NONE)
return TRUE;
if (mc->pMutex) {
diff --git a/modules/ssl/ssl_engine_pphrase.c b/modules/ssl/ssl_engine_pphrase.c
index 851289257b..ef5bd05863 100644
--- a/modules/ssl/ssl_engine_pphrase.c
+++ b/modules/ssl/ssl_engine_pphrase.c
@@ -324,9 +324,9 @@ void ssl_pphrase_Handle(server_rec *s, apr_pool_t *p)
for (i=0; i < SSL_AIDX_MAX; i++) {
const char *key_id =
ssl_asn1_table_keyfmt(p, cpVHostID, i);
- ssl_asn1_t *asn1 =
+ ssl_asn1_t *asn1 =
ssl_asn1_table_get(mc->tPrivateKey, key_id);
-
+
if (asn1 && (asn1->source_mtime == pkey_mtime)) {
ap_log_error(APLOG_MARK, APLOG_INFO,
0, pServ,
@@ -466,20 +466,20 @@ void ssl_pphrase_Handle(server_rec *s, apr_pool_t *p)
* Log the type of reading
*/
if (nPassPhraseDialogCur == 0) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, pServ,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, pServ,
"unencrypted %s private key - pass phrase not "
"required", an);
}
else {
if (cpPassPhraseCur != NULL) {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
- pServ,
+ pServ,
"encrypted %s private key - pass phrase "
"requested", an);
}
else {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
- pServ,
+ pServ,
"encrypted %s private key - pass phrase"
" reused", an);
}
@@ -566,7 +566,7 @@ static apr_status_t ssl_pipe_child_create(apr_pool_t *p, const char *progname)
APR_NO_PIPE)) == APR_SUCCESS)) {
char **args;
const char *pname;
-
+
apr_tokenize_to_argv(progname, &args, p);
pname = apr_pstrdup(p, args[0]);
procnew = (apr_proc_t *)apr_pcalloc(p, sizeof(*procnew));
@@ -594,7 +594,7 @@ static int pipe_get_passwd_cb(char *buf, int length, char *prompt, int verify)
buf[0]='\0';
rc = apr_file_gets(buf, length, readtty);
apr_file_puts(APR_EOL_STR, writetty);
-
+
if (rc != APR_SUCCESS || apr_file_eof(readtty)) {
memset(buf, 0, length);
return 1; /* failure */
@@ -689,7 +689,7 @@ int ssl_pphrase_Handle_CB(char *buf, int bufsize, int verify, void *srv)
ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"Init: Requesting pass phrase via piped dialog");
}
- else { /* sc->server->pphrase_dialog_type == SSL_PPTYPE_BUILTIN */
+ else { /* sc->server->pphrase_dialog_type == SSL_PPTYPE_BUILTIN */
#ifdef WIN32
PEMerr(PEM_F_DEF_CALLBACK,PEM_R_PROBLEMS_GETTING_PASSWORD);
memset(buf, 0, (unsigned int)bufsize);
@@ -736,11 +736,11 @@ int ssl_pphrase_Handle_CB(char *buf, int bufsize, int verify, void *srv)
for (;;) {
apr_file_puts(prompt, writetty);
if (sc->server->pphrase_dialog_type == SSL_PPTYPE_PIPE) {
- i = pipe_get_passwd_cb(buf, bufsize, "", FALSE);
- }
+ i = pipe_get_passwd_cb(buf, bufsize, "", FALSE);
+ }
else { /* sc->server->pphrase_dialog_type == SSL_PPTYPE_BUILTIN */
- i = EVP_read_pw_string(buf, bufsize, "", FALSE);
- }
+ i = EVP_read_pw_string(buf, bufsize, "", FALSE);
+ }
if (i != 0) {
PEMerr(PEM_F_DEF_CALLBACK,PEM_R_PROBLEMS_GETTING_PASSWORD);
memset(buf, 0, (unsigned int)bufsize);
diff --git a/modules/ssl/ssl_engine_rand.c b/modules/ssl/ssl_engine_rand.c
index 486759c702..5b7e60bdf0 100644
--- a/modules/ssl/ssl_engine_rand.c
+++ b/modules/ssl/ssl_engine_rand.c
@@ -62,7 +62,7 @@ int ssl_rand_seed(server_rec *s, apr_pool_t *p, ssl_rsctx_t nCtx, char *prefix)
/*
* seed in contents of an external file
*/
- if (apr_file_open(&fp, pRandSeed->cpPath,
+ if (apr_file_open(&fp, pRandSeed->cpPath,
APR_READ, APR_OS_DEFAULT, p) != APR_SUCCESS)
continue;
nDone += ssl_rand_feedfp(p, fp, pRandSeed->nBytes);
@@ -113,7 +113,7 @@ int ssl_rand_seed(server_rec *s, apr_pool_t *p, ssl_rsctx_t nCtx, char *prefix)
l = sizeof(my_seed);
RAND_seed((unsigned char *)&my_seed, l);
nDone += l;
-
+
/*
* seed in some current state of the run-time stack (128 bytes)
*/
diff --git a/modules/ssl/ssl_engine_vars.c b/modules/ssl/ssl_engine_vars.c
index 5f1f571096..f9c9d539c5 100644
--- a/modules/ssl/ssl_engine_vars.c
+++ b/modules/ssl/ssl_engine_vars.c
@@ -117,7 +117,7 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
case 'R':
case 'r':
- if (strcEQ(var, "REQUEST_METHOD"))
+ if (strcEQ(var, "REQUEST_METHOD"))
result = r->method;
else if (strcEQ(var, "REQUEST_SCHEME"))
result = ap_http_scheme(r);
@@ -126,7 +126,7 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
else if (strcEQ(var, "REQUEST_FILENAME"))
result = r->filename;
else if (strcEQ(var, "REMOTE_HOST"))
- result = ap_get_remote_host(r->connection, r->per_dir_config,
+ result = ap_get_remote_host(r->connection, r->per_dir_config,
REMOTE_NAME, NULL);
else if (strcEQ(var, "REMOTE_IDENT"))
result = ap_get_remote_logname(r);
@@ -137,7 +137,7 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
case 'S':
case 's':
if (strcEQn(var, "SSL", 3)) break; /* shortcut common case */
-
+
if (strcEQ(var, "SERVER_ADMIN"))
result = r->server->server_admin;
else if (strcEQ(var, "SERVER_NAME"))
@@ -149,7 +149,7 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
else if (strcEQ(var, "SCRIPT_FILENAME"))
result = r->filename;
break;
-
+
default:
if (strcEQ(var, "PATH_INFO"))
result = r->path_info;
@@ -172,7 +172,7 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
*/
if (result == NULL && c != NULL) {
SSLConnRec *sslconn = myConnConfig(c);
- if (strlen(var) > 4 && strcEQn(var, "SSL_", 4)
+ if (strlen(var) > 4 && strcEQn(var, "SSL_", 4)
&& sslconn && sslconn->ssl)
result = ssl_var_lookup_ssl(p, c, var+4);
else if (strcEQ(var, "REMOTE_ADDR"))
@@ -357,7 +357,7 @@ static char *ssl_var_lookup_ssl_cert(apr_pool_t *p, X509 *xs, char *var)
}
else if (strcEQ(var, "A_SIG")) {
nid = OBJ_obj2nid((ASN1_OBJECT *)X509_get_signature_algorithm(xs));
- result = apr_pstrdup(p,
+ result = apr_pstrdup(p,
(nid == NID_undef) ? "UNKNOWN" : OBJ_nid2ln(nid));
resdup = FALSE;
}
@@ -476,7 +476,7 @@ static char *ssl_var_lookup_ssl_cert_remain(apr_pool_t *p, ASN1_UTCTIME *tm)
/* Fail if the time isn't a valid ASN.1 UTCTIME; RFC3280 mandates
* that the seconds digits are present even though ASN.1
- * doesn't. */
+ * doesn't. */
if (tm->length < 11 || !ASN1_UTCTIME_check(tm)) {
return apr_pstrdup(p, "0");
}
@@ -493,7 +493,7 @@ static char *ssl_var_lookup_ssl_cert_remain(apr_pool_t *p, ASN1_UTCTIME *tm)
if (apr_time_exp_gmt_get(&then, &exp) != APR_SUCCESS) {
return apr_pstrdup(p, "0");
}
-
+
diff = (long)((apr_time_sec(then) - apr_time_sec(now)) / (60*60*24));
return diff > 0 ? apr_ltoa(p, diff) : apr_pstrdup(p, "0");
@@ -589,7 +589,7 @@ static char *ssl_var_lookup_ssl_cert_verify(apr_pool_t *p, conn_rec *c)
static char *ssl_var_lookup_ssl_cipher(apr_pool_t *p, conn_rec *c, char *var)
{
- SSLConnRec *sslconn = myConnConfig(c);
+ SSLConnRec *sslconn = myConnConfig(c);
char *result;
BOOL resdup;
int usekeysize, algkeysize;
@@ -676,13 +676,13 @@ apr_array_header_t *ssl_ext_list(apr_pool_t *p, conn_rec *c, int peer,
}
ssl = sslconn->ssl;
- /* We accept the "extension" string to be converted as
- * a long name (nsComment), short name (DN) or
+ /* We accept the "extension" string to be converted as
+ * a long name (nsComment), short name (DN) or
* numeric OID (1.2.3.4).
*/
oid = OBJ_txt2obj(extension, 0);
if (!oid) {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
"Failed to create an object for extension '%s'",
extension);
ERR_clear_error();
@@ -707,9 +707,9 @@ apr_array_header_t *ssl_ext_list(apr_pool_t *p, conn_rec *c, int peer,
/* We want to obtain a string representation of the extensions
* value and add it to the array we're building.
- * X509V3_EXT_print() doesn't know about all the possible
+ * X509V3_EXT_print() doesn't know about all the possible
* data types, but the value is stored as an ASN1_OCTET_STRING
- * allowing us a fallback in case of X509V3_EXT_print
+ * allowing us a fallback in case of X509V3_EXT_print
* not knowing how to handle the data.
*/
if (X509V3_EXT_print(bio, ext, 0, 0) == 1 ||
@@ -721,7 +721,7 @@ apr_array_header_t *ssl_ext_list(apr_pool_t *p, conn_rec *c, int peer,
} else {
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
"Found an extension '%s', but failed to "
- "create a string from it", extension);
+ "create a string from it", extension);
}
BIO_vfree(bio);
}
diff --git a/modules/ssl/ssl_expr_eval.c b/modules/ssl/ssl_expr_eval.c
index 76e0107fc0..ec498275a3 100644
--- a/modules/ssl/ssl_expr_eval.c
+++ b/modules/ssl/ssl_expr_eval.c
@@ -228,7 +228,7 @@ static char *ssl_expr_eval_func_file(request_rec *r, char *filename)
apr_size_t len;
apr_finfo_t finfo;
- if (apr_file_open(&fp, filename, APR_READ|APR_BUFFERED,
+ if (apr_file_open(&fp, filename, APR_READ|APR_BUFFERED,
APR_OS_DEFAULT, r->pool) != APR_SUCCESS) {
ssl_expr_error = "Cannot open file";
return "";
diff --git a/modules/ssl/ssl_expr_parse.c b/modules/ssl/ssl_expr_parse.c
index ee172a78e1..d1efa59c94 100644
--- a/modules/ssl/ssl_expr_parse.c
+++ b/modules/ssl/ssl_expr_parse.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char const
+static char const
ssl_expr_yyrcsid[] = "$FreeBSD: src/usr.bin/yacc/skeleton.c,v 1.28.2.1 2001/07/19 05:46:39 peter Exp $";
#endif
#include <stdlib.h>
@@ -530,9 +530,9 @@ case 25:
break;
case 26:
#line 121 "ssl_expr_parse.y"
-{
+{
ap_regex_t *regex;
- if ((regex = ap_pregcomp(ssl_expr_info.pool, ssl_expr_yyvsp[0].cpVal,
+ if ((regex = ap_pregcomp(ssl_expr_info.pool, ssl_expr_yyvsp[0].cpVal,
AP_REG_EXTENDED|AP_REG_NOSUB)) == NULL) {
ssl_expr_error = "Failed to compile regular expression";
YYERROR;
@@ -544,7 +544,7 @@ case 27:
#line 130 "ssl_expr_parse.y"
{
ap_regex_t *regex;
- if ((regex = ap_pregcomp(ssl_expr_info.pool, ssl_expr_yyvsp[0].cpVal,
+ if ((regex = ap_pregcomp(ssl_expr_info.pool, ssl_expr_yyvsp[0].cpVal,
AP_REG_EXTENDED|AP_REG_NOSUB|AP_REG_ICASE)) == NULL) {
ssl_expr_error = "Failed to compile regular expression";
YYERROR;
@@ -554,7 +554,7 @@ case 27:
break;
case 28:
#line 141 "ssl_expr_parse.y"
-{
+{
ssl_expr *args = ssl_expr_make(op_ListElement, ssl_expr_yyvsp[-1].cpVal, NULL);
ssl_expr_yyval.exVal = ssl_expr_make(op_Func, "file", args);
}
diff --git a/modules/ssl/ssl_expr_scan.c b/modules/ssl/ssl_expr_scan.c
index 705b2468ad..7d7bb85fd3 100644
--- a/modules/ssl/ssl_expr_scan.c
+++ b/modules/ssl/ssl_expr_scan.c
@@ -475,16 +475,16 @@ char *yytext;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-/* _ _
- * _ __ ___ ___ __| | ___ ___| |
- * | '_ ` _ \ / _ \ / _` | / __/ __| |
+/* _ _
+ * _ __ ___ ___ __| | ___ ___| |
+ * | '_ ` _ \ / _ \ / _` | / __/ __| |
* | | | | | | (_) | (_| | \__ \__ \ | mod_ssl - Apache Interface to OpenSSL
* |_| |_| |_|\___/ \__,_|___|___/___/_| http://www.modssl.org/
- * |_____|
+ * |_____|
* ssl_expr_scan.l
* Expression Scanner
*/
-/* ``Killing for peace is
+/* ``Killing for peace is
like fucking for virginity.''
-- Unknown */
/* _________________________________________________________________
@@ -665,7 +665,7 @@ YY_DECL
#line 58 "ssl_expr_scan.l"
-
+
char caStr[MAX_STR_LEN];
char *cpStr = NULL;
char caRegex[MAX_STR_LEN];
@@ -757,7 +757,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
#line 69 "ssl_expr_scan.l"
-{
+{
/* NOP */
}
YY_BREAK
@@ -1071,7 +1071,7 @@ YY_RULE_SETUP
case 46:
YY_RULE_SETUP
#line 208 "ssl_expr_scan.l"
-{
+{
return yytext[0];
}
YY_BREAK
@@ -1977,7 +1977,7 @@ int yyinput(char *buf, int max_size)
int n;
if ((n = MIN(max_size, ssl_expr_info.inputbuf
- + ssl_expr_info.inputlen
+ + ssl_expr_info.inputlen
- ssl_expr_info.inputptr)) <= 0)
return YY_NULL;
memcpy(buf, ssl_expr_info.inputptr, n);
diff --git a/modules/ssl/ssl_scache.c b/modules/ssl/ssl_scache.c
index 877dc0779d..b3af2fd0f9 100644
--- a/modules/ssl/ssl_scache.c
+++ b/modules/ssl/ssl_scache.c
@@ -162,7 +162,7 @@ static int ssl_ext_status_hook(request_rec *r, int flags)
else if (sc->mc->nSessionCacheMode == SSL_SCMODE_DC)
ssl_scache_dc_status(r, flags, r->pool);
#endif
-
+
ap_rputs("</td></tr>\n", r);
ap_rputs("</table>\n", r);
return OK;
diff --git a/modules/ssl/ssl_scache_dbm.c b/modules/ssl/ssl_scache_dbm.c
index 34a898c24f..ac8b216322 100644
--- a/modules/ssl/ssl_scache_dbm.c
+++ b/modules/ssl/ssl_scache_dbm.c
@@ -209,7 +209,7 @@ SSL_SESSION *ssl_scache_dbm_retrieve(server_rec *s, UCHAR *id, int idlen)
dbmkey.dptr = (char *)id;
dbmkey.dsize = idlen;
- /* and fetch it from the DBM file
+ /* and fetch it from the DBM file
* XXX: Should we open the dbm against r->pool so the cleanup will
* do the apr_dbm_close? This would make the code a bit cleaner.
*/
@@ -244,7 +244,7 @@ SSL_SESSION *ssl_scache_dbm_retrieve(server_rec *s, UCHAR *id, int idlen)
return NULL;
}
/* Cast needed, ucpData may be const */
- memcpy((unsigned char *)ucpData,
+ memcpy((unsigned char *)ucpData,
(char *)dbmval.dptr + sizeof(time_t), nData);
memcpy(&expiry, dbmval.dptr, sizeof(time_t));
@@ -347,7 +347,7 @@ static void ssl_scache_dbm_expire(server_rec *s)
/* pass 1: scan DBM database */
keyidx = 0;
- if ((rv = apr_dbm_open(&dbm, mc->szSessionCacheDataFile,
+ if ((rv = apr_dbm_open(&dbm, mc->szSessionCacheDataFile,
APR_DBM_RWCREATE,SSL_DBM_FILE_MODE,
p)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
diff --git a/modules/ssl/ssl_scache_dc.c b/modules/ssl/ssl_scache_dc.c
index 3d7d61c384..97f4581b50 100644
--- a/modules/ssl/ssl_scache_dc.c
+++ b/modules/ssl/ssl_scache_dc.c
@@ -81,8 +81,8 @@ void ssl_scache_dc_init(server_rec *s, apr_pool_t *p)
ssl_die();
}
ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, "distributed scache context initialised");
- /*
- * Success ...
+ /*
+ * Success ...
*/
mc->tSessionCacheDataTable = ctx;
return;
@@ -167,7 +167,7 @@ void ssl_scache_dc_status(request_rec *r, int flags, apr_pool_t *pool)
{
SSLModConfigRec *mc = myModConfig(r->server);
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"distributed scache 'ssl_scache_dc_status'");
ap_rprintf(r, "cache type: <b>DC (Distributed Cache)</b>, "
" target: <b>%s</b><br>", mc->szSessionCacheDataFile);
diff --git a/modules/ssl/ssl_scache_shmcb.c b/modules/ssl/ssl_scache_shmcb.c
index 741a20e833..024d1955ad 100644
--- a/modules/ssl/ssl_scache_shmcb.c
+++ b/modules/ssl/ssl_scache_shmcb.c
@@ -26,7 +26,7 @@
#include "ssl_private.h"
-/*
+/*
* This shared memory based SSL session cache implementation was
* originally written by Geoff Thorpe <geoff geoffthorpe.net> for C2Net
* Europe as a contribution to Ralf Engelschall's mod_ssl project.
@@ -88,7 +88,7 @@
* how many session-retrieves have failed.
* - removes_hit (unsigned long):
* - removes_miss (unsigned long):
- *
+ *
* Following immediately after the header is an array of "divisions".
* Each division is simply a "queue" immediately followed by its
* corresponding "cache". Each division handles some pre-defined band
@@ -135,7 +135,7 @@
* sessions are stored.
*/
-/*
+/*
* Header - can be memcpy'd to and from the front of the shared
* memory segment. NB: The first copy (commented out) has the
* elements in a meaningful order, but due to data-alignment
@@ -161,7 +161,7 @@ typedef struct {
unsigned int index_size;
} SHMCBHeader;
-/*
+/*
* Index - can be memcpy'd to and from an index inside each
* queue's index array.
*/
@@ -172,7 +172,7 @@ typedef struct {
unsigned char removed;
} SHMCBIndex;
-/*
+/*
* Queue - must be populated by a call to shmcb_get_division
* and the structure's pointers are used for updating (ie.
* the structure doesn't need any "set" to update values).
@@ -184,7 +184,7 @@ typedef struct {
SHMCBIndex *indexes;
} SHMCBQueue;
-/*
+/*
* Cache - same comment as for Queue. 'Queue's are in a 1-1
* correspondance with 'Cache's and are usually carried round
* in a pair, they are only seperated for clarity.
@@ -341,17 +341,17 @@ void ssl_scache_shmcb_init(server_rec *s, apr_pool_t *p)
}
/* Use anonymous shm by default, fall back on name-based. */
- rv = apr_shm_create(&(mc->pSessionCacheDataMM),
- mc->nSessionCacheDataSize,
+ rv = apr_shm_create(&(mc->pSessionCacheDataMM),
+ mc->nSessionCacheDataSize,
NULL, mc->pPool);
-
+
if (APR_STATUS_IS_ENOTIMPL(rv)) {
/* For a name-based segment, remove it first in case of a
* previous unclean shutdown. */
apr_shm_remove(mc->szSessionCacheDataFile, mc->pPool);
-
- rv = apr_shm_create(&(mc->pSessionCacheDataMM),
- mc->nSessionCacheDataSize,
+
+ rv = apr_shm_create(&(mc->pSessionCacheDataMM),
+ mc->nSessionCacheDataSize,
mc->szSessionCacheDataFile,
mc->pPool);
}
@@ -367,7 +367,7 @@ void ssl_scache_shmcb_init(server_rec *s, apr_pool_t *p)
shm_segsize = apr_shm_size_get(mc->pSessionCacheDataMM);
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- "shmcb_init allocated %" APR_SIZE_T_FMT
+ "shmcb_init allocated %" APR_SIZE_T_FMT
" bytes of shared memory",
shm_segsize);
if (!shmcb_init_memory(s, shm_segment, shm_segsize)) {
@@ -378,8 +378,8 @@ void ssl_scache_shmcb_init(server_rec *s, apr_pool_t *p)
ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"Shared memory session cache initialised");
- /*
- * Success ...
+ /*
+ * Success ...
*/
mc->tSessionCacheDataTable = shm_segment;
return;
@@ -509,9 +509,9 @@ void ssl_scache_shmcb_status(request_rec *r, int flags, apr_pool_t *p)
(int)(average_expiry - now), (int) (min_expiry - now),
(int)(max_expiry - now));
else
- ap_rprintf(r, "expiry threshold: <b>Calculation Error!</b>"
+ ap_rprintf(r, "expiry threshold: <b>Calculation Error!</b>"
"<br>");
-
+
}
ap_rprintf(r, "index usage: <b>%d%%</b>, cache usage: <b>%d%%</b>"
"<br>", index_pct, cache_pct);
@@ -533,7 +533,7 @@ void ssl_scache_shmcb_status(request_rec *r, int flags, apr_pool_t *p)
/*
**
-** Memory manipulation and low-level cache operations
+** Memory manipulation and low-level cache operations
**
*/
@@ -546,7 +546,7 @@ static BOOL shmcb_init_memory(
SHMCBCache cache;
unsigned int temp, loop, granularity;
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"entered shmcb_init_memory()");
/* Calculate some sizes... */
@@ -784,7 +784,7 @@ static BOOL shmcb_remove_session(
}
-/*
+/*
**
** Weirdo cyclic buffer functions
**
@@ -1015,7 +1015,7 @@ static unsigned int shmcb_expire_division(
shmcb_set_safe_uint(queue->first_pos, new_pos);
/* peek to the start of the next session */
idx = shmcb_get_index(queue, new_pos);
- /* We can use shmcb_cyclic_space because we've guaranteed
+ /* We can use shmcb_cyclic_space because we've guaranteed
* we don't fit the ambiguous full/empty case. */
shmcb_set_safe_uint(cache->pos_count,
shmcb_get_safe_uint(cache->pos_count) -
@@ -1314,7 +1314,7 @@ static BOOL shmcb_remove_session_id(
session_id_length = SSL_SESSION_get_session_id_length(pSession);
session_id = SSL_SESSION_get_session_id(pSession);
- if ((session_id_length == idlen)
+ if ((session_id_length == idlen)
&& (memcmp(id, session_id, idlen) == 0)) {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"a match!");
diff --git a/modules/ssl/ssl_util.c b/modules/ssl/ssl_util.c
index edfcb09643..92289bdd02 100644
--- a/modules/ssl/ssl_util.c
+++ b/modules/ssl/ssl_util.c
@@ -66,12 +66,12 @@ apr_file_t *ssl_util_ppopen(server_rec *s, apr_pool_t *p, const char *cmd,
apr_procattr_t *procattr;
apr_proc_t *proc;
- if (apr_procattr_create(&procattr, p) != APR_SUCCESS)
+ if (apr_procattr_create(&procattr, p) != APR_SUCCESS)
return NULL;
- if (apr_procattr_io_set(procattr, APR_FULL_BLOCK, APR_FULL_BLOCK,
+ if (apr_procattr_io_set(procattr, APR_FULL_BLOCK, APR_FULL_BLOCK,
APR_FULL_BLOCK) != APR_SUCCESS)
return NULL;
- if (apr_procattr_dir_set(procattr,
+ if (apr_procattr_dir_set(procattr,
ap_make_dirstr_parent(p, cmd)) != APR_SUCCESS)
return NULL;
if (apr_procattr_cmdtype_set(procattr, APR_PROGRAM) != APR_SUCCESS)
@@ -122,7 +122,7 @@ BOOL ssl_util_path_check(ssl_pathcheck_t pcm, const char *path, apr_pool_t *p)
if (path == NULL)
return FALSE;
- if (pcm & SSL_PCM_EXISTS && apr_stat(&finfo, path,
+ if (pcm & SSL_PCM_EXISTS && apr_stat(&finfo, path,
APR_FINFO_TYPE|APR_FINFO_SIZE, p) != 0)
return FALSE;
if (pcm & SSL_PCM_ISREG && finfo.filetype != APR_REG)
@@ -134,20 +134,20 @@ BOOL ssl_util_path_check(ssl_pathcheck_t pcm, const char *path, apr_pool_t *p)
return TRUE;
}
-ssl_algo_t ssl_util_algotypeof(X509 *pCert, EVP_PKEY *pKey)
+ssl_algo_t ssl_util_algotypeof(X509 *pCert, EVP_PKEY *pKey)
{
ssl_algo_t t;
EVP_PKEY *pFreeKey = NULL;
-
+
t = SSL_ALGO_UNKNOWN;
if (pCert != NULL)
pFreeKey = pKey = X509_get_pubkey(pCert);
if (pKey != NULL) {
switch (EVP_PKEY_key_type(pKey)) {
- case EVP_PKEY_RSA:
+ case EVP_PKEY_RSA:
t = SSL_ALGO_RSA;
break;
- case EVP_PKEY_DSA:
+ case EVP_PKEY_DSA:
t = SSL_ALGO_DSA;
break;
default:
@@ -162,16 +162,16 @@ ssl_algo_t ssl_util_algotypeof(X509 *pCert, EVP_PKEY *pKey)
return t;
}
-char *ssl_util_algotypestr(ssl_algo_t t)
+char *ssl_util_algotypestr(ssl_algo_t t)
{
char *cp;
cp = "UNKNOWN";
switch (t) {
- case SSL_ALGO_RSA:
+ case SSL_ALGO_RSA:
cp = "RSA";
break;
- case SSL_ALGO_DSA:
+ case SSL_ALGO_DSA:
cp = "DSA";
break;
default:
@@ -307,8 +307,8 @@ static void ssl_util_thr_lock(int mode, int type,
static unsigned long ssl_util_thr_id(void)
{
- /* OpenSSL needs this to return an unsigned long. On OS/390, the pthread
- * id is a structure twice that big. Use the TCB pointer instead as a
+ /* OpenSSL needs this to return an unsigned long. On OS/390, the pthread
+ * id is a structure twice that big. Use the TCB pointer instead as a
* unique unsigned long.
*/
#ifdef __MVS__
@@ -328,7 +328,7 @@ static apr_status_t ssl_util_thread_cleanup(void *data)
CRYPTO_set_locking_callback(NULL);
CRYPTO_set_id_callback(NULL);
- /* Let the registered mutex cleanups do their own thing
+ /* Let the registered mutex cleanups do their own thing
*/
return APR_SUCCESS;
}
diff --git a/modules/ssl/ssl_util_ssl.c b/modules/ssl/ssl_util_ssl.c
index 9a464c2560..cbce6f30be 100644
--- a/modules/ssl/ssl_util_ssl.c
+++ b/modules/ssl/ssl_util_ssl.c
@@ -90,7 +90,7 @@ X509 *SSL_read_X509(char* filename, X509 **x509, modssl_read_bio_cb_fn *cb)
/* 2. try DER+Base64 */
if ((bioS=BIO_new_file(filename, "r")) == NULL)
return NULL;
-
+
if ((bioF = BIO_new(BIO_f_base64())) == NULL) {
BIO_free(bioS);
return NULL;
@@ -119,8 +119,8 @@ X509 *SSL_read_X509(char* filename, X509 **x509, modssl_read_bio_cb_fn *cb)
static EVP_PKEY *d2i_PrivateKey_bio(BIO *bio, EVP_PKEY **key)
{
return ((EVP_PKEY *)ASN1_d2i_bio(
- (char *(*)())EVP_PKEY_new,
- (char *(*)())d2i_PrivateKey,
+ (char *(*)())EVP_PKEY_new,
+ (char *(*)())d2i_PrivateKey,
(bio), (unsigned char **)(key)));
}
#endif
@@ -256,7 +256,7 @@ char *SSL_make_ciphersuite(apr_pool_t *p, SSL *ssl)
char *cpCipherSuite;
char *cp;
- if (ssl == NULL)
+ if (ssl == NULL)
return "";
if ((sk = (STACK_OF(SSL_CIPHER) *)SSL_get_ciphers(ssl)) == NULL)
return "";
@@ -298,7 +298,7 @@ BOOL SSL_X509_isSGC(X509 *cert)
BOOL is_sgc;
int idx;
int i;
-
+
is_sgc = FALSE;
idx = X509_get_ext_by_NID(cert, NID_ext_key_usage, -1);
if (idx >= 0) {
@@ -328,7 +328,7 @@ BOOL SSL_X509_getBC(X509 *cert, int *ca, int *pathlen)
int idx;
BIGNUM *bn = NULL;
char *cp;
-
+
if ((idx = X509_get_ext_by_NID(cert, NID_basic_constraints, -1)) < 0)
return FALSE;
ext = X509_get_ext(cert, idx);
@@ -447,7 +447,7 @@ BOOL SSL_X509_INFO_load_path(apr_pool_t *ptemp,
apr_dir_close(dir);
return ok;
-}
+}
/* _________________________________________________________________
**
@@ -455,7 +455,7 @@ BOOL SSL_X509_INFO_load_path(apr_pool_t *ptemp,
** _________________________________________________________________
*/
-/*
+/*
* Read a file that optionally contains the server certificate in PEM
* format, possibly followed by a sequence of CA certificates that
* should be sent to the peer in the SSL Certificate message.
@@ -492,7 +492,7 @@ int SSL_CTX_use_certificate_chain(
/* create new extra chain by loading the certs */
n = 0;
while ((x509 = modssl_PEM_read_bio_X509(bio, NULL, cb, NULL)) != NULL) {
- if (!SSL_CTX_add_extra_chain_cert(ctx, x509)) {
+ if (!SSL_CTX_add_extra_chain_cert(ctx, x509)) {
X509_free(x509);
BIO_free(bio);
return -1;
@@ -501,7 +501,7 @@ int SSL_CTX_use_certificate_chain(
}
/* Make sure that only the error is just an EOF */
if ((err = ERR_peek_error()) > 0) {
- if (!( ERR_GET_LIB(err) == ERR_LIB_PEM
+ if (!( ERR_GET_LIB(err) == ERR_LIB_PEM
&& ERR_GET_REASON(err) == PEM_R_NO_START_LINE)) {
BIO_free(bio);
return -1;