/*
* 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
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;
/*
* Uncomment to dump an HTTP trace to stderr
-#define HTTP_TRACING 1
*/
+#define HTTP_TRACING 1
#include <ctype.h>
#include <stdlib.h>
WC->burst_len = 0;
WC->burst = NULL;
+#ifndef HTTP_TRACING
#ifdef HAVE_ZLIB
/* Handle gzip compression */
if (WC->gzip_ok) {
}
}
#endif /* HAVE_ZLIB */
+#endif /* HTTP_TRACING */
wprintf("Content-length: %d\r\n\r\n", the_len);
client_write(the_data, the_len);