diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractHttpConnection.java b/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractHttpConnection.java index 930ccef98a3..a30c70f78cc 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractHttpConnection.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractHttpConnection.java @@ -149,7 +149,7 @@ public abstract class AbstractHttpConnection extends AbstractConnection _responseFields = new HttpFields(server.getMaxCookieVersion()); _request = new Request(this); _response = new Response(this); - _generator = new HttpGenerator(ab.getResponseBuffers(), _endp); + _generator = newHttpGenerator(ab.getResponseBuffers(), endpoint); _generator.setSendServerVersion(server.getSendServerVersion()); _server = server; } @@ -177,6 +177,11 @@ public abstract class AbstractHttpConnection extends AbstractConnection return new HttpParser(requestBuffers, endpoint, requestHandler); } + protected HttpGenerator newHttpGenerator(Buffers responseBuffers, EndPoint endPoint) + { + return new HttpGenerator(responseBuffers, endPoint); + } + /* ------------------------------------------------------------ */ /** * @return the parser used by this connection