X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fcontext_loop.c;h=a358545e989c36ccbc46ce5be28f495cf4aa46a1;hb=74ed588f96bdfc2292b03f9b20e569ba8cd971bb;hp=ca72387d7d791c6af8d03121cafd98674cb8c366;hpb=6890b64dae56f05982f83218da6478d6d302fa8e;p=citadel.git diff --git a/webcit/context_loop.c b/webcit/context_loop.c index ca72387d7..a358545e9 100644 --- a/webcit/context_loop.c +++ b/webcit/context_loop.c @@ -671,10 +671,18 @@ void Header_HandleUserAgent(StrBuf *Line, ParsedHttpHdrs *hdr) void Header_HandleHost(StrBuf *Line, ParsedHttpHdrs *hdr) { - if ((follow_xff) && (hdr->HR.http_host != NULL)) + if ((follow_xff) && (hdr->HR.http_host != NULL)) { return; - else + } + else { hdr->HR.http_host = Line; + if (site_prefix == NULL) { + site_prefix = NewStrBuf(); + StrBufAppendPrintf(site_prefix, "%s://", (is_https ? "https" : "http") ); + StrBufAppendBuf(site_prefix, Line, 0); + lprintf(CTDL_DEBUG, "\033[33m [%s] \033[0m\n", ChrPtr(site_prefix)); + } + } } void Header_HandleXFFHost(StrBuf *Line, ParsedHttpHdrs *hdr)