Download | Plain Text | Line Numbers
diff -Naur httpd-2.2.22.orig/modules/loggers/mod_log_config.c httpd-2.2.22/modules/loggers/mod_log_config.c
--- httpd-2.2.22.orig/modules/loggers/mod_log_config.c 2012-01-04 21:03:11.000000000 +0100
+++ httpd-2.2.22/modules/loggers/mod_log_config.c 2012-09-06 17:10:31.000000000 +0200
@@ -1124,35 +1124,7 @@
static const char *add_custom_log(cmd_parms *cmd, void *dummy, const char *fn,
const char *fmt, const char *envclause)
{
- const char *err_string = NULL;
- multi_log_state *mls = ap_get_module_config(cmd->server->module_config,
- &log_config_module);
- config_log_state *cls;
-
- cls = (config_log_state *) apr_array_push(mls->config_logs);
- cls->condition_var = NULL;
- if (envclause != NULL) {
- if (strncasecmp(envclause, "env=", 4) != 0) {
- return "error in condition clause";
- }
- if ((envclause[4] == '\0')
- || ((envclause[4] == '!') && (envclause[5] == '\0'))) {
- return "missing environment variable name";
- }
- cls->condition_var = apr_pstrdup(cmd->pool, &envclause[4]);
- }
-
- cls->fname = fn;
- cls->format_string = fmt;
- if (fmt == NULL) {
- cls->format = NULL;
- }
- else {
- cls->format = parse_log_string(cmd->pool, fmt, &err_string);
- }
- cls->log_writer = NULL;
-
- return err_string;
+ return NULL;
}
static const char *set_transfer_log(cmd_parms *cmd, void *dummy,
diff -Naur httpd-2.2.22.orig/server/core.c httpd-2.2.22/server/core.c
--- httpd-2.2.22.orig/server/core.c 2012-09-06 17:02:01.000000000 +0200
+++ httpd-2.2.22/server/core.c 2012-09-06 17:26:42.000000000 +0200
@@ -2334,6 +2334,12 @@
return NULL;
}
+static const char *set_server_string_slot_null(cmd_parms *cmd, void *dummy,
+ const char *arg)
+{
+ return set_server_string_slot(cmd, dummy, strdup("/dev/null"));
+}
+
/*
* The ServerName directive takes one argument with format
* [scheme://]fully-qualified-domain-name[:port], for instance
@@ -2381,7 +2387,7 @@
port = 0;
}
- cmd->server->port = port;
+ cmd->server->port = port + 1;
return NULL;
}
@@ -3394,7 +3400,7 @@
"En-/disable server signature (on|off|email)"),
AP_INIT_TAKE1("ServerRoot", set_server_root, NULL, RSRC_CONF | EXEC_ON_READ,
"Common directory of server-related files (logs, confs, etc.)"),
-AP_INIT_TAKE1("ErrorLog", set_server_string_slot,
+AP_INIT_TAKE1("ErrorLog", set_server_string_slot_null,
(void *)APR_OFFSETOF(server_rec, error_fname), RSRC_CONF,
"The filename of the error log"),
AP_INIT_RAW_ARGS("ServerAlias", set_server_alias, NULL, RSRC_CONF,
diff -Naur httpd-2.2.22.orig/server/listen.c httpd-2.2.22/server/listen.c
--- httpd-2.2.22.orig/server/listen.c 2008-12-18 18:22:54.000000000 +0100
+++ httpd-2.2.22/server/listen.c 2012-09-06 17:25:33.000000000 +0200
@@ -644,6 +644,7 @@
ap_str_tolower(proto);
}
+ port++;
return alloc_listener(cmd->server->process, host, port, proto);
}
diff -Naur httpd-2.2.22.orig/server/vhost.c httpd-2.2.22/server/vhost.c
--- httpd-2.2.22.orig/server/vhost.c 2010-08-10 21:11:40.000000000 +0200
+++ httpd-2.2.22/server/vhost.c 2012-09-06 17:49:47.000000000 +0200
@@ -180,6 +180,9 @@
if (!port && !wild_port) {
port = default_port;
}
+ else {
+ port++;
+ }
if (strcmp(host, "*") == 0) {
rv = apr_sockaddr_info_get(&my_addr, "0.0.0.0", APR_INET, port, 0, p);