From: Fabian Keil <fk@fabiankeil.de>
Date: Sun, 27 Dec 2015 12:54:12 +0000 (+0000)
Subject: client_host_adder(): Reject the request if the destination host is unknown
X-Git-Tag: v_3_0_24~59
X-Git-Url: http://www.privoxy.org/gitweb/@default-cgi@/faq/%22https:/@referrer@?a=commitdiff_plain;h=a4b1b0873a7c063691de7c0005fdbf7aaf58fa5a;p=privoxy.git

client_host_adder(): Reject the request if the destination host is unknown

Previously the request would fail later on.
While at it, use a less silly log message.
---

diff --git a/parsers.c b/parsers.c
index 7352e8c4..c27f40b3 100644
--- a/parsers.c
+++ b/parsers.c
@@ -1,4 +1,4 @@
-const char parsers_rcs[] = "$Id: parsers.c,v 1.300 2015/12/27 12:48:59 fabiankeil Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.301 2015/12/27 12:49:29 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/parsers.c,v $
@@ -3600,9 +3600,8 @@ static jb_err client_host_adder(struct client_state *csp)
 
    if (!csp->http->hostport || !*(csp->http->hostport))
    {
-      /* XXX: When does this happen and why is it OK? */
-      log_error(LOG_LEVEL_INFO, "Weirdness in client_host_adder detected and ignored.");
-      return JB_ERR_OK;
+      log_error(LOG_LEVEL_ERROR, "Destination host unknown.");
+      return JB_ERR_PARSE;
    }
 
    /*