435338 - Incorrect handling of asynchronous content.

Return values from parser and parser callbacks must not be ignored.
This commit is contained in:
Simone Bordet 2014-05-20 22:41:39 +02:00
parent f225af318b
commit 7745e8b6c1
1 changed files with 4 additions and 16 deletions

View File

@ -98,7 +98,7 @@ public class ResponseContentParser extends StreamContentParser
{
case HEADERS:
{
if (httpParser.parseHeaders(buffer))
if (httpParser.parseNext(buffer))
state = State.CONTENT_MODE;
remaining = buffer.remaining();
break;
@ -124,7 +124,8 @@ public class ResponseContentParser extends StreamContentParser
}
case HTTP_CONTENT:
{
httpParser.parseContent(buffer);
if (httpParser.parseNext(buffer))
return true;
remaining = buffer.remaining();
break;
}
@ -250,8 +251,7 @@ public class ResponseContentParser extends StreamContentParser
@Override
public boolean content(ByteBuffer buffer)
{
notifyContent(buffer);
return false;
return notifyContent(buffer);
}
private boolean notifyContent(ByteBuffer buffer)
@ -305,18 +305,6 @@ public class ResponseContentParser extends StreamContentParser
setState(State.HEADER);
}
@Override
protected boolean parseHeaders(ByteBuffer buffer)
{
return super.parseHeaders(buffer);
}
@Override
protected boolean parseContent(ByteBuffer buffer)
{
return super.parseContent(buffer);
}
@Override
protected void setResponseStatus(int status)
{