#define D_DICTIONARY 0x00040000
#define D_MEMORY 0x00080000
-#define DEBUG (D_WEB_CLIENT_ACCESS|D_LISTENER|D_RRD_STATS)
+//#define DEBUG (D_WEB_CLIENT_ACCESS|D_LISTENER|D_RRD_STATS)
//#define DEBUG 0xffffffff
-//#define DEBUG (0)
+#define DEBUG (0)
extern unsigned long long debug_flags;
fprintf(stderr, " -u USERNAME can be any system username to run as. Default: none.\n");
fprintf(stderr, " -ch path to access host /proc and /sys when running in a container. Default: empty.\n");
fprintf(stderr, " -nd or -nodeamon to disable forking in the background. Default: unset.\n");
- fprintf(stderr, " -df FLAGS debug options. Default: 0x%8llx.\n", debug_flags);
+ fprintf(stderr, " -df FLAGS debug options. Default: 0x%08llx.\n", debug_flags);
exit(1);
}
}
#define INITIAL_WEB_DATA_LENGTH 65536
int web_client_timeout = DEFAULT_DISCONNECT_IDLE_WEB_CLIENTS_AFTER_SECONDS;
-
+int web_enable_gzip = 1;
struct web_client *web_clients = NULL;
unsigned long long web_clients_count = 0;
else w->keepalive = 0;
// check if the client accepts deflate
- if(strstr(w->data->buffer, "gzip"))
+ if(web_enable_gzip && strstr(w->data->buffer, "gzip"))
web_client_enable_deflate(w);
int datasource_type = DATASOURCE_GOOGLE_JSONP;
#define DEFAULT_DISCONNECT_IDLE_WEB_CLIENTS_AFTER_SECONDS 60
extern int web_client_timeout;
+extern int web_enable_gzip;
#ifndef NETDATA_WEB_CLIENT_H
#define NETDATA_WEB_CLIENT_H 1
error("Cannot set pthread cancel state to ENABLE.");
web_client_timeout = config_get_number("global", "disconnect idle web clients after seconds", DEFAULT_DISCONNECT_IDLE_WEB_CLIENTS_AFTER_SECONDS);
+ web_enable_gzip = config_get_boolean("global", "enable web responses gzip compression", web_enable_gzip);
if(listen_fd < 0) fatal("LISTENER: Listen socket is not ready.");