]> code.citadel.org Git - citadel.git/blobdiff - webcit/groupdav_main.c
* Initial implementation of GroupDAV PROPFIND
[citadel.git] / webcit / groupdav_main.c
index 44701d0ad053d713fbb7acaef443e9116da9c93c..6dca61e589e7b1cbc04593608412cf185c5297f9 100644 (file)
@@ -47,6 +47,10 @@ void groupdav_main(struct httprequest *req) {
        char dav_method[SIZ];
        char dav_pathname[SIZ];
 
+       for (rptr=req; rptr!=NULL; rptr=rptr->next) {
+               lprintf(9, "> %s\n", rptr->line);
+       }
+
        if (!WC->logged_in) {
                wprintf("HTTP/1.1 401 Unauthorized\n");
                groupdav_common_headers();
@@ -69,6 +73,14 @@ void groupdav_main(struct httprequest *req) {
                return;
        }
 
+       /*
+        * The PROPFIND method is basically used to list all objects in a room.
+        */
+       if (!strcasecmp(dav_method, "PROPFIND")) {
+               groupdav_propfind(dav_pathname);
+               return;
+       }
+
        /*
         * Couldn't find what we were looking for.  Die in a car fire.
         */
@@ -79,16 +91,4 @@ void groupdav_main(struct httprequest *req) {
                "GroupDAV method \"%s\" is not implemented.\n",
                dav_method
        );
-
-       /*
-        * FIXME ... after development is finished, get rid of all this
-        */
-       wprintf("\n\n\n ** DEBUGGING INFO FOLLOWS ** \n\n");
-       wprintf("WC->httpauth_user = %s\n", WC->httpauth_user);
-       wprintf("WC->httpauth_pass = (%d characters)\n", strlen(WC->httpauth_pass));
-       wprintf("WC->wc_session    = %d\n", WC->wc_session);
-       
-       for (rptr=req; rptr!=NULL; rptr=rptr->next) {
-               wprintf("> %s\n", rptr->line);
-       }
 }