diff src/org/eclipse/jetty/server/AbstractHttpConnection.java @ 982:dbecd7faa1f5

remove Generator
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 16 Oct 2016 21:40:27 -0600
parents f46de416e219
children 23ec25435b8c
line wrap: on
line diff
--- a/src/org/eclipse/jetty/server/AbstractHttpConnection.java	Sun Oct 16 21:10:25 2016 -0600
+++ b/src/org/eclipse/jetty/server/AbstractHttpConnection.java	Sun Oct 16 21:40:27 2016 -0600
@@ -30,7 +30,6 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.eclipse.jetty.http.EncodedHttpURI;
-import org.eclipse.jetty.http.Generator;
 import org.eclipse.jetty.http.HttpBuffers;
 import org.eclipse.jetty.http.HttpException;
 import org.eclipse.jetty.http.HttpFields;
@@ -88,7 +87,7 @@
  * </p>
  *
  */
-public abstract class AbstractHttpConnection  extends AbstractConnection
+public abstract class AbstractHttpConnection extends AbstractConnection
 {
 	private static final Logger LOG = LoggerFactory.getLogger(AbstractHttpConnection.class);
 
@@ -384,7 +383,7 @@
 				_response.reset();
 				_generator.reset();
 				_generator.setResponse(HttpStatus.INTERNAL_SERVER_ERROR_500,null);
-				_generator.completeHeader(_responseFields,Generator.LAST);
+				_generator.completeHeader(_responseFields,HttpGenerator.LAST);
 				_generator.complete();
 				throw new HttpException(HttpStatus.INTERNAL_SERVER_ERROR_500);
 			}
@@ -401,7 +400,7 @@
 			_generator.setResponse(_response.getStatus(), _response.getReason());
 			try
 			{
-				_generator.completeHeader(_responseFields, Generator.LAST);
+				_generator.completeHeader(_responseFields, HttpGenerator.LAST);
 			}
 			catch(RuntimeException e)
 			{
@@ -411,7 +410,7 @@
 				_response.reset();
 				_generator.reset();
 				_generator.setResponse(HttpStatus.INTERNAL_SERVER_ERROR_500,null);
-				_generator.completeHeader(_responseFields,Generator.LAST);
+				_generator.completeHeader(_responseFields,HttpGenerator.LAST);
 				_generator.complete();
 				throw new HttpException(HttpStatus.INTERNAL_SERVER_ERROR_500);
 			}
@@ -424,7 +423,7 @@
 	{
 		try
 		{
-			commitResponse(Generator.MORE);
+			commitResponse(HttpGenerator.MORE);
 			_generator.flushBuffer();
 		}
 		catch(IOException e)
@@ -734,7 +733,7 @@
 				return;
 
 			if (!super._generator.isCommitted())
-				commitResponse(Generator.LAST);
+				commitResponse(HttpGenerator.LAST);
 			else
 				flushResponse();
 
@@ -750,7 +749,7 @@
 		public void flush() throws IOException
 		{
 			if (!super._generator.isCommitted())
-				commitResponse(Generator.MORE);
+				commitResponse(HttpGenerator.MORE);
 			super.flush();
 		}
 
@@ -792,8 +791,8 @@
 			// Process content.
 			if (content instanceof Buffer)
 			{
-				super._generator.addContent((Buffer) content, Generator.LAST);
-				commitResponse(Generator.LAST);
+				super._generator.addContent((Buffer) content, HttpGenerator.LAST);
+				commitResponse(HttpGenerator.LAST);
 			}
 			else if (content instanceof InputStream)
 			{