X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fcontext_loop.c;h=aada8bee64b2ab37662489f914d22338cf3575bc;hb=d6cddf13d91a69d8eb70dd846583e212c79075f2;hp=a358545e989c36ccbc46ce5be28f495cf4aa46a1;hpb=bfa9090d165dba3d9ae49c37d1eacf9181d07579;p=citadel.git diff --git a/webcit/context_loop.c b/webcit/context_loop.c index a358545e9..aada8bee6 100644 --- a/webcit/context_loop.c +++ b/webcit/context_loop.c @@ -671,24 +671,19 @@ void Header_HandleUserAgent(StrBuf *Line, ParsedHttpHdrs *hdr) void Header_HandleHost(StrBuf *Line, ParsedHttpHdrs *hdr) { - if ((follow_xff) && (hdr->HR.http_host != NULL)) { - return; - } - 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)); - } + 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) { - if (follow_xff) - hdr->HR.http_host = Line; + if (follow_xff) { + /* FIXME do something here */ + } }