summaryrefslogtreecommitdiff
path: root/src/configfile-glue.c
diff options
context:
space:
mode:
authorArno Töll <arno@debian.org>2012-11-21 23:03:39 +0100
committerArno Töll <arno@debian.org>2012-11-21 23:03:39 +0100
commitec2cb646eff482dfe32955d01781b01211b0a77c (patch)
tree64dc98e42bb7a676769441858ea37d0c61c1267c /src/configfile-glue.c
parent19e84cab62acb124d75fd8e6b8da00c00f5d26b3 (diff)
downloadlighttpd-ec2cb646eff482dfe32955d01781b01211b0a77c.tar.gz
Imported Upstream version 1.4.12~20060907upstream/1.4.12_20060907
Diffstat (limited to 'src/configfile-glue.c')
-rw-r--r--src/configfile-glue.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/configfile-glue.c b/src/configfile-glue.c
index 6401854..6d5132a 100644
--- a/src/configfile-glue.c
+++ b/src/configfile-glue.c
@@ -119,6 +119,12 @@ int config_insert_values_internal(server *srv, array *ca, const config_values_t
case T_CONFIG_LOCAL:
case T_CONFIG_UNSET:
break;
+ case T_CONFIG_UNSUPPORTED:
+ log_error_write(srv, __FILE__, __LINE__, "ssss", "ERROR: found unsupported key:", cv[i].key, "-", (char *)(cv[i].destination));
+
+ srv->config_unsupported = 1;
+
+ break;
case T_CONFIG_DEPRECATED:
log_error_write(srv, __FILE__, __LINE__, "ssss", "ERROR: found deprecated key:", cv[i].key, "-", (char *)(cv[i].destination));
@@ -230,7 +236,7 @@ static cond_result_t config_check_cond_nocache(server *srv, connection *con, dat
break;
}
} else {
- l = NULL;
+ l = srv->empty_string;
}
break;
}
@@ -302,6 +308,10 @@ static cond_result_t config_check_cond_nocache(server *srv, connection *con, dat
l = con->uri.path;
break;
+ case COMP_HTTP_QUERYSTRING:
+ l = con->uri.query;
+ break;
+
case COMP_SERVER_SOCKET:
l = srv_sock->srv_token;
break;
@@ -422,6 +432,19 @@ static cond_result_t config_check_cond_cached(server *srv, connection *con, data
return caches[dc->context_ndx].result;
}
+void config_cond_cache_reset(server *srv, connection *con) {
+#if COND_RESULT_UNSET
+ size_t i;
+
+ for (i = srv->config_context->used - 1; i >= 0; i --) {
+ con->cond_cache[i].result = COND_RESULT_UNSET;
+ con->cond_cache[i].patterncount = 0;
+ }
+#else
+ memset(con->cond_cache, 0, sizeof(cond_cache_t) * srv->config_context->used);
+#endif
+}
+
int config_check_cond(server *srv, connection *con, data_config *dc) {
if (con->conf.log_condition_handling) {
log_error_write(srv, __FILE__, __LINE__, "s", "=== start of condition block ===");