From: Art Cancro Date: Tue, 7 Jun 2005 04:31:01 +0000 (+0000) Subject: * Don't compress when HTTP tracing/logging is enabled X-Git-Tag: v7.86~4860 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=05da9f25d7da6eb174aa04bf4636b2bdb09233b6;p=citadel.git * Don't compress when HTTP tracing/logging is enabled --- diff --git a/webcit/ChangeLog b/webcit/ChangeLog index faab73abf..25549a738 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -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 1998-12-03 Nathan Bryant * webserver.c: warning fix - diff --git a/webcit/context_loop.c b/webcit/context_loop.c index dc5825cb3..9fd9ba8fe 100644 --- a/webcit/context_loop.c +++ b/webcit/context_loop.c @@ -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 diff --git a/webcit/webcit.h b/webcit/webcit.h index ea1c21d76..75dd81b5f 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -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 #endif diff --git a/webcit/webserver.c b/webcit/webserver.c index 27f6c91a2..7b366df3c 100644 --- a/webcit/webserver.c +++ b/webcit/webserver.c @@ -7,10 +7,6 @@ * */ -/* - * Uncomment to dump an HTTP trace to stderr - */ -#define HTTP_TRACING 1 #include #include @@ -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);