From 7eee8d2d278242e5581b704a7a69371c3e9a91e9 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Wed, 25 May 2016 10:54:01 +0000 Subject: [PATCH] prepare_csp_for_next_request(): Use the global toggle state for new requests Previously new requests inherited the toggle state from the previous request even though the toggle state could have changed. Reported by Robert Klemme. --- jcc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jcc.c b/jcc.c index 0659b05c..b199c47a 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.444 2016/05/25 10:50:55 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.445 2016/05/25 10:51:10 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -2813,8 +2813,6 @@ static void chat(struct client_state *csp) *********************************************************************/ static void prepare_csp_for_next_request(struct client_state *csp) { - unsigned int toggled_on_flag_set = (0 != (csp->flags & CSP_FLAG_TOGGLED_ON)); - csp->content_type = 0; csp->content_length = 0; csp->expected_content_length = 0; @@ -2837,7 +2835,9 @@ static void prepare_csp_for_next_request(struct client_state *csp) } /* XXX: Store per-connection flags someplace else. */ csp->flags = (CSP_FLAG_ACTIVE | CSP_FLAG_REUSED_CLIENT_CONNECTION); - if (toggled_on_flag_set) +#ifdef FEATURE_TOGGLE + if (global_toggle_state) +#endif /* def FEATURE_TOGGLE */ { csp->flags |= CSP_FLAG_TOGGLED_ON; } -- 2.39.2