From 7fbae14e4e341899b349c48df3a57f0e9500f144 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Tue, 16 Nov 2010 22:36:38 +0100 Subject: [PATCH] Don't send identity header if we want to do gzip compression Propfind replies send 'Content-encoding: identity' right now, which is superseeded by the frameworks 'Content-encoding: gzip' in case of the client indicates this. sending that headers twice has uncertain results depending on the client; while the RFC demands to evaluate the later, some fail to read our reply then. --- webcit/groupdav_propfind.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/webcit/groupdav_propfind.c b/webcit/groupdav_propfind.c index f30822aec..867cec9ee 100644 --- a/webcit/groupdav_propfind.c +++ b/webcit/groupdav_propfind.c @@ -33,6 +33,8 @@ #include "webserver.h" #include "groupdav.h" +extern int DisableGzip; + /* * Given an encoded UID, translate that to an unencoded Citadel EUID and * then search for it in the current room. Return a message number or -1 @@ -290,7 +292,8 @@ void groupdav_collection_list(void) groupdav_common_headers(); hprintf("Date: %s\r\n", datestring); hprintf("Content-type: text/xml\r\n"); - hprintf("Content-encoding: identity\r\n"); + if (DisableGzip || (!WCC->Hdr->HR.gzip_ok)) + hprintf("Content-encoding: identity\r\n"); begin_burst(); @@ -484,7 +487,8 @@ void groupdav_propfind(void) groupdav_common_headers(); hprintf("Date: %s\r\n", datestring); hprintf("Content-type: text/xml\r\n"); - hprintf("Content-encoding: identity\r\n"); + if (DisableGzip || (!WCC->Hdr->HR.gzip_ok)) + hprintf("Content-encoding: identity\r\n"); begin_burst(); @@ -571,7 +575,8 @@ void groupdav_propfind(void) groupdav_common_headers(); hprintf("Date: %s\r\n", datestring); hprintf("Content-type: text/xml\r\n"); - hprintf("Content-encoding: identity\r\n"); + if (DisableGzip || (!WCC->Hdr->HR.gzip_ok)) + hprintf("Content-encoding: identity\r\n"); begin_burst(); @@ -621,7 +626,8 @@ void groupdav_propfind(void) groupdav_common_headers(); hprintf("Date: %s\r\n", datestring); hprintf("Content-type: text/xml\r\n"); - hprintf("Content-encoding: identity\r\n"); + if (DisableGzip || (!WCC->Hdr->HR.gzip_ok)) + hprintf("Content-encoding: identity\r\n"); begin_burst(); -- 2.30.2