From 287d98d322205e4e800517427f62f3892071667b Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 12 Jul 2011 20:54:00 +1000 Subject: [PATCH] release header buffer early --- .../src/main/java/org/eclipse/jetty/http/HttpParser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java index 4d3e34a735f..4922b82c90b 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java @@ -1022,7 +1022,7 @@ public class HttpParser implements Parser /* ------------------------------------------------------------------------------- */ public void returnBuffers() { - if (_body!=null && !_body.hasContent() && _body.markIndex()==-1) + if (_body!=null && !_body.hasContent() && _body.markIndex()==-1 && _buffers!=null) { if (_buffer==_body) _buffer=_header; @@ -1031,7 +1031,7 @@ public class HttpParser implements Parser _body=null; } - if (_header!=null && !_header.hasContent() && _header.markIndex()==-1) + if (_header!=null && !_header.hasContent() && _header.markIndex()==-1 && _buffers!=null) { if (_buffer==_header) _buffer=null;