- strcpy(dav_ifmatch, "");
- dav_depth = 0;
-
- if ((StrLength(WCC->Hdr->HR.http_host) == 0) &&
- GetHash(HTTPHeaders, HKEY("HOST"), &vLine) &&
- (vLine != NULL)) {
- WCC->Hdr->HR.http_host = (StrBuf*)vLine;
- }
- if (GetHash(HTTPHeaders, HKEY("IF-MATCH"), &vLine) &&
- (vLine != NULL)) {
- safestrncpy(dav_ifmatch, ChrPtr((StrBuf*)vLine),
- sizeof dav_ifmatch);
- }
- if (GetHash(HTTPHeaders, HKEY("DEPTH"), &vLine) &&
- (vLine != NULL)) {
- if (!strcasecmp(ChrPtr((StrBuf*)vLine), "infinity")) {
- dav_depth = 32767;
- }
- else if (strcmp(ChrPtr((StrBuf*)vLine), "0") == 0) {
- dav_depth = 0;
- }
- else if (strcmp(ChrPtr((StrBuf*)vLine), "1") == 0) {
- dav_depth = 1;
- }
- }
-
- if (!WC->logged_in) {
- hprintf("HTTP/1.1 401 Unauthorized\r\n");
- groupdav_common_headers();
- hprintf("WWW-Authenticate: Basic realm=\"%s\"\r\n",
- ChrPtr(WCC->serv_info->serv_humannode));
- hprintf("Content-Length: 0\r\n");
- end_burst();
- return;
- }
-
- StrBufUnescape(DavPathname, 0);