added option to disable compression

This commit is contained in:
Nikos Mavrogiannopoulos
2015-01-15 16:38:15 +01:00
parent 850181ed4e
commit 27168673f0
4 changed files with 13 additions and 0 deletions

View File

@@ -64,6 +64,7 @@ static struct cfg_options available_options[] = {
{ .name = "split-dns", .type = OPTION_MULTI_LINE, .mandatory = 0 },
{ .name = "listen-host", .type = OPTION_STRING, .mandatory = 0 },
{ .name = "listen-host-is-dyndns", .type = OPTION_BOOLEAN, .mandatory = 0 },
{ .name = "disable-compression", .type = OPTION_BOOLEAN, .mandatory = 0 },
{ .name = "tcp-port", .type = OPTION_NUMERIC, .mandatory = 0 },
{ .name = "udp-port", .type = OPTION_NUMERIC, .mandatory = 0 },
{ .name = "keepalive", .type = OPTION_NUMERIC, .mandatory = 0 },
@@ -570,6 +571,8 @@ unsigned force_cert_auth;
config->cisco_client_compat = 1;
}
READ_TF("disable-compression", config->disable_compression, 0);
READ_TF("use-seccomp", config->isolate, 0);
if (config->isolate) {
fprintf(stderr, "note that 'use-seccomp' was replaced by 'isolate-workers'\n");

View File

@@ -226,6 +226,9 @@ server-key = /path/to/key.pem
# See the manual to generate an empty CRL initially.
#crl = /path/to/crl.pem
# Uncomment this to disable compression negotiation.
#disable-compression = true
# GnuTLS priority string; note that SSL 3.0 is disabled by default
# as there are no openconnect (and possibly anyconnect clients) using
# that protocol. The string below does not enforce perfect forward

View File

@@ -218,6 +218,7 @@ struct cfg_st {
char *auth_additional; /* the additional string specified in the auth methode */
gnutls_certificate_request_t cert_req;
char *priorities;
unsigned disable_compression;
char *chroot_dir; /* where the xml files are served from */
char *banner;
char *ocsp_response; /* file with the OCSP response */

View File

@@ -431,6 +431,9 @@ void header_value_check(struct worker_st *ws, struct http_req_st *req)
break;
case HEADER_DTLS_ENCODING:
if (ws->config->disable_compression)
break;
ws->dtls_selected_comp = NULL;
str = (char *)value;
@@ -454,6 +457,9 @@ void header_value_check(struct worker_st *ws, struct http_req_st *req)
break;
case HEADER_CSTP_ENCODING:
if (ws->config->disable_compression)
break;
ws->cstp_selected_comp = NULL;
str = (char *)value;