diff src/org/eclipse/jetty/http/HttpGenerator.java @ 884:cb78ee27b0e0

remove Server.getVersion()
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 04 Oct 2016 16:30:02 -0600
parents fef4392f4905
children dbecd7faa1f5
line wrap: on
line diff
--- a/src/org/eclipse/jetty/http/HttpGenerator.java	Tue Oct 04 16:19:54 2016 -0600
+++ b/src/org/eclipse/jetty/http/HttpGenerator.java	Tue Oct 04 16:30:02 2016 -0600
@@ -29,6 +29,7 @@
 import org.eclipse.jetty.io.EndPoint;
 import org.eclipse.jetty.io.EofException;
 import org.eclipse.jetty.util.StringUtil;
+import org.eclipse.jetty.server.Server;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -99,16 +100,11 @@
 	private static final byte[] CONNECTION_ = StringUtil.getBytes("Connection: ");
 	private static final byte[] CRLF = StringUtil.getBytes("\015\012");
 	private static final byte[] TRANSFER_ENCODING_CHUNKED = StringUtil.getBytes("Transfer-Encoding: chunked\015\012");
-	private static byte[] SERVER = StringUtil.getBytes("Server: Jetty(7.0.x)\015\012");
+	private static byte[] SERVER = StringUtil.getBytes("Server: Jetty("+Server.version+")\015\012");
 
 	// other statics
 	private static final int CHUNK_SPACE = 12;
 
-	public static void setServerVersion(String version)
-	{
-		SERVER=StringUtil.getBytes("Server: Jetty("+version+")\015\012");
-	}
-
 	// data
 	protected boolean _bypass = false; // True if _content buffer can be written directly to endp and bypass the content buffer
 	private boolean _needCRLF = false;