Mercurial Hosting > luan
comparison src/org/eclipse/jetty/server/AbstractHttpConnection.java @ 1028:2ea54e6117c3
remove HttpParser.reset()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 03 Nov 2016 00:23:04 -0600 |
parents | cf0367978d8b |
children | 4ada7a8c128a |
comparison
equal
deleted
inserted
replaced
1027:6d17a257b03f | 1028:2ea54e6117c3 |
---|---|
91 | 91 |
92 private final Connector _connector; | 92 private final Connector _connector; |
93 private final Server _server; | 93 private final Server _server; |
94 protected final HttpURI _uri = new HttpURI(); | 94 protected final HttpURI _uri = new HttpURI(); |
95 | 95 |
96 protected final HttpParser _parser; | 96 protected volatile HttpParser _parser; |
97 protected final HttpFields _requestFields = new HttpFields(); | 97 protected final HttpFields _requestFields = new HttpFields(); |
98 public volatile Request _request; | 98 public volatile Request _request; |
99 private volatile ServletInputStream _in; | 99 private volatile ServletInputStream _in; |
100 | 100 |
101 protected final HttpGenerator _generator; | 101 protected final HttpGenerator _generator; |
117 | 117 |
118 protected AbstractHttpConnection(Connector connector, EndPoint endpoint) | 118 protected AbstractHttpConnection(Connector connector, EndPoint endpoint) |
119 { | 119 { |
120 super(endpoint); | 120 super(endpoint); |
121 _connector = connector; | 121 _connector = connector; |
122 _parser = new HttpParser(_connector.getRequestBuffers(), endpoint, new RequestHandler()); | |
123 _generator = new HttpGenerator(_connector.getResponseBuffers(), endpoint); | 122 _generator = new HttpGenerator(_connector.getResponseBuffers(), endpoint); |
124 _server = connector.server; | 123 _server = connector.server; |
125 init(); | 124 init(); |
126 } | 125 } |
127 | 126 |
127 void initParser() { | |
128 _parser = new HttpParser(_connector.getRequestBuffers(), _endp, new RequestHandler()); | |
129 } | |
130 | |
128 private void init() { | 131 private void init() { |
132 initParser(); | |
129 _request = new Request(this); | 133 _request = new Request(this); |
130 _response = new Response(this); | 134 _response = new Response(this); |
131 } | 135 } |
132 | 136 |
133 public final Connector getConnector() | 137 public final Connector getConnector() |
223 return _printWriter; | 227 return _printWriter; |
224 } | 228 } |
225 | 229 |
226 protected void reset() | 230 protected void reset() |
227 { | 231 { |
228 _parser.reset(); | |
229 _requestFields.clear(); | 232 _requestFields.clear(); |
230 _generator.reset(); | 233 _generator.reset(); |
231 _generator.returnBuffers();// TODO maybe only on unhandle | 234 _generator.returnBuffers();// TODO maybe only on unhandle |
232 _responseFields.clear(); | 235 _responseFields.clear(); |
233 _uri.clear(); | 236 _uri.clear(); |