-const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.115 2011/07/08 13:29:22 fabiankeil Exp $";
+const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.116 2011/07/08 13:29:39 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/loadcfg.c,v $
#define hash_default_server_timeout 2530089913ul /* "default-server-timeout" */
#define hash_deny_access 1227333715ul /* "deny-access" */
#define hash_enable_edit_actions 2517097536ul /* "enable-edit-actions" */
+#define hash_enable_compression 3943696946ul /* "enable-compression" */
#define hash_enable_remote_toggle 2979744683ul /* "enable-remote-toggle" */
#define hash_enable_remote_http_toggle 110543988ul /* "enable-remote-http-toggle" */
#define hash_enforce_blocks 1862427469ul /* "enforce-blocks" */
config->feature_flags &= ~RUNTIME_FEATURE_ACCEPT_INTERCEPTED_REQUESTS;
config->feature_flags &= ~RUNTIME_FEATURE_EMPTY_DOC_RETURNS_OK;
#ifdef FEATURE_COMPRESSION
+ config->feature_flags &= ~RUNTIME_FEATURE_COMPRESSION;
/*
* XXX: Run some benchmarks to see if there are better default values.
*/
break;
#endif /* def FEATURE_CGI_EDIT_ACTIONS */
+/* *************************************************************************
+ * enable-compression 0|1
+ * *************************************************************************/
+#ifdef FEATURE_COMPRESSION
+ case hash_enable_compression:
+ if (parse_toggle_state(cmd, arg) == 1)
+ {
+ config->feature_flags |= RUNTIME_FEATURE_COMPRESSION;
+ }
+ else
+ {
+ config->feature_flags &= ~RUNTIME_FEATURE_COMPRESSION;
+ }
+ break;
+#endif /* def FEATURE_COMPRESSION */
+
+
/* *************************************************************************
* enable-remote-toggle 0|1
* *************************************************************************/
-const char parsers_rcs[] = "$Id: parsers.c,v 1.223 2011/06/23 13:57:47 fabiankeil Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.224 2011/06/23 14:01:01 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/parsers.c,v $
static jb_err client_accept_encoding(struct client_state *csp, char **header)
{
#ifdef FEATURE_COMPRESSION
- if (strstr(*header, "deflate"))
+ if ((csp->config->feature_flags & RUNTIME_FEATURE_COMPRESSION)
+ && strstr(*header, "deflate"))
{
csp->flags |= CSP_FLAG_CLIENT_SUPPORTS_DEFLATE;
}
#ifndef PROJECT_H_INCLUDED
#define PROJECT_H_INCLUDED
/** Version string. */
-#define PROJECT_H_VERSION "$Id: project.h,v 1.167 2011/07/03 17:55:23 fabiankeil Exp $"
+#define PROJECT_H_VERSION "$Id: project.h,v 1.168 2011/07/08 13:27:31 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/project.h,v $
/** configuration_spec::feature_flags: Pages blocked with +handle-as-empty-doc get a return status of 200 OK. */
#define RUNTIME_FEATURE_EMPTY_DOC_RETURNS_OK 512U
+/** configuration_spec::feature_flags: Buffered content is sent compressed if the client supports it. */
+#define RUNTIME_FEATURE_COMPRESSION 1024U
+
/**
* Data loaded from the configuration file.
*