diff 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
line wrap: on
line diff
--- a/src/org/eclipse/jetty/server/AbstractHttpConnection.java	Wed Nov 02 23:58:37 2016 -0600
+++ b/src/org/eclipse/jetty/server/AbstractHttpConnection.java	Thu Nov 03 00:23:04 2016 -0600
@@ -93,7 +93,7 @@
 	private final Server _server;
 	protected final HttpURI _uri = new HttpURI();
 
-	protected final HttpParser _parser;
+	protected volatile HttpParser _parser;
 	protected final HttpFields _requestFields = new HttpFields();
 	public volatile Request _request;
 	private volatile ServletInputStream _in;
@@ -119,13 +119,17 @@
 	{
 		super(endpoint);
 		_connector = connector;
-		_parser = new HttpParser(_connector.getRequestBuffers(), endpoint, new RequestHandler());
 		_generator = new HttpGenerator(_connector.getResponseBuffers(), endpoint);
 		_server = connector.server;
 		init();
 	}
 
+	void initParser() {
+		_parser = new HttpParser(_connector.getRequestBuffers(), _endp, new RequestHandler());
+	}
+
 	private void init() {
+		initParser();
 		_request = new Request(this);
 		_response = new Response(this);
 	}
@@ -225,7 +229,6 @@
 
 	protected void reset()
 	{
-		_parser.reset();
 		_requestFields.clear();
 		_generator.reset();
 		_generator.returnBuffers();// TODO maybe only on unhandle