hprintf(
"Server: %s / %s\r\n"
"Connection: close\r\n",
- PACKAGE_STRING, ChrPtr(serv_info.serv_software)
+ PACKAGE_STRING, ChrPtr(WC->serv_info->serv_software)
);
}
StrBuf *dav_content,
int Offset
) {
+ wcsession *WCC = WC;
void *vLine;
char dav_ifmatch[256];
int dav_depth;
strcpy(dav_ifmatch, "");
dav_depth = 0;
- if (IsEmptyStr(WC->http_host) &&
+ if ((StrLength(WCC->http_host) == 0) &&
GetHash(HTTPHeaders, HKEY("HOST"), &vLine) &&
(vLine != NULL)) {
- safestrncpy(WC->http_host, ChrPtr((StrBuf*)vLine),
- sizeof WC->http_host);
+ WCC->http_host = (StrBuf*)vLine;
}
if (GetHash(HTTPHeaders, HKEY("IF-MATCH"), &vLine) &&
(vLine != NULL)) {
hprintf("HTTP/1.1 401 Unauthorized\r\n");
groupdav_common_headers();
hprintf("WWW-Authenticate: Basic realm=\"%s\"\r\n",
- ChrPtr(serv_info.serv_humannode));
+ ChrPtr(WCC->serv_info->serv_humannode));
hprintf("Content-Length: 0\r\n");
end_burst();
return;
* Output our host prefix for globally absolute URL's.
*/
void groupdav_identify_host(void) {
- if (!IsEmptyStr(WC->http_host)) {
+ wcsession *WCC = WC;
+
+ if (StrLength(WCC->http_host)!=0) {
wprintf("%s://%s",
(is_https ? "https" : "http"),
- WC->http_host);
+ ChrPtr(WCC->http_host));
}
}