diff --git a/src/Shared/test/Shared.Tests/runtime/Http2/HPackDecoderTest.cs b/src/Shared/test/Shared.Tests/runtime/Http2/HPackDecoderTest.cs index ff141b846b39..28e7a9710736 100644 --- a/src/Shared/test/Shared.Tests/runtime/Http2/HPackDecoderTest.cs +++ b/src/Shared/test/Shared.Tests/runtime/Http2/HPackDecoderTest.cs @@ -87,10 +87,6 @@ public class HPackDecoderTests .Concat(_headerValueHuffmanBytes) .ToArray(); - private static readonly byte[] _literalEmptyString = new byte[] { 0x00 }; - - private static readonly byte[] _literalEmptyStringHuffman = new byte[] { 0x80 }; - // & * // 11111000 11111111 private static readonly byte[] _huffmanLongPadding = new byte[] { 0x82, 0xf8, 0xff }; @@ -247,43 +243,6 @@ public void DecodesLiteralHeaderFieldWithoutIndexing_NewName() TestDecodeWithoutIndexing(encoded, _headerNameString, _headerValueString); } - [Fact] - public void DecodesLiteralHeaderFieldWithoutIndexing_NewName_EmptyName() - { - byte[] encoded = _literalHeaderFieldWithoutIndexingNewName - .Concat(_literalEmptyString) - .Concat(_headerValue) - .ToArray(); - - HPackDecodingException exception = Assert.Throws(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler)); - Assert.Equal(SR.Format(SR.net_http_invalid_header_name, string.Empty), exception.Message); - Assert.Empty(_handler.DecodedHeaders); - } - - [Fact] - public void DecodesLiteralHeaderFieldWithoutIndexing_NewName_EmptyValue() - { - byte[] encoded = _literalHeaderFieldWithoutIndexingNewName - .Concat(_headerName) - .Concat(_literalEmptyString) - .ToArray(); - - TestDecodeWithoutIndexing(encoded, _headerNameString, string.Empty); - } - - [Fact] - public void DecodesLiteralHeaderFieldWithoutIndexing_NewName_EmptyNameAndValue() - { - byte[] encoded = _literalHeaderFieldWithoutIndexingNewName - .Concat(_literalEmptyString) - .Concat(_literalEmptyString) - .ToArray(); - - HPackDecodingException exception = Assert.Throws(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler)); - Assert.Equal(SR.Format(SR.net_http_invalid_header_name, string.Empty), exception.Message); - Assert.Empty(_handler.DecodedHeaders); - } - [Fact] public void DecodesLiteralHeaderFieldWithoutIndexing_NewName_HuffmanEncodedName() { @@ -295,19 +254,6 @@ public void DecodesLiteralHeaderFieldWithoutIndexing_NewName_HuffmanEncodedName( TestDecodeWithoutIndexing(encoded, _headerNameString, _headerValueString); } - [Fact] - public void DecodesLiteralHeaderFieldWithoutIndexing_NewName_HuffmanEncodedName_Empty() - { - byte[] encoded = _literalHeaderFieldWithoutIndexingNewName - .Concat(_literalEmptyStringHuffman) - .Concat(_headerValue) - .ToArray(); - - HPackDecodingException exception = Assert.Throws(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler)); - Assert.Equal(SR.Format(SR.net_http_invalid_header_name, string.Empty), exception.Message); - Assert.Empty(_handler.DecodedHeaders); - } - [Fact] public void DecodesLiteralHeaderFieldWithoutIndexing_NewName_HuffmanEncodedValue() { @@ -319,17 +265,6 @@ public void DecodesLiteralHeaderFieldWithoutIndexing_NewName_HuffmanEncodedValue TestDecodeWithoutIndexing(encoded, _headerNameString, _headerValueString); } - [Fact] - public void DecodesLiteralHeaderFieldWithoutIndexing_NewName_HuffmanEncodedValue_Empty() - { - byte[] encoded = _literalHeaderFieldWithoutIndexingNewName - .Concat(_headerName) - .Concat(_literalEmptyStringHuffman) - .ToArray(); - - TestDecodeWithoutIndexing(encoded, _headerNameString, string.Empty); - } - [Fact] public void DecodesLiteralHeaderFieldWithoutIndexing_NewName_HuffmanEncodedNameAndValue() { @@ -341,19 +276,6 @@ public void DecodesLiteralHeaderFieldWithoutIndexing_NewName_HuffmanEncodedNameA TestDecodeWithoutIndexing(encoded, _headerNameString, _headerValueString); } - [Fact] - public void DecodesLiteralHeaderFieldWithoutIndexing_NewName_HuffmanEncodedNameAndValue_Empty() - { - byte[] encoded = _literalHeaderFieldWithoutIndexingNewName - .Concat(_literalEmptyStringHuffman) - .Concat(_literalEmptyStringHuffman) - .ToArray(); - - HPackDecodingException exception = Assert.Throws(() => _decoder.Decode(encoded, endHeaders: true, handler: _handler)); - Assert.Equal(SR.Format(SR.net_http_invalid_header_name, string.Empty), exception.Message); - Assert.Empty(_handler.DecodedHeaders); - } - [Fact] public void DecodesLiteralHeaderFieldWithoutIndexing_IndexedName() {