parse_toggle_state() only returns 0 or 1, so check for 1 directly.
[privoxy.git] / cgisimple.c
index 0a6c779..3ab3428 100644 (file)
@@ -1,4 +1,4 @@
-const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.106 2011/02/14 16:07:52 fabiankeil Exp $";
+const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.109 2011/04/19 13:00:47 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/cgisimple.c,v $
@@ -202,6 +202,8 @@ jb_err cgi_die (struct client_state *csp,
    /* quit */
    g_terminate = 1;
 
+   csp->flags &= ~CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE;
+
    rsp->content_length = 0;
    rsp->head_length = 0;
    rsp->is_static = 0;
@@ -776,7 +778,7 @@ jb_err cgi_send_user_manual(struct client_state *csp,
    {
       /*
        * We currently only support a flat file
-       * hierachy for the documentation.
+       * hierarchy for the documentation.
        */
       log_error(LOG_LEVEL_ERROR,
          "Rejecting the request to serve '%s' as it contains '/' or '..'",
@@ -1574,6 +1576,12 @@ static jb_err show_defines(struct map *exports)
    if (!err) err = map_conditional(exports, "FEATURE_CGI_EDIT_ACTIONS", 0);
 #endif /* ndef FEATURE_CGI_EDIT_ACTIONS */
 
+#ifdef FEATURE_COMPRESSION
+   if (!err) err = map_conditional(exports, "FEATURE_COMPRESSION", 1);
+#else /* ifndef FEATURE_COMPRESSION */
+   if (!err) err = map_conditional(exports, "FEATURE_COMPRESSION", 0);
+#endif /* ndef FEATURE_COMPRESSION */
+
 #ifdef FEATURE_CONNECTION_KEEP_ALIVE
    if (!err) err = map_conditional(exports, "FEATURE_CONNECTION_KEEP_ALIVE", 1);
 #else /* ifndef FEATURE_CONNECTION_KEEP_ALIVE */