+ if (StrLength(WCC->Hdr->HR.http_host)!=0) {
+ hprintf("%s://%s",
+ (is_https ? "https" : "http"),
+ ChrPtr(WCC->Hdr->HR.http_host));
+ }
+}
+
+
+void Header_HandleIfMatch(StrBuf *Line, ParsedHttpHdrs *hdr)
+{
+ hdr->HR.dav_ifmatch = Line;
+}
+
+void Header_HandleDepth(StrBuf *Line, ParsedHttpHdrs *hdr)
+{
+ if (!strcasecmp(ChrPtr(Line), "infinity")) {
+ hdr->HR.dav_depth = 32767;
+ }
+ else if (strcmp(ChrPtr(Line), "0") == 0) {
+ hdr->HR.dav_depth = 0;
+ }
+ else if (strcmp(ChrPtr(Line), "1") == 0) {
+ hdr->HR.dav_depth = 1;
+ }
+}
+
+void
+InitModule_GROUPDAV
+(void)
+{
+ WebcitAddUrlHandler(HKEY("groupdav"), "", 0, groupdav_main, XHTTP_COMMANDS|COOKIEUNNEEDED|FORCE_SESSIONCLOSE);
+ RegisterHeaderHandler(HKEY("IF-MATCH"), Header_HandleIfMatch);
+ RegisterHeaderHandler(HKEY("DEPTH"), Header_HandleDepth);
+
+}