* Don't compress when HTTP tracing/logging is enabled
authorArt Cancro <ajc@citadel.org>
Tue, 7 Jun 2005 04:31:01 +0000 (04:31 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 7 Jun 2005 04:31:01 +0000 (04:31 +0000)
webcit/ChangeLog
webcit/context_loop.c
webcit/webcit.h
webcit/webserver.c

index faab73abfbcb294557ddf1ac0cf5ceaca908af51..25549a7389214e3ade402db0a6a9b94775bee155 100644 (file)
@@ -1,4 +1,7 @@
 $Log$
+Revision 611.5  2005/06/07 04:31:00  ajc
+* Don't compress when HTTP tracing/logging is enabled
+
 Revision 611.4  2005/06/06 23:50:17  ajc
 * Made some changes to the calendar/uuid logic to fix a bug that caused
   duplicate entries for an event to appear in some situations
@@ -2554,4 +2557,3 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
-
index dc5825cb36e00790aedac7c049533e25c08e5272..9fd9ba8fe4f9b003457879b5ff7bb21ef72eb33a 100644 (file)
@@ -286,16 +286,12 @@ 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 ea1c21d7699e8039cb7ce456926cae77602607d6..75dd81b5f9292be36f05b04542173d9cab885195 100644 (file)
@@ -1,5 +1,15 @@
 /* $Id$ */
 
+/*
+ * Uncomment to dump an HTTP trace to stderr
+#define HTTP_TRACING 1
+ */
+
+#ifdef HTTP_TRACING
+#undef HAVE_ZLIB_H
+#undef HAVE_ZLIB
+#endif
+
 #ifdef HAVE_ZLIB_H
 #include <zlib.h>
 #endif
index 27f6c91a2248183ce6d97e3a76e11f567a031fc8..7b366df3c2d020dd8e5b68a79688a18bc7689e7d 100644 (file)
@@ -7,10 +7,6 @@
  *
  */
 
-/*
- * Uncomment to dump an HTTP trace to stderr
- */
-#define HTTP_TRACING 1
 
 #include <ctype.h>
 #include <stdlib.h>
@@ -275,7 +271,6 @@ void end_burst(void)
        WC->burst_len = 0;
        WC->burst = NULL;
 
-#ifndef HTTP_TRACING
 #ifdef HAVE_ZLIB
        /* Handle gzip compression */
        if (WC->gzip_ok) {
@@ -298,7 +293,6 @@ 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);