]> code.citadel.org Git - citadel.git/blobdiff - webcit/groupdav_main.c
* output hostname into header; in this case it would be prepended to the body
[citadel.git] / webcit / groupdav_main.c
index 5df6188f2a68295fb63642537a49226246172815..c42ed8281d5432672fc94538f357099e50538a40 100644 (file)
@@ -183,6 +183,19 @@ void groupdav_identify_host(void) {
        }
 }
 
+/*
+ * 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));
+       }
+}
+
 
 void Header_HandleIfMatch(StrBuf *Line, ParsedHttpHdrs *hdr)
 {