SPDY: fix regression in SpdyFrameDecoder.decodeHeaderBlock()

This commit is contained in:
Jeff Pinner 2013-01-14 10:44:12 -08:00
parent 1354b4a1ac
commit f75b6b142c

View File

@ -578,7 +578,7 @@ public class SpdyFrameDecoder extends ByteToMessageDecoder {
} }
} }
while (numHeaders -- > 0) { while (numHeaders > 0) {
int headerSize = this.headerSize; int headerSize = this.headerSize;
decompressed.markReaderIndex(); decompressed.markReaderIndex();
@ -638,6 +638,7 @@ public class SpdyFrameDecoder extends ByteToMessageDecoder {
return; return;
} else { } else {
spdyHeaderBlock.addHeader(name, ""); spdyHeaderBlock.addHeader(name, "");
numHeaders --;
this.headerSize = headerSize; this.headerSize = headerSize;
continue; continue;
} }
@ -683,6 +684,7 @@ public class SpdyFrameDecoder extends ByteToMessageDecoder {
index ++; index ++;
offset = index; offset = index;
} }
numHeaders --;
this.headerSize = headerSize; this.headerSize = headerSize;
} }
decompressed = null; decompressed = null;