release header buffer early

This commit is contained in:
Greg Wilkins 2011-07-12 20:54:00 +10:00
parent c61e490d8e
commit 287d98d322
1 changed files with 2 additions and 2 deletions

View File

@ -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;