]> code.citadel.org Git - citadel.git/commitdiff
Don't send identity header if we want to do gzip compression
authorWilfried Goesgens <dothebart@citadel.org>
Tue, 16 Nov 2010 21:36:38 +0000 (22:36 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Tue, 16 Nov 2010 21:36:38 +0000 (22:36 +0100)
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

index 7c505e0bd7dfbc0594587a2cdd533581f1f0d884..ab1b2e807039283454484c5052fe484d906e25ba 100644 (file)
@@ -31,6 +31,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
@@ -288,7 +290,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();
 
@@ -482,7 +485,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();
 
@@ -569,7 +573,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();
        
@@ -619,7 +624,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();