Mercurial Hosting > luan
comparison src/org/eclipse/jetty/server/AbstractHttpConnection.java @ 977:d35b0a3a7a4a
remove __currentConnection
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 16 Oct 2016 01:31:05 -0600 |
parents | 7422ca1ae146 |
children | c8cd3e96db5f |
comparison
equal
deleted
inserted
replaced
976:0697c1219e70 | 977:d35b0a3a7a4a |
---|---|
91 */ | 91 */ |
92 public abstract class AbstractHttpConnection extends AbstractConnection | 92 public abstract class AbstractHttpConnection extends AbstractConnection |
93 { | 93 { |
94 private static final Logger LOG = LoggerFactory.getLogger(AbstractHttpConnection.class); | 94 private static final Logger LOG = LoggerFactory.getLogger(AbstractHttpConnection.class); |
95 | 95 |
96 private static final ThreadLocal<AbstractHttpConnection> __currentConnection = new ThreadLocal<AbstractHttpConnection>(); | |
97 | |
98 private int _requests; | 96 private int _requests; |
99 | 97 |
100 private final Connector _connector; | 98 private final Connector _connector; |
101 private final Server _server; | 99 private final Server _server; |
102 protected final HttpURI _uri = StringUtil.__UTF8.equals(URIUtil.__CHARSET)?new HttpURI():new EncodedHttpURI(URIUtil.__CHARSET); | 100 protected final HttpURI _uri = StringUtil.__UTF8.equals(URIUtil.__CHARSET)?new HttpURI():new EncodedHttpURI(URIUtil.__CHARSET); |
121 private boolean _expect102Processing = false; | 119 private boolean _expect102Processing = false; |
122 private boolean _head = false; | 120 private boolean _head = false; |
123 private boolean _host = false; | 121 private boolean _host = false; |
124 private boolean _delayedHandling = false; | 122 private boolean _delayedHandling = false; |
125 private boolean _earlyEOF = false; | 123 private boolean _earlyEOF = false; |
126 | |
127 public static AbstractHttpConnection getCurrentConnection() | |
128 { | |
129 return __currentConnection.get(); | |
130 } | |
131 | |
132 protected static void setCurrentConnection(AbstractHttpConnection connection) | |
133 { | |
134 __currentConnection.set(connection); | |
135 } | |
136 | 124 |
137 protected AbstractHttpConnection(Connector connector, EndPoint endpoint) | 125 protected AbstractHttpConnection(Connector connector, EndPoint endpoint) |
138 { | 126 { |
139 super(endpoint); | 127 super(endpoint); |
140 _connector = connector; | 128 _connector = connector; |