From 245161438160f0ed900bca3ce28b05b1bee6e3ad Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Mon, 9 Jan 2012 11:38:07 +1100 Subject: [PATCH] 366774 removed XSS vulnerbility --- .../src/main/java/org/eclipse/jetty/server/Request.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java index 30dfd68c0d5..01a6b7655d2 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java @@ -1027,12 +1027,11 @@ public class Request implements HttpServletRequest try { if (_connection != null) - _connection._generator.sendError(HttpStatus.BAD_REQUEST_400,"Port couldn't be parsed from Host header: " + hostPort,null, - true); + _connection._generator.sendError(HttpStatus.BAD_REQUEST_400,"Bad Host header",null,true); } catch (IOException e1) { - throw new IllegalArgumentException("IOException caught while trying to send error due to invalid host header: " + hostPort,e1); + throw new RuntimeException(e1); } } return _serverName;