Index: java/org/apache/coyote/http11/AbstractHttp11Processor.java =================================================================== --- java/org/apache/coyote/http11/AbstractHttp11Processor.java (revision 1720738) +++ java/org/apache/coyote/http11/AbstractHttp11Processor.java (working copy) @@ -228,6 +228,12 @@ /** + * Flag to indicate if the server header should be sent. + */ + protected boolean sendServer = true; + + + /** * Instance of the new protocol to use after the HTTP connection has been * upgraded. */ @@ -512,6 +518,21 @@ /** + * Set the send server flag. + */ + public void setSendServer(boolean sendServer) { + this.sendServer = sendServer; + } + + /** + * Get the send server flag. + */ + public boolean isSendServer() { + return sendServer; + } + + + /** * Check if the resource could be compressed, if the client supports it. */ private boolean isCompressable() { @@ -1566,12 +1587,14 @@ getOutputBuffer().sendStatus(); // Add server header - if (server != null) { - // Always overrides anything the app might set - headers.setValue("Server").setString(server); - } else if (headers.getValue("Server") == null) { - // If app didn't set the header, use the default - getOutputBuffer().write(Constants.SERVER_BYTES); + if (sendServer) { + if (server != null) { + // Always overrides anything the app might set + headers.setValue("Server").setString(server); + } else if (headers.getValue("Server") == null) { + // If app didn't set the header, use the default + getOutputBuffer().write(Constants.SERVER_BYTES); + } } int size = headers.size();