Mercurial Hosting > luan
comparison 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 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 883:8c494fcd3d34 | 884:cb78ee27b0e0 | 
|---|---|
| 27 import org.eclipse.jetty.io.Buffers; | 27 import org.eclipse.jetty.io.Buffers; | 
| 28 import org.eclipse.jetty.io.ByteArrayBuffer; | 28 import org.eclipse.jetty.io.ByteArrayBuffer; | 
| 29 import org.eclipse.jetty.io.EndPoint; | 29 import org.eclipse.jetty.io.EndPoint; | 
| 30 import org.eclipse.jetty.io.EofException; | 30 import org.eclipse.jetty.io.EofException; | 
| 31 import org.eclipse.jetty.util.StringUtil; | 31 import org.eclipse.jetty.util.StringUtil; | 
| 32 import org.eclipse.jetty.server.Server; | |
| 32 import org.slf4j.Logger; | 33 import org.slf4j.Logger; | 
| 33 import org.slf4j.LoggerFactory; | 34 import org.slf4j.LoggerFactory; | 
| 34 | 35 | 
| 35 /* ------------------------------------------------------------ */ | 36 /* ------------------------------------------------------------ */ | 
| 36 /** | 37 /** | 
| 97 private static final byte[] CONNECTION_KEEP_ALIVE = StringUtil.getBytes("Connection: keep-alive\015\012"); | 98 private static final byte[] CONNECTION_KEEP_ALIVE = StringUtil.getBytes("Connection: keep-alive\015\012"); | 
| 98 private static final byte[] CONNECTION_CLOSE = StringUtil.getBytes("Connection: close\015\012"); | 99 private static final byte[] CONNECTION_CLOSE = StringUtil.getBytes("Connection: close\015\012"); | 
| 99 private static final byte[] CONNECTION_ = StringUtil.getBytes("Connection: "); | 100 private static final byte[] CONNECTION_ = StringUtil.getBytes("Connection: "); | 
| 100 private static final byte[] CRLF = StringUtil.getBytes("\015\012"); | 101 private static final byte[] CRLF = StringUtil.getBytes("\015\012"); | 
| 101 private static final byte[] TRANSFER_ENCODING_CHUNKED = StringUtil.getBytes("Transfer-Encoding: chunked\015\012"); | 102 private static final byte[] TRANSFER_ENCODING_CHUNKED = StringUtil.getBytes("Transfer-Encoding: chunked\015\012"); | 
| 102 private static byte[] SERVER = StringUtil.getBytes("Server: Jetty(7.0.x)\015\012"); | 103 private static byte[] SERVER = StringUtil.getBytes("Server: Jetty("+Server.version+")\015\012"); | 
| 103 | 104 | 
| 104 // other statics | 105 // other statics | 
| 105 private static final int CHUNK_SPACE = 12; | 106 private static final int CHUNK_SPACE = 12; | 
| 106 | |
| 107 public static void setServerVersion(String version) | |
| 108 { | |
| 109 SERVER=StringUtil.getBytes("Server: Jetty("+version+")\015\012"); | |
| 110 } | |
| 111 | 107 | 
| 112 // data | 108 // data | 
| 113 protected boolean _bypass = false; // True if _content buffer can be written directly to endp and bypass the content buffer | 109 protected boolean _bypass = false; // True if _content buffer can be written directly to endp and bypass the content buffer | 
| 114 private boolean _needCRLF = false; | 110 private boolean _needCRLF = false; | 
| 115 private boolean _needEOC = false; | 111 private boolean _needEOC = false; | 
