Jetty: Fix URI in request logs

Use standard getRequestURI() instead of Jetty internal getHttpURI(),
which apparently changed somewhere along the way

Hide Jetty ClosedChannelException from I2P logs
This commit is contained in:
zzz
2021-01-13 08:54:46 -05:00
parent bf29132898
commit 5f3c41244b
2 changed files with 4 additions and 2 deletions

View File

@@ -14,6 +14,8 @@
package net.i2p.jetty;
import java.nio.channels.ClosedChannelException;
import net.i2p.I2PAppContext;
import net.i2p.util.Log;
@@ -127,7 +129,7 @@ public class I2PLogger implements Logger
if (th != null) {
if (_log.shouldLog(Log.WARN))
_log.warn(msg, th);
else
else if (!(th instanceof ClosedChannelException))
_log.logAlways(Log.WARN, msg + ": " + th);
} else {
_log.logAlways(Log.WARN, msg);

View File

@@ -317,7 +317,7 @@ public class I2PRequestLog extends AbstractLifeCycle implements RequestLog
buf.append(request.getMethod());
buf.append(' ');
u8buf.append(request.getHttpURI().toString());
u8buf.append(request.getRequestURI());
buf.append(' ');
buf.append(request.getProtocol());