457788 Powered By in o.e.j.util.Jetty conditional on sendServerVersion

This commit is contained in:
Greg Wilkins 2015-04-23 11:26:23 +10:00
parent e633189b48
commit d434f419d2
3 changed files with 15 additions and 4 deletions

View File

@ -605,7 +605,11 @@ public class Response implements HttpServletResponse
writer.write(message);
writer.write("</pre>");
writer.write("</p>\n<hr />");
writer.write(Jetty.POWERED_BY_HTML);
if (getHttpChannel().getHttpConfiguration().getSendServerVersion())
{
writer.write(Jetty.POWERED_BY_HTML);
writer.write("<hr />");
}
writer.write("\n</body>\n</html>\n");
writer.flush();

View File

@ -164,8 +164,13 @@ public class DefaultHandler extends AbstractHandler
}
writer.write("</ul><hr>");
writer.write("<a href=\"http://eclipse.org/jetty\"><img border=0 src=\"/favicon.ico\"/></a>&nbsp;");
writer.write(Jetty.POWERED_BY_HTML+"<hr/>\n");
if (baseRequest.getHttpChannel().getHttpConfiguration().getSendServerVersion())
{
writer.write("<a href=\"http://eclipse.org/jetty\"><img border=0 src=\"/favicon.ico\"/></a>&nbsp;");
writer.write(Jetty.POWERED_BY_HTML+"<hr/>\n");
}
writer.write("\n</BODY>\n</HTML>\n");
writer.flush();

View File

@ -162,7 +162,9 @@ public class ErrorHandler extends AbstractHandler
writeErrorPageMessage(request,writer,code,message,uri);
if (showStacks)
writeErrorPageStacks(request,writer);
writer.write("<hr>"+Jetty.POWERED_BY_HTML+"<hr/>\n");
if (Request.getBaseRequest(request).getHttpChannel().getHttpConfiguration().getSendServerVersion())
writer.write("<hr>"+Jetty.POWERED_BY_HTML+"<hr/>\n");
}
/* ------------------------------------------------------------ */