diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpGenerator.java b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpGenerator.java index c2c44377839..4f4dfabac5e 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpGenerator.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpGenerator.java @@ -986,7 +986,10 @@ public class HttpGenerator extends AbstractGenerator } else { - // No space so lets use the header buffer. + // No space so lets use a header buffer. + if (_header == null) + _header = _buffers.getHeader(); + if (_needCRLF) { if (_header.length() > 0) throw new IllegalStateException("EOC");