From f350d186fcd1189f1e8ee702aa19b122893c7431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Tue, 26 Feb 2008 16:19:42 +0000 Subject: [PATCH] r2085@chromobil: stefan | 2008-02-26 16:14:50 +0100 Fix #1164: Reset conditional cache git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2080 152afb58-edef-0310-8abb-c4023f1b3aa9 --- src/connections.c | 10 ++-------- src/response.c | 4 ++++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/connections.c b/src/connections.c index 94d36b4e..016a1044 100644 --- a/src/connections.c +++ b/src/connections.c @@ -834,14 +834,8 @@ int connection_reset(server *srv, connection *con) { con->plugin_ctx[pd->id] = NULL; } -#if COND_RESULT_UNSET - 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 + /* The cond_cache gets reset in response.c */ +// config_cond_cache_reset(srv, con); #ifdef USE_OPENSSL if (con->ssl_error_want_reuse_buffer) { diff --git a/src/response.c b/src/response.c index 7ac0b184..7686bc7b 100644 --- a/src/response.c +++ b/src/response.c @@ -19,6 +19,7 @@ #include "stat_cache.h" #include "chunk.h" +#include "configfile.h" #include "connections.h" #include "plugin.h" @@ -150,6 +151,9 @@ handler_t http_response_prepare(server *srv, connection *con) { * * */ + config_cond_cache_reset(srv, con); + config_setup_connection(srv, con); // Perhaps this could be removed at other places. + if (con->conf.log_condition_handling) { log_error_write(srv, __FILE__, __LINE__, "s", "run condition"); }