* All OS-level includes are now included from webcit.h instead of from
[citadel.git] / webcit / groupdav_put.c
index 8cec2d45091c2bc3b939ef9192fbf2d8cb91eae0..a968ccd57e626986d417f3c89af4b162cd525238 100644 (file)
@@ -5,22 +5,6 @@
  *
  */
 
-#include <ctype.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <sys/socket.h>
-#include <limits.h>
-#include <string.h>
-#include <pwd.h>
-#include <errno.h>
-#include <stdarg.h>
-#include <time.h>
-#include <pthread.h>
 #include "webcit.h"
 #include "webserver.h"
 #include "groupdav.h"
@@ -83,7 +67,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;
@@ -147,7 +132,7 @@ void groupdav_put(char *dav_pathname, char *dav_ifmatch,
                wprintf("HTTP/1.1 201 Created\r\n");
                lprintf(9, "HTTP/1.1 201 Created\r\n");
                groupdav_common_headers();
-               wprintf("ETag: \"%ld\"\r\n", new_msgnum);
+               wprintf("etag: \"%ld\"\r\n", new_msgnum);
                wprintf("Content-Length: 0\r\n");
                wprintf("Location: ");
                if (strlen(WC->http_host) > 0) {
@@ -166,7 +151,7 @@ void groupdav_put(char *dav_pathname, char *dav_ifmatch,
        wprintf("HTTP/1.1 204 No Content\r\n");
        lprintf(9, "HTTP/1.1 204 No Content\r\n");
        groupdav_common_headers();
-       wprintf("ETag: \"%ld\"\r\n", new_msgnum);
+       wprintf("etag: \"%ld\"\r\n", new_msgnum);
        wprintf("Content-Length: 0\r\n\r\n");
 
        /* The item we replaced has probably already been deleted by