*** empty log message ***
authorArt Cancro <ajc@citadel.org>
Tue, 7 Jun 2005 00:40:11 +0000 (00:40 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 7 Jun 2005 00:40:11 +0000 (00:40 +0000)
webcit/context_loop.c
webcit/groupdav_put.c
webcit/webserver.c

index 9fd9ba8fe4f9b003457879b5ff7bb21ef72eb33a..dc5825cb36e00790aedac7c049533e25c08e5272 100644 (file)
@@ -286,12 +286,16 @@ void context_loop(int sock)
 
                /*
                 * Can we compress?
+                * (Don't compress if HTTP_TRACING is active, because
+                * the compressed data obviously doesn't log well.)
                 */
+#ifndef HTTP_TRACING
                if (!strncasecmp(buf, "Accept-encoding:", 16)) {
                        if (strstr(&buf[16], "gzip")) {
                                gzip_ok = 1;
                        }
                }
+#endif /* HTTP_TRACING */
 
                /*
                 * Browser-based sessions use cookies for session authentication
index 8cec2d45091c2bc3b939ef9192fbf2d8cb91eae0..85a65c2da37c352a309dc92c82f3369cc204d2c3 100644 (file)
@@ -83,7 +83,8 @@ void groupdav_put(char *dav_pathname, char *dav_ifmatch,
                lprintf(9, "old_msgnum:  %ld\n", old_msgnum);
                if (atol(dav_ifmatch) != old_msgnum) {
                        wprintf("HTTP/1.1 412 Precondition Failed\r\n");
-                       lprintf(9, "HTTP/1.1 412 Precondition Failed\r\n");
+                       lprintf(9, "HTTP/1.1 412 Precondition Failed (ifmatch=%ld, old_msgnum=%ld)\r\n",
+                               atol(dav_ifmatch), old_msgnum);
                        groupdav_common_headers();
                        wprintf("Content-Length: 0\r\n\r\n");
                        return;
index e43cd89fbe4a58bd3218100ba65a9fa0fb13fae5..27f6c91a2248183ce6d97e3a76e11f567a031fc8 100644 (file)
@@ -9,8 +9,8 @@
 
 /*
  * Uncomment to dump an HTTP trace to stderr
-#define HTTP_TRACING 1
  */
+#define HTTP_TRACING 1
 
 #include <ctype.h>
 #include <stdlib.h>
@@ -275,6 +275,7 @@ void end_burst(void)
        WC->burst_len = 0;
        WC->burst = NULL;
 
+#ifndef HTTP_TRACING
 #ifdef HAVE_ZLIB
        /* Handle gzip compression */
        if (WC->gzip_ok) {
@@ -297,6 +298,7 @@ void end_burst(void)
                }
        }
 #endif                         /* HAVE_ZLIB */
+#endif                         /*  HTTP_TRACING */
 
        wprintf("Content-length: %d\r\n\r\n", the_len);
        client_write(the_data, the_len);