Issue #4890 - JettyClient behavior when SETTINGS_HEADER_TABLE_SIZE is set to 0 in SETTINGS Frame.

Fixed NPE in debug logs.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2020-07-06 17:29:07 +02:00
parent d785b590b1
commit 43353d0ca9
1 changed files with 3 additions and 1 deletions

View File

@ -401,7 +401,9 @@ public class HpackEncoder
encodeName(buffer, (byte)0x00, 4, header.asString(), name);
encodeValue(buffer, true, field.getValue());
if (_debug)
encoding = "LitIdxNS" + (1 + NBitInteger.octectsNeeded(4, _context.index(name))) + "HuffV!Idx";
encoding = "Lit" +
((name == null) ? "HuffN" : "IdxNS" + (1 + NBitInteger.octectsNeeded(4, _context.index(name)))) +
"HuffV!Idx";
}
else
{