HttpParserStateFlagsValue
System.Net.Http.Headers
Represents the possible states of the HTTP parser for tracking HTTP parsing operations.
Members
None
None = 0
Indicates that there are no special parsing flags set. This is the default state.
ConnectionOpen
ConnectionOpen = 1
Indicates that the underlying connection is currently open and can be reused.
KeepAlive
KeepAlive = 2
Indicates that the connection should be kept alive after the current request/response.
Close
Close = 4
Indicates that the connection should be closed after the current request/response.
Upgrade
Upgrade = 8
Indicates that the connection is being upgraded to a different protocol (e.g., WebSockets).
TransferEncodingChunked
TransferEncodingChunked = 16
Indicates that the transfer encoding is chunked, meaning the data is sent in chunks.
TransferEncodingGZip
TransferEncodingGZip = 32
Indicates that the transfer encoding is GZip, meaning the data is compressed using GZip.
TransferEncodingDeflate
TransferEncodingDeflate = 64
Indicates that the transfer encoding is Deflate, meaning the data is compressed using Deflate.
TransferEncodingIdentity
TransferEncodingIdentity = 128
Indicates that the transfer encoding is identity, meaning the data is not encoded.
TransferEncodingUnknown
TransferEncodingUnknown = 256
Indicates that the transfer encoding is unknown or not supported.
Remarks
The HttpParserStateFlagsValue enumeration is used internally by the .NET HTTP client stack to manage the state of an HTTP connection and the parsing of incoming data. These flags help in determining how to handle the connection, whether to keep it alive, if the data is compressed, and other relevant parsing details.
See Also
© 2023 Microsoft Corporation. All rights reserved.