X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fcontext_loop.c;h=2dd63c9a2efdb551193577e536d64489caa7b04a;hb=e0af4c7875c56881a82032b2467c6b6ac2740b15;hp=aada8bee64b2ab37662489f914d22338cf3575bc;hpb=d6cddf13d91a69d8eb70dd846583e212c79075f2;p=citadel.git diff --git a/webcit/context_loop.c b/webcit/context_loop.c index aada8bee6..2dd63c9a2 100644 --- a/webcit/context_loop.c +++ b/webcit/context_loop.c @@ -675,14 +675,15 @@ void Header_HandleHost(StrBuf *Line, ParsedHttpHdrs *hdr) 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) { - /* FIXME do something here */ + if ( (follow_xff) && (site_prefix == NULL)) { + site_prefix = NewStrBuf(); + StrBufAppendPrintf(site_prefix, "http://"); /* this is naive; do something about it */ + StrBufAppendBuf(site_prefix, Line, 0); } }