Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ OnString()

void System.Net.Http.HPack.HPackDecoder.OnString ( State nextState)
inlineprivate

Definition at line 430 of file HPackDecoder.cs.

431 {
432 try
433 {
434 if (_state == State.HeaderName)
435 {
438 }
439 else
440 {
442 }
443 }
444 catch (HuffmanDecodingException innerException)
445 {
446 throw new HPackDecodingException(System.SR.net_http_hpack_huffman_decode_failed, innerException);
447 }
448 _state = nextState;
449 int Decode(ref byte[] dst)
450 {
451 if (_huffman)
452 {
453 return Huffman.Decode(new ReadOnlySpan<byte>(_stringOctets, 0, _stringLength), ref dst);
454 }
455 EnsureStringCapacity(ref dst);
456 Buffer.BlockCopy(_stringOctets, 0, dst, 0, _stringLength);
457 return _stringLength;
458 }
459 }
void Decode(ReadOnlySpan< byte > data, bool endHeaders, IHttpHeadersHandler handler)
void EnsureStringCapacity(ref byte[] dst)
static string net_http_hpack_huffman_decode_failed
Definition SR.cs:160
Definition SR.cs:7

References System.Net.Http.HPack.HPackDecoder._headerName, System.Net.Http.HPack.HPackDecoder._headerNameLength, System.Net.Http.HPack.HPackDecoder._headerNameOctets, System.Net.Http.HPack.HPackDecoder._headerValueLength, System.Net.Http.HPack.HPackDecoder._headerValueOctets, System.Net.Http.HPack.HPackDecoder._huffman, System.Net.Http.HPack.HPackDecoder._state, System.Net.Http.HPack.HPackDecoder._stringLength, System.Net.Http.HPack.HPackDecoder._stringOctets, System.Buffer.BlockCopy(), System.Net.Http.HPack.HPackDecoder.Decode(), System.Net.Http.HPack.Huffman.Decode(), System.Net.Http.HPack.HPackDecoder.EnsureStringCapacity(), and System.SR.net_http_hpack_huffman_decode_failed.

Referenced by System.Net.Http.HPack.HPackDecoder.ParseHeaderName(), System.Net.Http.HPack.HPackDecoder.ParseHeaderValue(), and System.Net.Http.HPack.HPackDecoder.ParseHeaderValueLength().