/*
- * $Id$
- *
* Entry point for GroupDAV functions
*
+ * Copyright (c) 2005-2010 by the citadel.org team
+ *
+ * This program is open source software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "webcit.h"
* Output our host prefix for globally absolute URL's.
*/
void groupdav_identify_host(void) {
- wcsession *WCC = WC;
-
- if (StrLength(WCC->Hdr->HR.http_host)!=0) {
- wc_printf("%s://%s",
- (is_https ? "https" : "http"),
- ChrPtr(WCC->Hdr->HR.http_host));
- }
+ wc_printf("%s", ChrPtr(site_prefix));
}
void tmplput_GROUPDAV_HOSTNAME(StrBuf *Target, WCTemplputParams *TP)
{
- wcsession *WCC = WC;
-
- if (StrLength(WCC->Hdr->HR.http_host)!=0) {
- StrBufAppendPrintf(Target,
- "%s://%s",
- (is_https ? "https" : "http"),
- ChrPtr(WCC->Hdr->HR.http_host));
- }
+ StrBufAppendPrintf(Target, "%s", ChrPtr(site_prefix));
}
/*
* Output our host prefix for globally absolute URL's.
*/
void groupdav_identify_hosthdr(void) {
- wcsession *WCC = WC;
-
- if (StrLength(WCC->Hdr->HR.http_host)!=0) {
- hprintf("%s://%s",
- (is_https ? "https" : "http"),
- ChrPtr(WCC->Hdr->HR.http_host));
- }
+ hprintf("%s", ChrPtr(site_prefix));
}
InitModule_GROUPDAV
(void)
{
-// WebcitAddUrlHandler(HKEY("groupdav"), "", 0, groupdav_main, XHTTP_COMMANDS|COOKIEUNNEEDED|FORCE_SESSIONCLOSE);
+/*
+ WebcitAddUrlHandler(HKEY("groupdav"), "", 0, groupdav_main, XHTTP_COMMANDS|COOKIEUNNEEDED|FORCE_SESSIONCLOSE);
+ */
RegisterDAVNamespace(HKEY("groupdav"), HKEY("GroupDAV"),
groupdav_main, GroupdavDispatchREST,
XHTTP_COMMANDS|COOKIEUNNEEDED|FORCE_SESSIONCLOSE);