Table of Contents

Class Header

Namespace
Fluxzy.Core
Assembly
Fluxzy.Core.dll
public abstract class Header
Inheritance
Header
Derived
Inherited Members

Constructors

Header(IEnumerable<HeaderField>)

protected Header(IEnumerable<HeaderField> headerFields)

Parameters

headerFields IEnumerable<HeaderField>

Header(ReadOnlyMemory<char>, bool)

protected Header(ReadOnlyMemory<char> rawHeader, bool isSecure)

Parameters

rawHeader ReadOnlyMemory<char>
isSecure bool

Fields

CloseFlatHeader

protected static readonly byte[] CloseFlatHeader

Field Value

byte[]

KeepAliveFlatHeader

protected static readonly byte[] KeepAliveFlatHeader

Field Value

byte[]

Properties

ChunkedBody

If transfer-encoding chunked is defined

public bool ChunkedBody { get; }

Property Value

bool

ContentLength

Content length of body. -1 if undefined

public long ContentLength { get; set; }

Property Value

long

HeaderFields

Returns all headers, including non-forwardable

public IReadOnlyCollection<HeaderField> HeaderFields { get; }

Property Value

IReadOnlyCollection<HeaderField>

Headers

Returns all headers, excluding non-forwardable

public IEnumerable<HeaderField> Headers { get; }

Property Value

IEnumerable<HeaderField>

this[ReadOnlyMemory<char>]

public IEnumerable<HeaderField> this[ReadOnlyMemory<char> key] { get; }

Parameters

key ReadOnlyMemory<char>

Property Value

IEnumerable<HeaderField>

Methods

AltAddHeader(string, string)

public void AltAddHeader(string name, string value)

Parameters

name string
value string

AltDeleteHeader(string)

public void AltDeleteHeader(string name)

Parameters

name string

AltReplaceHeaders(string, string, bool, string?)

public void AltReplaceHeaders(string name, string value, bool addIfAbsent, string? appendSeparator = null)

Parameters

name string
value string
addIfAbsent bool
appendSeparator string

GetHeaderLineLength()

protected abstract int GetHeaderLineLength()

Returns

int

GetHttp11Header()

public ReadOnlyMemory<char> GetHttp11Header()

Returns

ReadOnlyMemory<char>

GetHttp11LengthOnly(bool, bool)

public int GetHttp11LengthOnly(bool skipNonForwardableHeader, bool shouldClose)

Parameters

skipNonForwardableHeader bool
shouldClose bool

Returns

int

RemoveHeader(string)

public void RemoveHeader(string headerName)

Parameters

headerName string

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

WriteHeaderLine(Span<byte>)

protected abstract int WriteHeaderLine(Span<byte> buffer)

Parameters

buffer Span<byte>

Returns

int

WriteHttp11(RsBuffer, bool, bool, bool)

public int WriteHttp11(RsBuffer buffer, bool skipNonForwardableHeader, bool writeExtraHeaderField = false, bool requestClose = true)

Parameters

buffer RsBuffer
skipNonForwardableHeader bool
writeExtraHeaderField bool
requestClose bool

Returns

int

WriteHttp11(in Span<byte>, bool, bool, bool)

public int WriteHttp11(in Span<byte> data, bool skipNonForwardableHeader, bool writeExtraHeaderField = false, bool writeKeepAlive = false)

Parameters

data Span<byte>
skipNonForwardableHeader bool
writeExtraHeaderField bool
writeKeepAlive bool

Returns

int

WriteHttp2(in Span<byte>, bool, bool)

public int WriteHttp2(in Span<byte> data, bool skipNonForwardableHeader, bool writeExtraHeaderField = false)

Parameters

data Span<byte>
skipNonForwardableHeader bool
writeExtraHeaderField bool

Returns

int