Hdr->http_host is now gone.
authorArt Cancro <ajc@citadel.org>
Wed, 8 Sep 2010 17:02:05 +0000 (13:02 -0400)
committerArt Cancro <ajc@citadel.org>
Wed, 8 Sep 2010 17:02:05 +0000 (13:02 -0400)
webcit/context_loop.c
webcit/webcit.h

index a358545e989c36ccbc46ce5be28f495cf4aa46a1..aada8bee64b2ab37662489f914d22338cf3575bc 100644 (file)
@@ -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 */
+       }
 }
 
 
index 24eca9ad3454d56c7d334fe281e8876301554d30..33f87cd8066e4dec58126d7c91cf347fe160ba04 100644 (file)
@@ -429,7 +429,6 @@ typedef struct _HdrRefs {
        StrBuf *ContentType;
        StrBuf *RawCookie;
        StrBuf *ReqLine;
-       StrBuf *http_host;                      /* HTTP Host: header */
        StrBuf *browser_host;
        StrBuf *browser_language;
        StrBuf *user_agent;