400040 - NullPointerException in HttpGenerator.prepareBuffers

+ Adding safety check on _header use
This commit is contained in:
Joakim Erdfelt 2013-02-05 18:07:23 -07:00
parent 65c2112964
commit 14e24c97aa
1 changed files with 2 additions and 2 deletions

View File

@ -1017,7 +1017,7 @@ public class HttpGenerator extends AbstractGenerator
{
if (_needCRLF)
{
if (_buffer == null && _header.space() >= 2)
if (_buffer == null && _header != null && _header.space() >= 2)
{
_header.put(HttpTokens.CRLF);
_needCRLF = false;
@ -1031,7 +1031,7 @@ public class HttpGenerator extends AbstractGenerator
if (!_needCRLF && _needEOC)
{
if (_buffer == null && _header.space() >= LAST_CHUNK.length)
if (_buffer == null && _header != null && _header.space() >= LAST_CHUNK.length)
{
if (!_head)
{