i2ptunnel: Improve logging when no outproxy configured (ticket #2338)

This commit is contained in:
zzz
2019-06-18 13:24:48 +00:00
parent 6d8431a77e
commit ebe95fc575
2 changed files with 2 additions and 3 deletions

View File

@@ -228,7 +228,7 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R
currentProxy = selectProxy(hostLowerCase);
if (currentProxy == null) {
if (_log.shouldLog(Log.WARN))
_log.warn(getPrefix(requestId) + "Host wants to be outproxied, but we dont have any!");
_log.warn("No outproxy configured for connection to: " + hostLowerCase);
writeErrorMessage(ERR_NO_OUTPROXY, out);
return;
}

View File

@@ -871,9 +871,8 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
}
if(currentProxy == null) {
if(_log.shouldLog(Log.WARN)) {
_log.warn(getPrefix(requestId) + "Host wants to be outproxied, but we dont have any!");
_log.warn("No outproxy configured for request: " + requestURI);
}
l.log("No outproxy found for the request.");
try {
out.write(getErrorPage("noproxy", ERR_NO_OUTPROXY).getBytes("UTF-8"));
writeFooter(out);