ReadOnlySpan goodness (#8392)
This commit is contained in:
parent
77948feeba
commit
a95c4b6fd0
|
|
@ -14,8 +14,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
|
||||||
{
|
{
|
||||||
public sealed partial class HttpResponseHeaders : HttpHeaders
|
public sealed partial class HttpResponseHeaders : HttpHeaders
|
||||||
{
|
{
|
||||||
private static readonly byte[] _CrLf = new[] { (byte)'\r', (byte)'\n' };
|
private static ReadOnlySpan<byte> _CrLf => new[] { (byte)'\r', (byte)'\n' };
|
||||||
private static readonly byte[] _colonSpace = new[] { (byte)':', (byte)' ' };
|
private static ReadOnlySpan<byte> _colonSpace => new[] { (byte)':', (byte)' ' };
|
||||||
|
|
||||||
public Enumerator GetEnumerator()
|
public Enumerator GetEnumerator()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2
|
||||||
public class Http2FrameWriter
|
public class Http2FrameWriter
|
||||||
{
|
{
|
||||||
// Literal Header Field without Indexing - Indexed Name (Index 8 - :status)
|
// Literal Header Field without Indexing - Indexed Name (Index 8 - :status)
|
||||||
private static readonly byte[] _continueBytes = new byte[] { 0x08, 0x03, (byte)'1', (byte)'0', (byte)'0' };
|
private static ReadOnlySpan<byte> _continueBytes => new byte[] { 0x08, 0x03, (byte)'1', (byte)'0', (byte)'0' };
|
||||||
|
|
||||||
private readonly object _writeLock = new object();
|
private readonly object _writeLock = new object();
|
||||||
private readonly Http2Frame _outgoingFrame;
|
private readonly Http2Frame _outgoingFrame;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue