Fixed handling of zero length body, that must be HPACK decoded.

This commit is contained in:
Simone Bordet 2014-06-13 22:57:40 +02:00
parent b3aa67e0a9
commit a58a5f8268
1 changed files with 10 additions and 0 deletions

View File

@ -24,6 +24,7 @@ import org.eclipse.jetty.http2.frames.Flag;
import org.eclipse.jetty.http2.frames.HeadersFrame;
import org.eclipse.jetty.http2.frames.PriorityFrame;
import org.eclipse.jetty.http2.hpack.MetaData;
import org.eclipse.jetty.util.BufferUtil;
public class HeadersBodyParser extends BodyParser
{
@ -53,6 +54,15 @@ public class HeadersBodyParser extends BodyParser
weight = 0;
}
@Override
protected boolean emptyBody()
{
MetaData metaData = headerBlockParser.parse(BufferUtil.EMPTY_BUFFER, 0);
boolean result = onHeaders(0, 0, false, metaData);
reset();
return result;
}
@Override
public Result parse(ByteBuffer buffer)
{