diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/Http/Connection.cs b/src/Microsoft.AspNetCore.Server.Kestrel/Http/Connection.cs index 15f57a807..3d335971e 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/Http/Connection.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/Http/Connection.cs @@ -61,7 +61,7 @@ public void Start() } // Don't initialize _frame until SocketInput and SocketOutput are set to their final values. - if (ConnectionFilter == null) + if (ServerInformation.ConnectionFilter == null) { SocketInput = _rawSocketInput; SocketOutput = _rawSocketOutput; @@ -81,7 +81,7 @@ public void Start() try { - ConnectionFilter.OnConnectionAsync(_filterContext).ContinueWith((task, state) => + ServerInformation.ConnectionFilter.OnConnectionAsync(_filterContext).ContinueWith((task, state) => { var connection = (Connection)state; diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/Http/Frame.cs b/src/Microsoft.AspNetCore.Server.Kestrel/Http/Frame.cs index 81aa57bb5..e00f0579d 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/Http/Frame.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/Http/Frame.cs @@ -34,8 +34,6 @@ public abstract partial class Frame : FrameContext, IFrameControl private static readonly byte[] _bytesHttpVersion1_1 = Encoding.ASCII.GetBytes("HTTP/1.1 "); private static readonly byte[] _bytesContentLengthZero = Encoding.ASCII.GetBytes("\r\nContent-Length: 0"); private static readonly byte[] _bytesSpace = Encoding.ASCII.GetBytes(" "); - private static readonly byte[] _bytesServer = Encoding.ASCII.GetBytes("\r\nServer: Kestrel"); - private static readonly byte[] _bytesDate = Encoding.ASCII.GetBytes("Date: "); private static readonly byte[] _bytesEndHeaders = Encoding.ASCII.GetBytes("\r\n\r\n"); private static Vector _vectorCRs = new Vector((byte)'\r'); @@ -46,8 +44,10 @@ public abstract partial class Frame : FrameContext, IFrameControl private readonly object _onStartingSync = new Object(); private readonly object _onCompletedSync = new Object(); - protected readonly FrameRequestHeaders _requestHeaders = new FrameRequestHeaders(); - private readonly FrameResponseHeaders _responseHeaders = new FrameResponseHeaders(); + + protected bool _poolingPermitted = true; + private Headers _frameHeaders; + private Streams _frameStreams; protected List, object>> _onStarting; @@ -60,10 +60,6 @@ public abstract partial class Frame : FrameContext, IFrameControl protected CancellationTokenSource _abortedCts; protected CancellationToken? _manuallySetRequestAbortToken; - internal FrameRequestStream _requestBody; - internal FrameResponseStream _responseBody; - internal FrameDuplexStream _duplexStream; - protected bool _responseStarted; protected bool _keepAlive; private bool _autoChunk; @@ -92,12 +88,6 @@ public Frame(ConnectionContext context, _localEndPoint = localEndPoint; _prepareRequest = prepareRequest; _pathBase = context.ServerAddress.PathBase; - if (ReuseStreams) - { - _requestBody = new FrameRequestStream(); - _responseBody = new FrameResponseStream(this); - _duplexStream = new FrameDuplexStream(_requestBody, _responseBody); - } FrameControl = this; Reset(); @@ -197,8 +187,48 @@ public bool HasResponseStarted get { return _responseStarted; } } + protected FrameRequestHeaders FrameRequestHeaders => _frameHeaders.RequestHeaders; + + public Frame InitializeHeaders() + { + _frameHeaders = HttpComponentFactory.CreateHeaders(DateHeaderValueManager); + RequestHeaders = _frameHeaders.RequestHeaders; + ResponseHeaders = _frameHeaders.ResponseHeaders; + return this; + } + + + public void InitializeStreams(MessageBody messageBody) + { + _frameStreams = HttpComponentFactory.CreateStreams(this); + + RequestBody = _frameStreams.RequestBody.StartAcceptingReads(messageBody); + ResponseBody = _frameStreams.ResponseBody.StartAcceptingWrites(); + DuplexStream = _frameStreams.DuplexStream; + } + + public void PauseStreams() + { + _frameStreams.RequestBody.PauseAcceptingReads(); + _frameStreams.ResponseBody.PauseAcceptingWrites(); + } + + public void ResumeStreams() + { + _frameStreams.RequestBody.ResumeAcceptingReads(); + _frameStreams.ResponseBody.ResumeAcceptingWrites(); + } + + public void StopStreams() + { + _frameStreams.RequestBody.StopAcceptingReads(); + _frameStreams.ResponseBody.StopAcceptingWrites(); + } + public void Reset() { + ResetComponents(poolingPermitted: true); + _onStarting = null; _onCompleted = null; @@ -207,8 +237,6 @@ public void Reset() _autoChunk = false; _applicationException = null; - _requestHeaders.Reset(); - ResetResponseHeaders(); ResetFeatureCollection(); Scheme = null; @@ -218,13 +246,8 @@ public void Reset() Path = null; QueryString = null; _httpVersion = HttpVersionType.Unknown; - RequestHeaders = _requestHeaders; - RequestBody = null; StatusCode = 200; ReasonPhrase = null; - ResponseHeaders = _responseHeaders; - ResponseBody = null; - DuplexStream = null; var httpConnectionFeature = this as IHttpConnectionFeature; httpConnectionFeature.RemoteIpAddress = _remoteEndPoint?.Address; @@ -239,15 +262,28 @@ public void Reset() _abortedCts = null; } - public void ResetResponseHeaders() + protected void ResetComponents(bool poolingPermitted) { - _responseHeaders.Reset(); - _responseHeaders.SetRawDate( - DateHeaderValueManager.GetDateHeaderValue(), - DateHeaderValueManager.GetDateHeaderValueBytes()); - _responseHeaders.SetRawServer( - "Kestrel", - _bytesServer); + if (_frameHeaders != null) + { + var frameHeaders = _frameHeaders; + _frameHeaders = null; + + RequestHeaders = null; + ResponseHeaders = null; + HttpComponentFactory.DisposeHeaders(frameHeaders, poolingPermitted); + } + + if (_frameStreams != null) + { + var frameStreams = _frameStreams; + _frameStreams = null; + + RequestBody = null; + ResponseBody = null; + DuplexStream = null; + HttpComponentFactory.DisposeStreams(frameStreams, poolingPermitted); + } } /// @@ -292,8 +328,8 @@ public void Abort() { _requestProcessingStopping = true; - _requestBody?.Abort(); - _responseBody?.Abort(); + _frameStreams?.RequestBody.Abort(); + _frameStreams?.ResponseBody.Abort(); try { @@ -560,8 +596,17 @@ protected Task ProduceEnd() StatusCode = 500; ReasonPhrase = null; - ResetResponseHeaders(); - _responseHeaders.SetRawContentLength("0", _bytesContentLengthZero); + var responseHeaders = _frameHeaders.ResponseHeaders; + responseHeaders.Reset(); + responseHeaders.SetRawDate( + DateHeaderValueManager.GetDateHeaderValue(), + DateHeaderValueManager.GetDateHeaderValueBytes()); + responseHeaders.SetRawServer( + "Kestrel", + Headers.BytesServer); + responseHeaders.SetRawContentLength("0", _bytesContentLengthZero); + + ResponseHeaders = responseHeaders; } } @@ -614,10 +659,13 @@ private void CreateResponseHeader( byte[] statusBytes, bool appCompleted) { + var responseHeaders = _frameHeaders.ResponseHeaders; + responseHeaders.SetReadOnly(); + var end = SocketOutput.ProducingStart(); if (_keepAlive) { - foreach (var connectionValue in _responseHeaders.HeaderConnection) + foreach (var connectionValue in responseHeaders.HeaderConnection) { if (connectionValue.IndexOf("close", StringComparison.OrdinalIgnoreCase) != -1) { @@ -626,7 +674,7 @@ private void CreateResponseHeader( } } - if (_keepAlive && !_responseHeaders.HasTransferEncoding && !_responseHeaders.HasContentLength) + if (_keepAlive && !responseHeaders.HasTransferEncoding && !responseHeaders.HasContentLength) { if (appCompleted) { @@ -636,7 +684,7 @@ private void CreateResponseHeader( { // Since the app has completed and we are only now generating // the headers we can safely set the Content-Length to 0. - _responseHeaders.SetRawContentLength("0", _bytesContentLengthZero); + responseHeaders.SetRawContentLength("0", _bytesContentLengthZero); } } else @@ -644,7 +692,7 @@ private void CreateResponseHeader( if (_httpVersion == HttpVersionType.Http1_1) { _autoChunk = true; - _responseHeaders.SetRawTransferEncoding("chunked", _bytesTransferEncodingChunked); + responseHeaders.SetRawTransferEncoding("chunked", _bytesTransferEncodingChunked); } else { @@ -653,18 +701,18 @@ private void CreateResponseHeader( } } - if (_keepAlive == false && _responseHeaders.HasConnection == false && _httpVersion == HttpVersionType.Http1_1) + if (_keepAlive == false && responseHeaders.HasConnection == false && _httpVersion == HttpVersionType.Http1_1) { - _responseHeaders.SetRawConnection("close", _bytesConnectionClose); + responseHeaders.SetRawConnection("close", _bytesConnectionClose); } - else if (_keepAlive && _responseHeaders.HasConnection == false && _httpVersion == HttpVersionType.Http1_0) + else if (_keepAlive && responseHeaders.HasConnection == false && _httpVersion == HttpVersionType.Http1_0) { - _responseHeaders.SetRawConnection("keep-alive", _bytesConnectionKeepAlive); + responseHeaders.SetRawConnection("keep-alive", _bytesConnectionKeepAlive); } end.CopyFrom(_httpVersion == HttpVersionType.Http1_1 ? _bytesHttpVersion1_1 : _bytesHttpVersion1_0); end.CopyFrom(statusBytes); - _responseHeaders.CopyTo(ref end); + responseHeaders.CopyTo(ref end); end.CopyFrom(_bytesEndHeaders, 0, _bytesEndHeaders.Length); SocketOutput.ProducingComplete(end); diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/Http/FrameHeaders.Generated.cs b/src/Microsoft.AspNetCore.Server.Kestrel/Http/FrameHeaders.Generated.cs index 8a36b78d5..e8a93d9b4 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/Http/FrameHeaders.Generated.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/Http/FrameHeaders.Generated.cs @@ -12,52 +12,7 @@ public partial class FrameRequestHeaders { private long _bits = 0; - - private StringValues _CacheControl; - private StringValues _Connection; - private StringValues _Date; - private StringValues _KeepAlive; - private StringValues _Pragma; - private StringValues _Trailer; - private StringValues _TransferEncoding; - private StringValues _Upgrade; - private StringValues _Via; - private StringValues _Warning; - private StringValues _Allow; - private StringValues _ContentLength; - private StringValues _ContentType; - private StringValues _ContentEncoding; - private StringValues _ContentLanguage; - private StringValues _ContentLocation; - private StringValues _ContentMD5; - private StringValues _ContentRange; - private StringValues _Expires; - private StringValues _LastModified; - private StringValues _Accept; - private StringValues _AcceptCharset; - private StringValues _AcceptEncoding; - private StringValues _AcceptLanguage; - private StringValues _Authorization; - private StringValues _Cookie; - private StringValues _Expect; - private StringValues _From; - private StringValues _Host; - private StringValues _IfMatch; - private StringValues _IfModifiedSince; - private StringValues _IfNoneMatch; - private StringValues _IfRange; - private StringValues _IfUnmodifiedSince; - private StringValues _MaxForwards; - private StringValues _ProxyAuthorization; - private StringValues _Referer; - private StringValues _Range; - private StringValues _TE; - private StringValues _Translate; - private StringValues _UserAgent; - private StringValues _Origin; - private StringValues _AccessControlRequestMethod; - private StringValues _AccessControlRequestHeaders; - + private HeaderReferences _headers; public StringValues HeaderCacheControl { @@ -65,14 +20,14 @@ public StringValues HeaderCacheControl { if (((_bits & 1L) != 0)) { - return _CacheControl; + return _headers._CacheControl; } return StringValues.Empty; } set { _bits |= 1L; - _CacheControl = value; + _headers._CacheControl = value; } } public StringValues HeaderConnection @@ -81,14 +36,14 @@ public StringValues HeaderConnection { if (((_bits & 2L) != 0)) { - return _Connection; + return _headers._Connection; } return StringValues.Empty; } set { _bits |= 2L; - _Connection = value; + _headers._Connection = value; } } public StringValues HeaderDate @@ -97,14 +52,14 @@ public StringValues HeaderDate { if (((_bits & 4L) != 0)) { - return _Date; + return _headers._Date; } return StringValues.Empty; } set { _bits |= 4L; - _Date = value; + _headers._Date = value; } } public StringValues HeaderKeepAlive @@ -113,14 +68,14 @@ public StringValues HeaderKeepAlive { if (((_bits & 8L) != 0)) { - return _KeepAlive; + return _headers._KeepAlive; } return StringValues.Empty; } set { _bits |= 8L; - _KeepAlive = value; + _headers._KeepAlive = value; } } public StringValues HeaderPragma @@ -129,14 +84,14 @@ public StringValues HeaderPragma { if (((_bits & 16L) != 0)) { - return _Pragma; + return _headers._Pragma; } return StringValues.Empty; } set { _bits |= 16L; - _Pragma = value; + _headers._Pragma = value; } } public StringValues HeaderTrailer @@ -145,14 +100,14 @@ public StringValues HeaderTrailer { if (((_bits & 32L) != 0)) { - return _Trailer; + return _headers._Trailer; } return StringValues.Empty; } set { _bits |= 32L; - _Trailer = value; + _headers._Trailer = value; } } public StringValues HeaderTransferEncoding @@ -161,14 +116,14 @@ public StringValues HeaderTransferEncoding { if (((_bits & 64L) != 0)) { - return _TransferEncoding; + return _headers._TransferEncoding; } return StringValues.Empty; } set { _bits |= 64L; - _TransferEncoding = value; + _headers._TransferEncoding = value; } } public StringValues HeaderUpgrade @@ -177,14 +132,14 @@ public StringValues HeaderUpgrade { if (((_bits & 128L) != 0)) { - return _Upgrade; + return _headers._Upgrade; } return StringValues.Empty; } set { _bits |= 128L; - _Upgrade = value; + _headers._Upgrade = value; } } public StringValues HeaderVia @@ -193,14 +148,14 @@ public StringValues HeaderVia { if (((_bits & 256L) != 0)) { - return _Via; + return _headers._Via; } return StringValues.Empty; } set { _bits |= 256L; - _Via = value; + _headers._Via = value; } } public StringValues HeaderWarning @@ -209,14 +164,14 @@ public StringValues HeaderWarning { if (((_bits & 512L) != 0)) { - return _Warning; + return _headers._Warning; } return StringValues.Empty; } set { _bits |= 512L; - _Warning = value; + _headers._Warning = value; } } public StringValues HeaderAllow @@ -225,14 +180,14 @@ public StringValues HeaderAllow { if (((_bits & 1024L) != 0)) { - return _Allow; + return _headers._Allow; } return StringValues.Empty; } set { _bits |= 1024L; - _Allow = value; + _headers._Allow = value; } } public StringValues HeaderContentLength @@ -241,14 +196,14 @@ public StringValues HeaderContentLength { if (((_bits & 2048L) != 0)) { - return _ContentLength; + return _headers._ContentLength; } return StringValues.Empty; } set { _bits |= 2048L; - _ContentLength = value; + _headers._ContentLength = value; } } public StringValues HeaderContentType @@ -257,14 +212,14 @@ public StringValues HeaderContentType { if (((_bits & 4096L) != 0)) { - return _ContentType; + return _headers._ContentType; } return StringValues.Empty; } set { _bits |= 4096L; - _ContentType = value; + _headers._ContentType = value; } } public StringValues HeaderContentEncoding @@ -273,14 +228,14 @@ public StringValues HeaderContentEncoding { if (((_bits & 8192L) != 0)) { - return _ContentEncoding; + return _headers._ContentEncoding; } return StringValues.Empty; } set { _bits |= 8192L; - _ContentEncoding = value; + _headers._ContentEncoding = value; } } public StringValues HeaderContentLanguage @@ -289,14 +244,14 @@ public StringValues HeaderContentLanguage { if (((_bits & 16384L) != 0)) { - return _ContentLanguage; + return _headers._ContentLanguage; } return StringValues.Empty; } set { _bits |= 16384L; - _ContentLanguage = value; + _headers._ContentLanguage = value; } } public StringValues HeaderContentLocation @@ -305,14 +260,14 @@ public StringValues HeaderContentLocation { if (((_bits & 32768L) != 0)) { - return _ContentLocation; + return _headers._ContentLocation; } return StringValues.Empty; } set { _bits |= 32768L; - _ContentLocation = value; + _headers._ContentLocation = value; } } public StringValues HeaderContentMD5 @@ -321,14 +276,14 @@ public StringValues HeaderContentMD5 { if (((_bits & 65536L) != 0)) { - return _ContentMD5; + return _headers._ContentMD5; } return StringValues.Empty; } set { _bits |= 65536L; - _ContentMD5 = value; + _headers._ContentMD5 = value; } } public StringValues HeaderContentRange @@ -337,14 +292,14 @@ public StringValues HeaderContentRange { if (((_bits & 131072L) != 0)) { - return _ContentRange; + return _headers._ContentRange; } return StringValues.Empty; } set { _bits |= 131072L; - _ContentRange = value; + _headers._ContentRange = value; } } public StringValues HeaderExpires @@ -353,14 +308,14 @@ public StringValues HeaderExpires { if (((_bits & 262144L) != 0)) { - return _Expires; + return _headers._Expires; } return StringValues.Empty; } set { _bits |= 262144L; - _Expires = value; + _headers._Expires = value; } } public StringValues HeaderLastModified @@ -369,14 +324,14 @@ public StringValues HeaderLastModified { if (((_bits & 524288L) != 0)) { - return _LastModified; + return _headers._LastModified; } return StringValues.Empty; } set { _bits |= 524288L; - _LastModified = value; + _headers._LastModified = value; } } public StringValues HeaderAccept @@ -385,14 +340,14 @@ public StringValues HeaderAccept { if (((_bits & 1048576L) != 0)) { - return _Accept; + return _headers._Accept; } return StringValues.Empty; } set { _bits |= 1048576L; - _Accept = value; + _headers._Accept = value; } } public StringValues HeaderAcceptCharset @@ -401,14 +356,14 @@ public StringValues HeaderAcceptCharset { if (((_bits & 2097152L) != 0)) { - return _AcceptCharset; + return _headers._AcceptCharset; } return StringValues.Empty; } set { _bits |= 2097152L; - _AcceptCharset = value; + _headers._AcceptCharset = value; } } public StringValues HeaderAcceptEncoding @@ -417,14 +372,14 @@ public StringValues HeaderAcceptEncoding { if (((_bits & 4194304L) != 0)) { - return _AcceptEncoding; + return _headers._AcceptEncoding; } return StringValues.Empty; } set { _bits |= 4194304L; - _AcceptEncoding = value; + _headers._AcceptEncoding = value; } } public StringValues HeaderAcceptLanguage @@ -433,14 +388,14 @@ public StringValues HeaderAcceptLanguage { if (((_bits & 8388608L) != 0)) { - return _AcceptLanguage; + return _headers._AcceptLanguage; } return StringValues.Empty; } set { _bits |= 8388608L; - _AcceptLanguage = value; + _headers._AcceptLanguage = value; } } public StringValues HeaderAuthorization @@ -449,14 +404,14 @@ public StringValues HeaderAuthorization { if (((_bits & 16777216L) != 0)) { - return _Authorization; + return _headers._Authorization; } return StringValues.Empty; } set { _bits |= 16777216L; - _Authorization = value; + _headers._Authorization = value; } } public StringValues HeaderCookie @@ -465,14 +420,14 @@ public StringValues HeaderCookie { if (((_bits & 33554432L) != 0)) { - return _Cookie; + return _headers._Cookie; } return StringValues.Empty; } set { _bits |= 33554432L; - _Cookie = value; + _headers._Cookie = value; } } public StringValues HeaderExpect @@ -481,14 +436,14 @@ public StringValues HeaderExpect { if (((_bits & 67108864L) != 0)) { - return _Expect; + return _headers._Expect; } return StringValues.Empty; } set { _bits |= 67108864L; - _Expect = value; + _headers._Expect = value; } } public StringValues HeaderFrom @@ -497,14 +452,14 @@ public StringValues HeaderFrom { if (((_bits & 134217728L) != 0)) { - return _From; + return _headers._From; } return StringValues.Empty; } set { _bits |= 134217728L; - _From = value; + _headers._From = value; } } public StringValues HeaderHost @@ -513,14 +468,14 @@ public StringValues HeaderHost { if (((_bits & 268435456L) != 0)) { - return _Host; + return _headers._Host; } return StringValues.Empty; } set { _bits |= 268435456L; - _Host = value; + _headers._Host = value; } } public StringValues HeaderIfMatch @@ -529,14 +484,14 @@ public StringValues HeaderIfMatch { if (((_bits & 536870912L) != 0)) { - return _IfMatch; + return _headers._IfMatch; } return StringValues.Empty; } set { _bits |= 536870912L; - _IfMatch = value; + _headers._IfMatch = value; } } public StringValues HeaderIfModifiedSince @@ -545,14 +500,14 @@ public StringValues HeaderIfModifiedSince { if (((_bits & 1073741824L) != 0)) { - return _IfModifiedSince; + return _headers._IfModifiedSince; } return StringValues.Empty; } set { _bits |= 1073741824L; - _IfModifiedSince = value; + _headers._IfModifiedSince = value; } } public StringValues HeaderIfNoneMatch @@ -561,14 +516,14 @@ public StringValues HeaderIfNoneMatch { if (((_bits & 2147483648L) != 0)) { - return _IfNoneMatch; + return _headers._IfNoneMatch; } return StringValues.Empty; } set { _bits |= 2147483648L; - _IfNoneMatch = value; + _headers._IfNoneMatch = value; } } public StringValues HeaderIfRange @@ -577,14 +532,14 @@ public StringValues HeaderIfRange { if (((_bits & 4294967296L) != 0)) { - return _IfRange; + return _headers._IfRange; } return StringValues.Empty; } set { _bits |= 4294967296L; - _IfRange = value; + _headers._IfRange = value; } } public StringValues HeaderIfUnmodifiedSince @@ -593,14 +548,14 @@ public StringValues HeaderIfUnmodifiedSince { if (((_bits & 8589934592L) != 0)) { - return _IfUnmodifiedSince; + return _headers._IfUnmodifiedSince; } return StringValues.Empty; } set { _bits |= 8589934592L; - _IfUnmodifiedSince = value; + _headers._IfUnmodifiedSince = value; } } public StringValues HeaderMaxForwards @@ -609,14 +564,14 @@ public StringValues HeaderMaxForwards { if (((_bits & 17179869184L) != 0)) { - return _MaxForwards; + return _headers._MaxForwards; } return StringValues.Empty; } set { _bits |= 17179869184L; - _MaxForwards = value; + _headers._MaxForwards = value; } } public StringValues HeaderProxyAuthorization @@ -625,14 +580,14 @@ public StringValues HeaderProxyAuthorization { if (((_bits & 34359738368L) != 0)) { - return _ProxyAuthorization; + return _headers._ProxyAuthorization; } return StringValues.Empty; } set { _bits |= 34359738368L; - _ProxyAuthorization = value; + _headers._ProxyAuthorization = value; } } public StringValues HeaderReferer @@ -641,14 +596,14 @@ public StringValues HeaderReferer { if (((_bits & 68719476736L) != 0)) { - return _Referer; + return _headers._Referer; } return StringValues.Empty; } set { _bits |= 68719476736L; - _Referer = value; + _headers._Referer = value; } } public StringValues HeaderRange @@ -657,14 +612,14 @@ public StringValues HeaderRange { if (((_bits & 137438953472L) != 0)) { - return _Range; + return _headers._Range; } return StringValues.Empty; } set { _bits |= 137438953472L; - _Range = value; + _headers._Range = value; } } public StringValues HeaderTE @@ -673,14 +628,14 @@ public StringValues HeaderTE { if (((_bits & 274877906944L) != 0)) { - return _TE; + return _headers._TE; } return StringValues.Empty; } set { _bits |= 274877906944L; - _TE = value; + _headers._TE = value; } } public StringValues HeaderTranslate @@ -689,14 +644,14 @@ public StringValues HeaderTranslate { if (((_bits & 549755813888L) != 0)) { - return _Translate; + return _headers._Translate; } return StringValues.Empty; } set { _bits |= 549755813888L; - _Translate = value; + _headers._Translate = value; } } public StringValues HeaderUserAgent @@ -705,14 +660,14 @@ public StringValues HeaderUserAgent { if (((_bits & 1099511627776L) != 0)) { - return _UserAgent; + return _headers._UserAgent; } return StringValues.Empty; } set { _bits |= 1099511627776L; - _UserAgent = value; + _headers._UserAgent = value; } } public StringValues HeaderOrigin @@ -721,14 +676,14 @@ public StringValues HeaderOrigin { if (((_bits & 2199023255552L) != 0)) { - return _Origin; + return _headers._Origin; } return StringValues.Empty; } set { _bits |= 2199023255552L; - _Origin = value; + _headers._Origin = value; } } public StringValues HeaderAccessControlRequestMethod @@ -737,14 +692,14 @@ public StringValues HeaderAccessControlRequestMethod { if (((_bits & 4398046511104L) != 0)) { - return _AccessControlRequestMethod; + return _headers._AccessControlRequestMethod; } return StringValues.Empty; } set { _bits |= 4398046511104L; - _AccessControlRequestMethod = value; + _headers._AccessControlRequestMethod = value; } } public StringValues HeaderAccessControlRequestHeaders @@ -753,14 +708,14 @@ public StringValues HeaderAccessControlRequestHeaders { if (((_bits & 8796093022208L) != 0)) { - return _AccessControlRequestHeaders; + return _headers._AccessControlRequestHeaders; } return StringValues.Empty; } set { _bits |= 8796093022208L; - _AccessControlRequestHeaders = value; + _headers._AccessControlRequestHeaders = value; } } @@ -778,11 +733,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 1L) != 0)) { - return _CacheControl; + return _headers._CacheControl; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -790,11 +745,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 131072L) != 0)) { - return _ContentRange; + return _headers._ContentRange; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -802,11 +757,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 524288L) != 0)) { - return _LastModified; + return _headers._LastModified; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -814,11 +769,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 16777216L) != 0)) { - return _Authorization; + return _headers._Authorization; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -826,11 +781,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 2147483648L) != 0)) { - return _IfNoneMatch; + return _headers._IfNoneMatch; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -842,11 +797,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 2L) != 0)) { - return _Connection; + return _headers._Connection; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -854,11 +809,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 8L) != 0)) { - return _KeepAlive; + return _headers._KeepAlive; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -866,11 +821,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 1099511627776L) != 0)) { - return _UserAgent; + return _headers._UserAgent; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -882,11 +837,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 4L) != 0)) { - return _Date; + return _headers._Date; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -894,11 +849,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 134217728L) != 0)) { - return _From; + return _headers._From; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -906,11 +861,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 268435456L) != 0)) { - return _Host; + return _headers._Host; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -922,11 +877,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 16L) != 0)) { - return _Pragma; + return _headers._Pragma; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -934,11 +889,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 1048576L) != 0)) { - return _Accept; + return _headers._Accept; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -946,11 +901,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 33554432L) != 0)) { - return _Cookie; + return _headers._Cookie; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -958,11 +913,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 67108864L) != 0)) { - return _Expect; + return _headers._Expect; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -970,11 +925,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 2199023255552L) != 0)) { - return _Origin; + return _headers._Origin; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -986,11 +941,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 32L) != 0)) { - return _Trailer; + return _headers._Trailer; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -998,11 +953,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 128L) != 0)) { - return _Upgrade; + return _headers._Upgrade; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -1010,11 +965,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 512L) != 0)) { - return _Warning; + return _headers._Warning; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -1022,11 +977,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 262144L) != 0)) { - return _Expires; + return _headers._Expires; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -1034,11 +989,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 68719476736L) != 0)) { - return _Referer; + return _headers._Referer; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -1050,11 +1005,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 64L) != 0)) { - return _TransferEncoding; + return _headers._TransferEncoding; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -1062,11 +1017,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 1073741824L) != 0)) { - return _IfModifiedSince; + return _headers._IfModifiedSince; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -1078,11 +1033,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 256L) != 0)) { - return _Via; + return _headers._Via; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -1094,11 +1049,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 1024L) != 0)) { - return _Allow; + return _headers._Allow; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -1106,11 +1061,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 137438953472L) != 0)) { - return _Range; + return _headers._Range; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -1122,11 +1077,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 2048L) != 0)) { - return _ContentLength; + return _headers._ContentLength; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -1134,11 +1089,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 2097152L) != 0)) { - return _AcceptCharset; + return _headers._AcceptCharset; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -1150,11 +1105,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 4096L) != 0)) { - return _ContentType; + return _headers._ContentType; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -1162,11 +1117,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 17179869184L) != 0)) { - return _MaxForwards; + return _headers._MaxForwards; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -1178,11 +1133,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 8192L) != 0)) { - return _ContentEncoding; + return _headers._ContentEncoding; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -1190,11 +1145,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 16384L) != 0)) { - return _ContentLanguage; + return _headers._ContentLanguage; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -1202,11 +1157,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 32768L) != 0)) { - return _ContentLocation; + return _headers._ContentLocation; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -1218,11 +1173,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 65536L) != 0)) { - return _ContentMD5; + return _headers._ContentMD5; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -1234,11 +1189,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 4194304L) != 0)) { - return _AcceptEncoding; + return _headers._AcceptEncoding; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -1246,11 +1201,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 8388608L) != 0)) { - return _AcceptLanguage; + return _headers._AcceptLanguage; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -1262,11 +1217,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 536870912L) != 0)) { - return _IfMatch; + return _headers._IfMatch; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -1274,11 +1229,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 4294967296L) != 0)) { - return _IfRange; + return _headers._IfRange; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -1290,11 +1245,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 8589934592L) != 0)) { - return _IfUnmodifiedSince; + return _headers._IfUnmodifiedSince; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -1302,11 +1257,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 34359738368L) != 0)) { - return _ProxyAuthorization; + return _headers._ProxyAuthorization; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -1318,11 +1273,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 274877906944L) != 0)) { - return _TE; + return _headers._TE; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -1334,11 +1289,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 549755813888L) != 0)) { - return _Translate; + return _headers._Translate; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -1350,11 +1305,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 4398046511104L) != 0)) { - return _AccessControlRequestMethod; + return _headers._AccessControlRequestMethod; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -1366,11 +1321,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 8796093022208L) != 0)) { - return _AccessControlRequestHeaders; + return _headers._AccessControlRequestHeaders; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -1378,7 +1333,7 @@ protected override StringValues GetValueFast(string key) } if (MaybeUnknown == null) { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } return MaybeUnknown[key]; } @@ -1392,7 +1347,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 1L) != 0)) { - value = _CacheControl; + value = _headers._CacheControl; return true; } else @@ -1406,7 +1361,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 131072L) != 0)) { - value = _ContentRange; + value = _headers._ContentRange; return true; } else @@ -1420,7 +1375,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 524288L) != 0)) { - value = _LastModified; + value = _headers._LastModified; return true; } else @@ -1434,7 +1389,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 16777216L) != 0)) { - value = _Authorization; + value = _headers._Authorization; return true; } else @@ -1448,7 +1403,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 2147483648L) != 0)) { - value = _IfNoneMatch; + value = _headers._IfNoneMatch; return true; } else @@ -1466,7 +1421,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 2L) != 0)) { - value = _Connection; + value = _headers._Connection; return true; } else @@ -1480,7 +1435,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 8L) != 0)) { - value = _KeepAlive; + value = _headers._KeepAlive; return true; } else @@ -1494,7 +1449,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 1099511627776L) != 0)) { - value = _UserAgent; + value = _headers._UserAgent; return true; } else @@ -1512,7 +1467,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 4L) != 0)) { - value = _Date; + value = _headers._Date; return true; } else @@ -1526,7 +1481,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 134217728L) != 0)) { - value = _From; + value = _headers._From; return true; } else @@ -1540,7 +1495,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 268435456L) != 0)) { - value = _Host; + value = _headers._Host; return true; } else @@ -1558,7 +1513,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 16L) != 0)) { - value = _Pragma; + value = _headers._Pragma; return true; } else @@ -1572,7 +1527,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 1048576L) != 0)) { - value = _Accept; + value = _headers._Accept; return true; } else @@ -1586,7 +1541,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 33554432L) != 0)) { - value = _Cookie; + value = _headers._Cookie; return true; } else @@ -1600,7 +1555,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 67108864L) != 0)) { - value = _Expect; + value = _headers._Expect; return true; } else @@ -1614,7 +1569,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 2199023255552L) != 0)) { - value = _Origin; + value = _headers._Origin; return true; } else @@ -1632,7 +1587,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 32L) != 0)) { - value = _Trailer; + value = _headers._Trailer; return true; } else @@ -1646,7 +1601,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 128L) != 0)) { - value = _Upgrade; + value = _headers._Upgrade; return true; } else @@ -1660,7 +1615,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 512L) != 0)) { - value = _Warning; + value = _headers._Warning; return true; } else @@ -1674,7 +1629,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 262144L) != 0)) { - value = _Expires; + value = _headers._Expires; return true; } else @@ -1688,7 +1643,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 68719476736L) != 0)) { - value = _Referer; + value = _headers._Referer; return true; } else @@ -1706,7 +1661,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 64L) != 0)) { - value = _TransferEncoding; + value = _headers._TransferEncoding; return true; } else @@ -1720,7 +1675,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 1073741824L) != 0)) { - value = _IfModifiedSince; + value = _headers._IfModifiedSince; return true; } else @@ -1738,7 +1693,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 256L) != 0)) { - value = _Via; + value = _headers._Via; return true; } else @@ -1756,7 +1711,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 1024L) != 0)) { - value = _Allow; + value = _headers._Allow; return true; } else @@ -1770,7 +1725,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 137438953472L) != 0)) { - value = _Range; + value = _headers._Range; return true; } else @@ -1788,7 +1743,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 2048L) != 0)) { - value = _ContentLength; + value = _headers._ContentLength; return true; } else @@ -1802,7 +1757,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 2097152L) != 0)) { - value = _AcceptCharset; + value = _headers._AcceptCharset; return true; } else @@ -1820,7 +1775,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 4096L) != 0)) { - value = _ContentType; + value = _headers._ContentType; return true; } else @@ -1834,7 +1789,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 17179869184L) != 0)) { - value = _MaxForwards; + value = _headers._MaxForwards; return true; } else @@ -1852,7 +1807,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 8192L) != 0)) { - value = _ContentEncoding; + value = _headers._ContentEncoding; return true; } else @@ -1866,7 +1821,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 16384L) != 0)) { - value = _ContentLanguage; + value = _headers._ContentLanguage; return true; } else @@ -1880,7 +1835,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 32768L) != 0)) { - value = _ContentLocation; + value = _headers._ContentLocation; return true; } else @@ -1898,7 +1853,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 65536L) != 0)) { - value = _ContentMD5; + value = _headers._ContentMD5; return true; } else @@ -1916,7 +1871,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 4194304L) != 0)) { - value = _AcceptEncoding; + value = _headers._AcceptEncoding; return true; } else @@ -1930,7 +1885,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 8388608L) != 0)) { - value = _AcceptLanguage; + value = _headers._AcceptLanguage; return true; } else @@ -1948,7 +1903,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 536870912L) != 0)) { - value = _IfMatch; + value = _headers._IfMatch; return true; } else @@ -1962,7 +1917,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 4294967296L) != 0)) { - value = _IfRange; + value = _headers._IfRange; return true; } else @@ -1980,7 +1935,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 8589934592L) != 0)) { - value = _IfUnmodifiedSince; + value = _headers._IfUnmodifiedSince; return true; } else @@ -1994,7 +1949,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 34359738368L) != 0)) { - value = _ProxyAuthorization; + value = _headers._ProxyAuthorization; return true; } else @@ -2012,7 +1967,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 274877906944L) != 0)) { - value = _TE; + value = _headers._TE; return true; } else @@ -2030,7 +1985,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 549755813888L) != 0)) { - value = _Translate; + value = _headers._Translate; return true; } else @@ -2048,7 +2003,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 4398046511104L) != 0)) { - value = _AccessControlRequestMethod; + value = _headers._AccessControlRequestMethod; return true; } else @@ -2066,7 +2021,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 8796093022208L) != 0)) { - value = _AccessControlRequestHeaders; + value = _headers._AccessControlRequestHeaders; return true; } else @@ -2090,35 +2045,35 @@ protected override void SetValueFast(string key, StringValues value) if ("Cache-Control".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 1L; - _CacheControl = value; + _headers._CacheControl = value; return; } if ("Content-Range".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 131072L; - _ContentRange = value; + _headers._ContentRange = value; return; } if ("Last-Modified".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 524288L; - _LastModified = value; + _headers._LastModified = value; return; } if ("Authorization".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 16777216L; - _Authorization = value; + _headers._Authorization = value; return; } if ("If-None-Match".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 2147483648L; - _IfNoneMatch = value; + _headers._IfNoneMatch = value; return; } } @@ -2129,21 +2084,21 @@ protected override void SetValueFast(string key, StringValues value) if ("Connection".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 2L; - _Connection = value; + _headers._Connection = value; return; } if ("Keep-Alive".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 8L; - _KeepAlive = value; + _headers._KeepAlive = value; return; } if ("User-Agent".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 1099511627776L; - _UserAgent = value; + _headers._UserAgent = value; return; } } @@ -2154,21 +2109,21 @@ protected override void SetValueFast(string key, StringValues value) if ("Date".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 4L; - _Date = value; + _headers._Date = value; return; } if ("From".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 134217728L; - _From = value; + _headers._From = value; return; } if ("Host".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 268435456L; - _Host = value; + _headers._Host = value; return; } } @@ -2179,35 +2134,35 @@ protected override void SetValueFast(string key, StringValues value) if ("Pragma".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 16L; - _Pragma = value; + _headers._Pragma = value; return; } if ("Accept".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 1048576L; - _Accept = value; + _headers._Accept = value; return; } if ("Cookie".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 33554432L; - _Cookie = value; + _headers._Cookie = value; return; } if ("Expect".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 67108864L; - _Expect = value; + _headers._Expect = value; return; } if ("Origin".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 2199023255552L; - _Origin = value; + _headers._Origin = value; return; } } @@ -2218,35 +2173,35 @@ protected override void SetValueFast(string key, StringValues value) if ("Trailer".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 32L; - _Trailer = value; + _headers._Trailer = value; return; } if ("Upgrade".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 128L; - _Upgrade = value; + _headers._Upgrade = value; return; } if ("Warning".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 512L; - _Warning = value; + _headers._Warning = value; return; } if ("Expires".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 262144L; - _Expires = value; + _headers._Expires = value; return; } if ("Referer".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 68719476736L; - _Referer = value; + _headers._Referer = value; return; } } @@ -2257,14 +2212,14 @@ protected override void SetValueFast(string key, StringValues value) if ("Transfer-Encoding".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 64L; - _TransferEncoding = value; + _headers._TransferEncoding = value; return; } if ("If-Modified-Since".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 1073741824L; - _IfModifiedSince = value; + _headers._IfModifiedSince = value; return; } } @@ -2275,7 +2230,7 @@ protected override void SetValueFast(string key, StringValues value) if ("Via".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 256L; - _Via = value; + _headers._Via = value; return; } } @@ -2286,14 +2241,14 @@ protected override void SetValueFast(string key, StringValues value) if ("Allow".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 1024L; - _Allow = value; + _headers._Allow = value; return; } if ("Range".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 137438953472L; - _Range = value; + _headers._Range = value; return; } } @@ -2304,14 +2259,14 @@ protected override void SetValueFast(string key, StringValues value) if ("Content-Length".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 2048L; - _ContentLength = value; + _headers._ContentLength = value; return; } if ("Accept-Charset".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 2097152L; - _AcceptCharset = value; + _headers._AcceptCharset = value; return; } } @@ -2322,14 +2277,14 @@ protected override void SetValueFast(string key, StringValues value) if ("Content-Type".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 4096L; - _ContentType = value; + _headers._ContentType = value; return; } if ("Max-Forwards".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 17179869184L; - _MaxForwards = value; + _headers._MaxForwards = value; return; } } @@ -2340,21 +2295,21 @@ protected override void SetValueFast(string key, StringValues value) if ("Content-Encoding".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 8192L; - _ContentEncoding = value; + _headers._ContentEncoding = value; return; } if ("Content-Language".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 16384L; - _ContentLanguage = value; + _headers._ContentLanguage = value; return; } if ("Content-Location".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 32768L; - _ContentLocation = value; + _headers._ContentLocation = value; return; } } @@ -2365,7 +2320,7 @@ protected override void SetValueFast(string key, StringValues value) if ("Content-MD5".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 65536L; - _ContentMD5 = value; + _headers._ContentMD5 = value; return; } } @@ -2376,14 +2331,14 @@ protected override void SetValueFast(string key, StringValues value) if ("Accept-Encoding".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 4194304L; - _AcceptEncoding = value; + _headers._AcceptEncoding = value; return; } if ("Accept-Language".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 8388608L; - _AcceptLanguage = value; + _headers._AcceptLanguage = value; return; } } @@ -2394,14 +2349,14 @@ protected override void SetValueFast(string key, StringValues value) if ("If-Match".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 536870912L; - _IfMatch = value; + _headers._IfMatch = value; return; } if ("If-Range".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 4294967296L; - _IfRange = value; + _headers._IfRange = value; return; } } @@ -2412,14 +2367,14 @@ protected override void SetValueFast(string key, StringValues value) if ("If-Unmodified-Since".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 8589934592L; - _IfUnmodifiedSince = value; + _headers._IfUnmodifiedSince = value; return; } if ("Proxy-Authorization".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 34359738368L; - _ProxyAuthorization = value; + _headers._ProxyAuthorization = value; return; } } @@ -2430,7 +2385,7 @@ protected override void SetValueFast(string key, StringValues value) if ("TE".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 274877906944L; - _TE = value; + _headers._TE = value; return; } } @@ -2441,7 +2396,7 @@ protected override void SetValueFast(string key, StringValues value) if ("Translate".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 549755813888L; - _Translate = value; + _headers._Translate = value; return; } } @@ -2452,7 +2407,7 @@ protected override void SetValueFast(string key, StringValues value) if ("Access-Control-Request-Method".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 4398046511104L; - _AccessControlRequestMethod = value; + _headers._AccessControlRequestMethod = value; return; } } @@ -2463,7 +2418,7 @@ protected override void SetValueFast(string key, StringValues value) if ("Access-Control-Request-Headers".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 8796093022208L; - _AccessControlRequestHeaders = value; + _headers._AccessControlRequestHeaders = value; return; } } @@ -2481,10 +2436,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 1L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 1L; - _CacheControl = value; + _headers._CacheControl = value; return; } @@ -2492,10 +2447,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 131072L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 131072L; - _ContentRange = value; + _headers._ContentRange = value; return; } @@ -2503,10 +2458,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 524288L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 524288L; - _LastModified = value; + _headers._LastModified = value; return; } @@ -2514,10 +2469,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 16777216L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 16777216L; - _Authorization = value; + _headers._Authorization = value; return; } @@ -2525,10 +2480,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 2147483648L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 2147483648L; - _IfNoneMatch = value; + _headers._IfNoneMatch = value; return; } } @@ -2540,10 +2495,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 2L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 2L; - _Connection = value; + _headers._Connection = value; return; } @@ -2551,10 +2506,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 8L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 8L; - _KeepAlive = value; + _headers._KeepAlive = value; return; } @@ -2562,10 +2517,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 1099511627776L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 1099511627776L; - _UserAgent = value; + _headers._UserAgent = value; return; } } @@ -2577,10 +2532,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 4L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 4L; - _Date = value; + _headers._Date = value; return; } @@ -2588,10 +2543,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 134217728L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 134217728L; - _From = value; + _headers._From = value; return; } @@ -2599,10 +2554,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 268435456L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 268435456L; - _Host = value; + _headers._Host = value; return; } } @@ -2614,10 +2569,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 16L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 16L; - _Pragma = value; + _headers._Pragma = value; return; } @@ -2625,10 +2580,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 1048576L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 1048576L; - _Accept = value; + _headers._Accept = value; return; } @@ -2636,10 +2591,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 33554432L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 33554432L; - _Cookie = value; + _headers._Cookie = value; return; } @@ -2647,10 +2602,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 67108864L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 67108864L; - _Expect = value; + _headers._Expect = value; return; } @@ -2658,10 +2613,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 2199023255552L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 2199023255552L; - _Origin = value; + _headers._Origin = value; return; } } @@ -2673,10 +2628,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 32L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 32L; - _Trailer = value; + _headers._Trailer = value; return; } @@ -2684,10 +2639,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 128L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 128L; - _Upgrade = value; + _headers._Upgrade = value; return; } @@ -2695,10 +2650,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 512L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 512L; - _Warning = value; + _headers._Warning = value; return; } @@ -2706,10 +2661,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 262144L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 262144L; - _Expires = value; + _headers._Expires = value; return; } @@ -2717,10 +2672,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 68719476736L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 68719476736L; - _Referer = value; + _headers._Referer = value; return; } } @@ -2732,10 +2687,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 64L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 64L; - _TransferEncoding = value; + _headers._TransferEncoding = value; return; } @@ -2743,10 +2698,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 1073741824L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 1073741824L; - _IfModifiedSince = value; + _headers._IfModifiedSince = value; return; } } @@ -2758,10 +2713,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 256L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 256L; - _Via = value; + _headers._Via = value; return; } } @@ -2773,10 +2728,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 1024L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 1024L; - _Allow = value; + _headers._Allow = value; return; } @@ -2784,10 +2739,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 137438953472L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 137438953472L; - _Range = value; + _headers._Range = value; return; } } @@ -2799,10 +2754,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 2048L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 2048L; - _ContentLength = value; + _headers._ContentLength = value; return; } @@ -2810,10 +2765,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 2097152L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 2097152L; - _AcceptCharset = value; + _headers._AcceptCharset = value; return; } } @@ -2825,10 +2780,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 4096L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 4096L; - _ContentType = value; + _headers._ContentType = value; return; } @@ -2836,10 +2791,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 17179869184L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 17179869184L; - _MaxForwards = value; + _headers._MaxForwards = value; return; } } @@ -2851,10 +2806,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 8192L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 8192L; - _ContentEncoding = value; + _headers._ContentEncoding = value; return; } @@ -2862,10 +2817,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 16384L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 16384L; - _ContentLanguage = value; + _headers._ContentLanguage = value; return; } @@ -2873,10 +2828,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 32768L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 32768L; - _ContentLocation = value; + _headers._ContentLocation = value; return; } } @@ -2888,10 +2843,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 65536L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 65536L; - _ContentMD5 = value; + _headers._ContentMD5 = value; return; } } @@ -2903,10 +2858,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 4194304L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 4194304L; - _AcceptEncoding = value; + _headers._AcceptEncoding = value; return; } @@ -2914,10 +2869,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 8388608L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 8388608L; - _AcceptLanguage = value; + _headers._AcceptLanguage = value; return; } } @@ -2929,10 +2884,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 536870912L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 536870912L; - _IfMatch = value; + _headers._IfMatch = value; return; } @@ -2940,10 +2895,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 4294967296L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 4294967296L; - _IfRange = value; + _headers._IfRange = value; return; } } @@ -2955,10 +2910,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 8589934592L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 8589934592L; - _IfUnmodifiedSince = value; + _headers._IfUnmodifiedSince = value; return; } @@ -2966,10 +2921,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 34359738368L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 34359738368L; - _ProxyAuthorization = value; + _headers._ProxyAuthorization = value; return; } } @@ -2981,10 +2936,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 274877906944L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 274877906944L; - _TE = value; + _headers._TE = value; return; } } @@ -2996,10 +2951,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 549755813888L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 549755813888L; - _Translate = value; + _headers._Translate = value; return; } } @@ -3011,10 +2966,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 4398046511104L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 4398046511104L; - _AccessControlRequestMethod = value; + _headers._AccessControlRequestMethod = value; return; } } @@ -3026,10 +2981,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 8796093022208L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 8796093022208L; - _AccessControlRequestHeaders = value; + _headers._AccessControlRequestHeaders = value; return; } } @@ -3048,7 +3003,7 @@ protected override bool RemoveFast(string key) if (((_bits & 1L) != 0)) { _bits &= ~1L; - _CacheControl = StringValues.Empty; + _headers._CacheControl = StringValues.Empty; return true; } else @@ -3062,7 +3017,7 @@ protected override bool RemoveFast(string key) if (((_bits & 131072L) != 0)) { _bits &= ~131072L; - _ContentRange = StringValues.Empty; + _headers._ContentRange = StringValues.Empty; return true; } else @@ -3076,7 +3031,7 @@ protected override bool RemoveFast(string key) if (((_bits & 524288L) != 0)) { _bits &= ~524288L; - _LastModified = StringValues.Empty; + _headers._LastModified = StringValues.Empty; return true; } else @@ -3090,7 +3045,7 @@ protected override bool RemoveFast(string key) if (((_bits & 16777216L) != 0)) { _bits &= ~16777216L; - _Authorization = StringValues.Empty; + _headers._Authorization = StringValues.Empty; return true; } else @@ -3104,7 +3059,7 @@ protected override bool RemoveFast(string key) if (((_bits & 2147483648L) != 0)) { _bits &= ~2147483648L; - _IfNoneMatch = StringValues.Empty; + _headers._IfNoneMatch = StringValues.Empty; return true; } else @@ -3122,7 +3077,7 @@ protected override bool RemoveFast(string key) if (((_bits & 2L) != 0)) { _bits &= ~2L; - _Connection = StringValues.Empty; + _headers._Connection = StringValues.Empty; return true; } else @@ -3136,7 +3091,7 @@ protected override bool RemoveFast(string key) if (((_bits & 8L) != 0)) { _bits &= ~8L; - _KeepAlive = StringValues.Empty; + _headers._KeepAlive = StringValues.Empty; return true; } else @@ -3150,7 +3105,7 @@ protected override bool RemoveFast(string key) if (((_bits & 1099511627776L) != 0)) { _bits &= ~1099511627776L; - _UserAgent = StringValues.Empty; + _headers._UserAgent = StringValues.Empty; return true; } else @@ -3168,7 +3123,7 @@ protected override bool RemoveFast(string key) if (((_bits & 4L) != 0)) { _bits &= ~4L; - _Date = StringValues.Empty; + _headers._Date = StringValues.Empty; return true; } else @@ -3182,7 +3137,7 @@ protected override bool RemoveFast(string key) if (((_bits & 134217728L) != 0)) { _bits &= ~134217728L; - _From = StringValues.Empty; + _headers._From = StringValues.Empty; return true; } else @@ -3196,7 +3151,7 @@ protected override bool RemoveFast(string key) if (((_bits & 268435456L) != 0)) { _bits &= ~268435456L; - _Host = StringValues.Empty; + _headers._Host = StringValues.Empty; return true; } else @@ -3214,7 +3169,7 @@ protected override bool RemoveFast(string key) if (((_bits & 16L) != 0)) { _bits &= ~16L; - _Pragma = StringValues.Empty; + _headers._Pragma = StringValues.Empty; return true; } else @@ -3228,7 +3183,7 @@ protected override bool RemoveFast(string key) if (((_bits & 1048576L) != 0)) { _bits &= ~1048576L; - _Accept = StringValues.Empty; + _headers._Accept = StringValues.Empty; return true; } else @@ -3242,7 +3197,7 @@ protected override bool RemoveFast(string key) if (((_bits & 33554432L) != 0)) { _bits &= ~33554432L; - _Cookie = StringValues.Empty; + _headers._Cookie = StringValues.Empty; return true; } else @@ -3256,7 +3211,7 @@ protected override bool RemoveFast(string key) if (((_bits & 67108864L) != 0)) { _bits &= ~67108864L; - _Expect = StringValues.Empty; + _headers._Expect = StringValues.Empty; return true; } else @@ -3270,7 +3225,7 @@ protected override bool RemoveFast(string key) if (((_bits & 2199023255552L) != 0)) { _bits &= ~2199023255552L; - _Origin = StringValues.Empty; + _headers._Origin = StringValues.Empty; return true; } else @@ -3288,7 +3243,7 @@ protected override bool RemoveFast(string key) if (((_bits & 32L) != 0)) { _bits &= ~32L; - _Trailer = StringValues.Empty; + _headers._Trailer = StringValues.Empty; return true; } else @@ -3302,7 +3257,7 @@ protected override bool RemoveFast(string key) if (((_bits & 128L) != 0)) { _bits &= ~128L; - _Upgrade = StringValues.Empty; + _headers._Upgrade = StringValues.Empty; return true; } else @@ -3316,7 +3271,7 @@ protected override bool RemoveFast(string key) if (((_bits & 512L) != 0)) { _bits &= ~512L; - _Warning = StringValues.Empty; + _headers._Warning = StringValues.Empty; return true; } else @@ -3330,7 +3285,7 @@ protected override bool RemoveFast(string key) if (((_bits & 262144L) != 0)) { _bits &= ~262144L; - _Expires = StringValues.Empty; + _headers._Expires = StringValues.Empty; return true; } else @@ -3344,7 +3299,7 @@ protected override bool RemoveFast(string key) if (((_bits & 68719476736L) != 0)) { _bits &= ~68719476736L; - _Referer = StringValues.Empty; + _headers._Referer = StringValues.Empty; return true; } else @@ -3362,7 +3317,7 @@ protected override bool RemoveFast(string key) if (((_bits & 64L) != 0)) { _bits &= ~64L; - _TransferEncoding = StringValues.Empty; + _headers._TransferEncoding = StringValues.Empty; return true; } else @@ -3376,7 +3331,7 @@ protected override bool RemoveFast(string key) if (((_bits & 1073741824L) != 0)) { _bits &= ~1073741824L; - _IfModifiedSince = StringValues.Empty; + _headers._IfModifiedSince = StringValues.Empty; return true; } else @@ -3394,7 +3349,7 @@ protected override bool RemoveFast(string key) if (((_bits & 256L) != 0)) { _bits &= ~256L; - _Via = StringValues.Empty; + _headers._Via = StringValues.Empty; return true; } else @@ -3412,7 +3367,7 @@ protected override bool RemoveFast(string key) if (((_bits & 1024L) != 0)) { _bits &= ~1024L; - _Allow = StringValues.Empty; + _headers._Allow = StringValues.Empty; return true; } else @@ -3426,7 +3381,7 @@ protected override bool RemoveFast(string key) if (((_bits & 137438953472L) != 0)) { _bits &= ~137438953472L; - _Range = StringValues.Empty; + _headers._Range = StringValues.Empty; return true; } else @@ -3444,7 +3399,7 @@ protected override bool RemoveFast(string key) if (((_bits & 2048L) != 0)) { _bits &= ~2048L; - _ContentLength = StringValues.Empty; + _headers._ContentLength = StringValues.Empty; return true; } else @@ -3458,7 +3413,7 @@ protected override bool RemoveFast(string key) if (((_bits & 2097152L) != 0)) { _bits &= ~2097152L; - _AcceptCharset = StringValues.Empty; + _headers._AcceptCharset = StringValues.Empty; return true; } else @@ -3476,7 +3431,7 @@ protected override bool RemoveFast(string key) if (((_bits & 4096L) != 0)) { _bits &= ~4096L; - _ContentType = StringValues.Empty; + _headers._ContentType = StringValues.Empty; return true; } else @@ -3490,7 +3445,7 @@ protected override bool RemoveFast(string key) if (((_bits & 17179869184L) != 0)) { _bits &= ~17179869184L; - _MaxForwards = StringValues.Empty; + _headers._MaxForwards = StringValues.Empty; return true; } else @@ -3508,7 +3463,7 @@ protected override bool RemoveFast(string key) if (((_bits & 8192L) != 0)) { _bits &= ~8192L; - _ContentEncoding = StringValues.Empty; + _headers._ContentEncoding = StringValues.Empty; return true; } else @@ -3522,7 +3477,7 @@ protected override bool RemoveFast(string key) if (((_bits & 16384L) != 0)) { _bits &= ~16384L; - _ContentLanguage = StringValues.Empty; + _headers._ContentLanguage = StringValues.Empty; return true; } else @@ -3536,7 +3491,7 @@ protected override bool RemoveFast(string key) if (((_bits & 32768L) != 0)) { _bits &= ~32768L; - _ContentLocation = StringValues.Empty; + _headers._ContentLocation = StringValues.Empty; return true; } else @@ -3554,7 +3509,7 @@ protected override bool RemoveFast(string key) if (((_bits & 65536L) != 0)) { _bits &= ~65536L; - _ContentMD5 = StringValues.Empty; + _headers._ContentMD5 = StringValues.Empty; return true; } else @@ -3572,7 +3527,7 @@ protected override bool RemoveFast(string key) if (((_bits & 4194304L) != 0)) { _bits &= ~4194304L; - _AcceptEncoding = StringValues.Empty; + _headers._AcceptEncoding = StringValues.Empty; return true; } else @@ -3586,7 +3541,7 @@ protected override bool RemoveFast(string key) if (((_bits & 8388608L) != 0)) { _bits &= ~8388608L; - _AcceptLanguage = StringValues.Empty; + _headers._AcceptLanguage = StringValues.Empty; return true; } else @@ -3604,7 +3559,7 @@ protected override bool RemoveFast(string key) if (((_bits & 536870912L) != 0)) { _bits &= ~536870912L; - _IfMatch = StringValues.Empty; + _headers._IfMatch = StringValues.Empty; return true; } else @@ -3618,7 +3573,7 @@ protected override bool RemoveFast(string key) if (((_bits & 4294967296L) != 0)) { _bits &= ~4294967296L; - _IfRange = StringValues.Empty; + _headers._IfRange = StringValues.Empty; return true; } else @@ -3636,7 +3591,7 @@ protected override bool RemoveFast(string key) if (((_bits & 8589934592L) != 0)) { _bits &= ~8589934592L; - _IfUnmodifiedSince = StringValues.Empty; + _headers._IfUnmodifiedSince = StringValues.Empty; return true; } else @@ -3650,7 +3605,7 @@ protected override bool RemoveFast(string key) if (((_bits & 34359738368L) != 0)) { _bits &= ~34359738368L; - _ProxyAuthorization = StringValues.Empty; + _headers._ProxyAuthorization = StringValues.Empty; return true; } else @@ -3668,7 +3623,7 @@ protected override bool RemoveFast(string key) if (((_bits & 274877906944L) != 0)) { _bits &= ~274877906944L; - _TE = StringValues.Empty; + _headers._TE = StringValues.Empty; return true; } else @@ -3686,7 +3641,7 @@ protected override bool RemoveFast(string key) if (((_bits & 549755813888L) != 0)) { _bits &= ~549755813888L; - _Translate = StringValues.Empty; + _headers._Translate = StringValues.Empty; return true; } else @@ -3704,7 +3659,7 @@ protected override bool RemoveFast(string key) if (((_bits & 4398046511104L) != 0)) { _bits &= ~4398046511104L; - _AccessControlRequestMethod = StringValues.Empty; + _headers._AccessControlRequestMethod = StringValues.Empty; return true; } else @@ -3722,7 +3677,7 @@ protected override bool RemoveFast(string key) if (((_bits & 8796093022208L) != 0)) { _bits &= ~8796093022208L; - _AccessControlRequestHeaders = StringValues.Empty; + _headers._AccessControlRequestHeaders = StringValues.Empty; return true; } else @@ -3738,6 +3693,7 @@ protected override bool RemoveFast(string key) protected override void ClearFast() { _bits = 0; + _headers = default(HeaderReferences); MaybeUnknown?.Clear(); } @@ -3745,17 +3701,17 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex < 0) { - throw new ArgumentException(); + ThrowArgumentException(); } if (((_bits & 1L) != 0)) { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Cache-Control", _CacheControl); + array[arrayIndex] = new KeyValuePair("Cache-Control", _headers._CacheControl); ++arrayIndex; } @@ -3763,10 +3719,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Connection", _Connection); + array[arrayIndex] = new KeyValuePair("Connection", _headers._Connection); ++arrayIndex; } @@ -3774,10 +3730,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Date", _Date); + array[arrayIndex] = new KeyValuePair("Date", _headers._Date); ++arrayIndex; } @@ -3785,10 +3741,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Keep-Alive", _KeepAlive); + array[arrayIndex] = new KeyValuePair("Keep-Alive", _headers._KeepAlive); ++arrayIndex; } @@ -3796,10 +3752,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Pragma", _Pragma); + array[arrayIndex] = new KeyValuePair("Pragma", _headers._Pragma); ++arrayIndex; } @@ -3807,10 +3763,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Trailer", _Trailer); + array[arrayIndex] = new KeyValuePair("Trailer", _headers._Trailer); ++arrayIndex; } @@ -3818,10 +3774,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Transfer-Encoding", _TransferEncoding); + array[arrayIndex] = new KeyValuePair("Transfer-Encoding", _headers._TransferEncoding); ++arrayIndex; } @@ -3829,10 +3785,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Upgrade", _Upgrade); + array[arrayIndex] = new KeyValuePair("Upgrade", _headers._Upgrade); ++arrayIndex; } @@ -3840,10 +3796,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Via", _Via); + array[arrayIndex] = new KeyValuePair("Via", _headers._Via); ++arrayIndex; } @@ -3851,10 +3807,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Warning", _Warning); + array[arrayIndex] = new KeyValuePair("Warning", _headers._Warning); ++arrayIndex; } @@ -3862,10 +3818,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Allow", _Allow); + array[arrayIndex] = new KeyValuePair("Allow", _headers._Allow); ++arrayIndex; } @@ -3873,10 +3829,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Content-Length", _ContentLength); + array[arrayIndex] = new KeyValuePair("Content-Length", _headers._ContentLength); ++arrayIndex; } @@ -3884,10 +3840,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Content-Type", _ContentType); + array[arrayIndex] = new KeyValuePair("Content-Type", _headers._ContentType); ++arrayIndex; } @@ -3895,10 +3851,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Content-Encoding", _ContentEncoding); + array[arrayIndex] = new KeyValuePair("Content-Encoding", _headers._ContentEncoding); ++arrayIndex; } @@ -3906,10 +3862,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Content-Language", _ContentLanguage); + array[arrayIndex] = new KeyValuePair("Content-Language", _headers._ContentLanguage); ++arrayIndex; } @@ -3917,10 +3873,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Content-Location", _ContentLocation); + array[arrayIndex] = new KeyValuePair("Content-Location", _headers._ContentLocation); ++arrayIndex; } @@ -3928,10 +3884,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Content-MD5", _ContentMD5); + array[arrayIndex] = new KeyValuePair("Content-MD5", _headers._ContentMD5); ++arrayIndex; } @@ -3939,10 +3895,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Content-Range", _ContentRange); + array[arrayIndex] = new KeyValuePair("Content-Range", _headers._ContentRange); ++arrayIndex; } @@ -3950,10 +3906,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Expires", _Expires); + array[arrayIndex] = new KeyValuePair("Expires", _headers._Expires); ++arrayIndex; } @@ -3961,10 +3917,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Last-Modified", _LastModified); + array[arrayIndex] = new KeyValuePair("Last-Modified", _headers._LastModified); ++arrayIndex; } @@ -3972,10 +3928,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Accept", _Accept); + array[arrayIndex] = new KeyValuePair("Accept", _headers._Accept); ++arrayIndex; } @@ -3983,10 +3939,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Accept-Charset", _AcceptCharset); + array[arrayIndex] = new KeyValuePair("Accept-Charset", _headers._AcceptCharset); ++arrayIndex; } @@ -3994,10 +3950,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Accept-Encoding", _AcceptEncoding); + array[arrayIndex] = new KeyValuePair("Accept-Encoding", _headers._AcceptEncoding); ++arrayIndex; } @@ -4005,10 +3961,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Accept-Language", _AcceptLanguage); + array[arrayIndex] = new KeyValuePair("Accept-Language", _headers._AcceptLanguage); ++arrayIndex; } @@ -4016,10 +3972,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Authorization", _Authorization); + array[arrayIndex] = new KeyValuePair("Authorization", _headers._Authorization); ++arrayIndex; } @@ -4027,10 +3983,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Cookie", _Cookie); + array[arrayIndex] = new KeyValuePair("Cookie", _headers._Cookie); ++arrayIndex; } @@ -4038,10 +3994,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Expect", _Expect); + array[arrayIndex] = new KeyValuePair("Expect", _headers._Expect); ++arrayIndex; } @@ -4049,10 +4005,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("From", _From); + array[arrayIndex] = new KeyValuePair("From", _headers._From); ++arrayIndex; } @@ -4060,10 +4016,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Host", _Host); + array[arrayIndex] = new KeyValuePair("Host", _headers._Host); ++arrayIndex; } @@ -4071,10 +4027,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("If-Match", _IfMatch); + array[arrayIndex] = new KeyValuePair("If-Match", _headers._IfMatch); ++arrayIndex; } @@ -4082,10 +4038,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("If-Modified-Since", _IfModifiedSince); + array[arrayIndex] = new KeyValuePair("If-Modified-Since", _headers._IfModifiedSince); ++arrayIndex; } @@ -4093,10 +4049,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("If-None-Match", _IfNoneMatch); + array[arrayIndex] = new KeyValuePair("If-None-Match", _headers._IfNoneMatch); ++arrayIndex; } @@ -4104,10 +4060,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("If-Range", _IfRange); + array[arrayIndex] = new KeyValuePair("If-Range", _headers._IfRange); ++arrayIndex; } @@ -4115,10 +4071,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("If-Unmodified-Since", _IfUnmodifiedSince); + array[arrayIndex] = new KeyValuePair("If-Unmodified-Since", _headers._IfUnmodifiedSince); ++arrayIndex; } @@ -4126,10 +4082,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Max-Forwards", _MaxForwards); + array[arrayIndex] = new KeyValuePair("Max-Forwards", _headers._MaxForwards); ++arrayIndex; } @@ -4137,10 +4093,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Proxy-Authorization", _ProxyAuthorization); + array[arrayIndex] = new KeyValuePair("Proxy-Authorization", _headers._ProxyAuthorization); ++arrayIndex; } @@ -4148,10 +4104,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Referer", _Referer); + array[arrayIndex] = new KeyValuePair("Referer", _headers._Referer); ++arrayIndex; } @@ -4159,10 +4115,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Range", _Range); + array[arrayIndex] = new KeyValuePair("Range", _headers._Range); ++arrayIndex; } @@ -4170,10 +4126,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("TE", _TE); + array[arrayIndex] = new KeyValuePair("TE", _headers._TE); ++arrayIndex; } @@ -4181,10 +4137,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Translate", _Translate); + array[arrayIndex] = new KeyValuePair("Translate", _headers._Translate); ++arrayIndex; } @@ -4192,10 +4148,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("User-Agent", _UserAgent); + array[arrayIndex] = new KeyValuePair("User-Agent", _headers._UserAgent); ++arrayIndex; } @@ -4203,10 +4159,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Origin", _Origin); + array[arrayIndex] = new KeyValuePair("Origin", _headers._Origin); ++arrayIndex; } @@ -4214,10 +4170,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Access-Control-Request-Method", _AccessControlRequestMethod); + array[arrayIndex] = new KeyValuePair("Access-Control-Request-Method", _headers._AccessControlRequestMethod); ++arrayIndex; } @@ -4225,16 +4181,17 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Access-Control-Request-Headers", _AccessControlRequestHeaders); + array[arrayIndex] = new KeyValuePair("Access-Control-Request-Headers", _headers._AccessControlRequestHeaders); ++arrayIndex; } ((ICollection>)MaybeUnknown)?.CopyTo(array, arrayIndex); } + public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string value) { fixed (byte* ptr = &keyBytes[keyOffset]) @@ -4251,12 +4208,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 1L) != 0)) { - _CacheControl = AppendValue(_CacheControl, value); + _headers._CacheControl = AppendValue(_headers._CacheControl, value); } else { _bits |= 1L; - _CacheControl = new StringValues(value); + _headers._CacheControl = new StringValues(value); } return; } @@ -4265,12 +4222,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 131072L) != 0)) { - _ContentRange = AppendValue(_ContentRange, value); + _headers._ContentRange = AppendValue(_headers._ContentRange, value); } else { _bits |= 131072L; - _ContentRange = new StringValues(value); + _headers._ContentRange = new StringValues(value); } return; } @@ -4279,12 +4236,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 524288L) != 0)) { - _LastModified = AppendValue(_LastModified, value); + _headers._LastModified = AppendValue(_headers._LastModified, value); } else { _bits |= 524288L; - _LastModified = new StringValues(value); + _headers._LastModified = new StringValues(value); } return; } @@ -4293,12 +4250,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 16777216L) != 0)) { - _Authorization = AppendValue(_Authorization, value); + _headers._Authorization = AppendValue(_headers._Authorization, value); } else { _bits |= 16777216L; - _Authorization = new StringValues(value); + _headers._Authorization = new StringValues(value); } return; } @@ -4307,12 +4264,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 2147483648L) != 0)) { - _IfNoneMatch = AppendValue(_IfNoneMatch, value); + _headers._IfNoneMatch = AppendValue(_headers._IfNoneMatch, value); } else { _bits |= 2147483648L; - _IfNoneMatch = new StringValues(value); + _headers._IfNoneMatch = new StringValues(value); } return; } @@ -4325,12 +4282,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 2L) != 0)) { - _Connection = AppendValue(_Connection, value); + _headers._Connection = AppendValue(_headers._Connection, value); } else { _bits |= 2L; - _Connection = new StringValues(value); + _headers._Connection = new StringValues(value); } return; } @@ -4339,12 +4296,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 8L) != 0)) { - _KeepAlive = AppendValue(_KeepAlive, value); + _headers._KeepAlive = AppendValue(_headers._KeepAlive, value); } else { _bits |= 8L; - _KeepAlive = new StringValues(value); + _headers._KeepAlive = new StringValues(value); } return; } @@ -4353,12 +4310,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 1099511627776L) != 0)) { - _UserAgent = AppendValue(_UserAgent, value); + _headers._UserAgent = AppendValue(_headers._UserAgent, value); } else { _bits |= 1099511627776L; - _UserAgent = new StringValues(value); + _headers._UserAgent = new StringValues(value); } return; } @@ -4371,12 +4328,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 4L) != 0)) { - _Date = AppendValue(_Date, value); + _headers._Date = AppendValue(_headers._Date, value); } else { _bits |= 4L; - _Date = new StringValues(value); + _headers._Date = new StringValues(value); } return; } @@ -4385,12 +4342,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 134217728L) != 0)) { - _From = AppendValue(_From, value); + _headers._From = AppendValue(_headers._From, value); } else { _bits |= 134217728L; - _From = new StringValues(value); + _headers._From = new StringValues(value); } return; } @@ -4399,12 +4356,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 268435456L) != 0)) { - _Host = AppendValue(_Host, value); + _headers._Host = AppendValue(_headers._Host, value); } else { _bits |= 268435456L; - _Host = new StringValues(value); + _headers._Host = new StringValues(value); } return; } @@ -4417,12 +4374,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 16L) != 0)) { - _Pragma = AppendValue(_Pragma, value); + _headers._Pragma = AppendValue(_headers._Pragma, value); } else { _bits |= 16L; - _Pragma = new StringValues(value); + _headers._Pragma = new StringValues(value); } return; } @@ -4431,12 +4388,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 1048576L) != 0)) { - _Accept = AppendValue(_Accept, value); + _headers._Accept = AppendValue(_headers._Accept, value); } else { _bits |= 1048576L; - _Accept = new StringValues(value); + _headers._Accept = new StringValues(value); } return; } @@ -4445,12 +4402,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 33554432L) != 0)) { - _Cookie = AppendValue(_Cookie, value); + _headers._Cookie = AppendValue(_headers._Cookie, value); } else { _bits |= 33554432L; - _Cookie = new StringValues(value); + _headers._Cookie = new StringValues(value); } return; } @@ -4459,12 +4416,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 67108864L) != 0)) { - _Expect = AppendValue(_Expect, value); + _headers._Expect = AppendValue(_headers._Expect, value); } else { _bits |= 67108864L; - _Expect = new StringValues(value); + _headers._Expect = new StringValues(value); } return; } @@ -4473,12 +4430,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 2199023255552L) != 0)) { - _Origin = AppendValue(_Origin, value); + _headers._Origin = AppendValue(_headers._Origin, value); } else { _bits |= 2199023255552L; - _Origin = new StringValues(value); + _headers._Origin = new StringValues(value); } return; } @@ -4491,12 +4448,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 32L) != 0)) { - _Trailer = AppendValue(_Trailer, value); + _headers._Trailer = AppendValue(_headers._Trailer, value); } else { _bits |= 32L; - _Trailer = new StringValues(value); + _headers._Trailer = new StringValues(value); } return; } @@ -4505,12 +4462,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 128L) != 0)) { - _Upgrade = AppendValue(_Upgrade, value); + _headers._Upgrade = AppendValue(_headers._Upgrade, value); } else { _bits |= 128L; - _Upgrade = new StringValues(value); + _headers._Upgrade = new StringValues(value); } return; } @@ -4519,12 +4476,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 512L) != 0)) { - _Warning = AppendValue(_Warning, value); + _headers._Warning = AppendValue(_headers._Warning, value); } else { _bits |= 512L; - _Warning = new StringValues(value); + _headers._Warning = new StringValues(value); } return; } @@ -4533,12 +4490,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 262144L) != 0)) { - _Expires = AppendValue(_Expires, value); + _headers._Expires = AppendValue(_headers._Expires, value); } else { _bits |= 262144L; - _Expires = new StringValues(value); + _headers._Expires = new StringValues(value); } return; } @@ -4547,12 +4504,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 68719476736L) != 0)) { - _Referer = AppendValue(_Referer, value); + _headers._Referer = AppendValue(_headers._Referer, value); } else { _bits |= 68719476736L; - _Referer = new StringValues(value); + _headers._Referer = new StringValues(value); } return; } @@ -4565,12 +4522,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 64L) != 0)) { - _TransferEncoding = AppendValue(_TransferEncoding, value); + _headers._TransferEncoding = AppendValue(_headers._TransferEncoding, value); } else { _bits |= 64L; - _TransferEncoding = new StringValues(value); + _headers._TransferEncoding = new StringValues(value); } return; } @@ -4579,12 +4536,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 1073741824L) != 0)) { - _IfModifiedSince = AppendValue(_IfModifiedSince, value); + _headers._IfModifiedSince = AppendValue(_headers._IfModifiedSince, value); } else { _bits |= 1073741824L; - _IfModifiedSince = new StringValues(value); + _headers._IfModifiedSince = new StringValues(value); } return; } @@ -4597,12 +4554,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 256L) != 0)) { - _Via = AppendValue(_Via, value); + _headers._Via = AppendValue(_headers._Via, value); } else { _bits |= 256L; - _Via = new StringValues(value); + _headers._Via = new StringValues(value); } return; } @@ -4615,12 +4572,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 1024L) != 0)) { - _Allow = AppendValue(_Allow, value); + _headers._Allow = AppendValue(_headers._Allow, value); } else { _bits |= 1024L; - _Allow = new StringValues(value); + _headers._Allow = new StringValues(value); } return; } @@ -4629,12 +4586,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 137438953472L) != 0)) { - _Range = AppendValue(_Range, value); + _headers._Range = AppendValue(_headers._Range, value); } else { _bits |= 137438953472L; - _Range = new StringValues(value); + _headers._Range = new StringValues(value); } return; } @@ -4647,12 +4604,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 2048L) != 0)) { - _ContentLength = AppendValue(_ContentLength, value); + _headers._ContentLength = AppendValue(_headers._ContentLength, value); } else { _bits |= 2048L; - _ContentLength = new StringValues(value); + _headers._ContentLength = new StringValues(value); } return; } @@ -4661,12 +4618,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 2097152L) != 0)) { - _AcceptCharset = AppendValue(_AcceptCharset, value); + _headers._AcceptCharset = AppendValue(_headers._AcceptCharset, value); } else { _bits |= 2097152L; - _AcceptCharset = new StringValues(value); + _headers._AcceptCharset = new StringValues(value); } return; } @@ -4679,12 +4636,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 4096L) != 0)) { - _ContentType = AppendValue(_ContentType, value); + _headers._ContentType = AppendValue(_headers._ContentType, value); } else { _bits |= 4096L; - _ContentType = new StringValues(value); + _headers._ContentType = new StringValues(value); } return; } @@ -4693,12 +4650,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 17179869184L) != 0)) { - _MaxForwards = AppendValue(_MaxForwards, value); + _headers._MaxForwards = AppendValue(_headers._MaxForwards, value); } else { _bits |= 17179869184L; - _MaxForwards = new StringValues(value); + _headers._MaxForwards = new StringValues(value); } return; } @@ -4711,12 +4668,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 8192L) != 0)) { - _ContentEncoding = AppendValue(_ContentEncoding, value); + _headers._ContentEncoding = AppendValue(_headers._ContentEncoding, value); } else { _bits |= 8192L; - _ContentEncoding = new StringValues(value); + _headers._ContentEncoding = new StringValues(value); } return; } @@ -4725,12 +4682,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 16384L) != 0)) { - _ContentLanguage = AppendValue(_ContentLanguage, value); + _headers._ContentLanguage = AppendValue(_headers._ContentLanguage, value); } else { _bits |= 16384L; - _ContentLanguage = new StringValues(value); + _headers._ContentLanguage = new StringValues(value); } return; } @@ -4739,12 +4696,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 32768L) != 0)) { - _ContentLocation = AppendValue(_ContentLocation, value); + _headers._ContentLocation = AppendValue(_headers._ContentLocation, value); } else { _bits |= 32768L; - _ContentLocation = new StringValues(value); + _headers._ContentLocation = new StringValues(value); } return; } @@ -4757,12 +4714,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 65536L) != 0)) { - _ContentMD5 = AppendValue(_ContentMD5, value); + _headers._ContentMD5 = AppendValue(_headers._ContentMD5, value); } else { _bits |= 65536L; - _ContentMD5 = new StringValues(value); + _headers._ContentMD5 = new StringValues(value); } return; } @@ -4775,12 +4732,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 4194304L) != 0)) { - _AcceptEncoding = AppendValue(_AcceptEncoding, value); + _headers._AcceptEncoding = AppendValue(_headers._AcceptEncoding, value); } else { _bits |= 4194304L; - _AcceptEncoding = new StringValues(value); + _headers._AcceptEncoding = new StringValues(value); } return; } @@ -4789,12 +4746,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 8388608L) != 0)) { - _AcceptLanguage = AppendValue(_AcceptLanguage, value); + _headers._AcceptLanguage = AppendValue(_headers._AcceptLanguage, value); } else { _bits |= 8388608L; - _AcceptLanguage = new StringValues(value); + _headers._AcceptLanguage = new StringValues(value); } return; } @@ -4807,12 +4764,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 536870912L) != 0)) { - _IfMatch = AppendValue(_IfMatch, value); + _headers._IfMatch = AppendValue(_headers._IfMatch, value); } else { _bits |= 536870912L; - _IfMatch = new StringValues(value); + _headers._IfMatch = new StringValues(value); } return; } @@ -4821,12 +4778,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 4294967296L) != 0)) { - _IfRange = AppendValue(_IfRange, value); + _headers._IfRange = AppendValue(_headers._IfRange, value); } else { _bits |= 4294967296L; - _IfRange = new StringValues(value); + _headers._IfRange = new StringValues(value); } return; } @@ -4839,12 +4796,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 8589934592L) != 0)) { - _IfUnmodifiedSince = AppendValue(_IfUnmodifiedSince, value); + _headers._IfUnmodifiedSince = AppendValue(_headers._IfUnmodifiedSince, value); } else { _bits |= 8589934592L; - _IfUnmodifiedSince = new StringValues(value); + _headers._IfUnmodifiedSince = new StringValues(value); } return; } @@ -4853,12 +4810,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 34359738368L) != 0)) { - _ProxyAuthorization = AppendValue(_ProxyAuthorization, value); + _headers._ProxyAuthorization = AppendValue(_headers._ProxyAuthorization, value); } else { _bits |= 34359738368L; - _ProxyAuthorization = new StringValues(value); + _headers._ProxyAuthorization = new StringValues(value); } return; } @@ -4871,12 +4828,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 274877906944L) != 0)) { - _TE = AppendValue(_TE, value); + _headers._TE = AppendValue(_headers._TE, value); } else { _bits |= 274877906944L; - _TE = new StringValues(value); + _headers._TE = new StringValues(value); } return; } @@ -4889,12 +4846,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 549755813888L) != 0)) { - _Translate = AppendValue(_Translate, value); + _headers._Translate = AppendValue(_headers._Translate, value); } else { _bits |= 549755813888L; - _Translate = new StringValues(value); + _headers._Translate = new StringValues(value); } return; } @@ -4907,12 +4864,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 4398046511104L) != 0)) { - _AccessControlRequestMethod = AppendValue(_AccessControlRequestMethod, value); + _headers._AccessControlRequestMethod = AppendValue(_headers._AccessControlRequestMethod, value); } else { _bits |= 4398046511104L; - _AccessControlRequestMethod = new StringValues(value); + _headers._AccessControlRequestMethod = new StringValues(value); } return; } @@ -4925,12 +4882,12 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string { if (((_bits & 8796093022208L) != 0)) { - _AccessControlRequestHeaders = AppendValue(_AccessControlRequestHeaders, value); + _headers._AccessControlRequestHeaders = AppendValue(_headers._AccessControlRequestHeaders, value); } else { _bits |= 8796093022208L; - _AccessControlRequestHeaders = new StringValues(value); + _headers._AccessControlRequestHeaders = new StringValues(value); } return; } @@ -4943,6 +4900,55 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string Unknown.TryGetValue(key, out existing); Unknown[key] = AppendValue(existing, value); } + private struct HeaderReferences + { + public StringValues _CacheControl; + public StringValues _Connection; + public StringValues _Date; + public StringValues _KeepAlive; + public StringValues _Pragma; + public StringValues _Trailer; + public StringValues _TransferEncoding; + public StringValues _Upgrade; + public StringValues _Via; + public StringValues _Warning; + public StringValues _Allow; + public StringValues _ContentLength; + public StringValues _ContentType; + public StringValues _ContentEncoding; + public StringValues _ContentLanguage; + public StringValues _ContentLocation; + public StringValues _ContentMD5; + public StringValues _ContentRange; + public StringValues _Expires; + public StringValues _LastModified; + public StringValues _Accept; + public StringValues _AcceptCharset; + public StringValues _AcceptEncoding; + public StringValues _AcceptLanguage; + public StringValues _Authorization; + public StringValues _Cookie; + public StringValues _Expect; + public StringValues _From; + public StringValues _Host; + public StringValues _IfMatch; + public StringValues _IfModifiedSince; + public StringValues _IfNoneMatch; + public StringValues _IfRange; + public StringValues _IfUnmodifiedSince; + public StringValues _MaxForwards; + public StringValues _ProxyAuthorization; + public StringValues _Referer; + public StringValues _Range; + public StringValues _TE; + public StringValues _Translate; + public StringValues _UserAgent; + public StringValues _Origin; + public StringValues _AccessControlRequestMethod; + public StringValues _AccessControlRequestHeaders; + + } + public partial struct Enumerator { public bool MoveNext() @@ -5089,7 +5095,7 @@ public bool MoveNext() state0: if (((_bits & 1L) != 0)) { - _current = new KeyValuePair("Cache-Control", _collection._CacheControl); + _current = new KeyValuePair("Cache-Control", _collection._headers._CacheControl); _state = 1; return true; } @@ -5097,7 +5103,7 @@ public bool MoveNext() state1: if (((_bits & 2L) != 0)) { - _current = new KeyValuePair("Connection", _collection._Connection); + _current = new KeyValuePair("Connection", _collection._headers._Connection); _state = 2; return true; } @@ -5105,7 +5111,7 @@ public bool MoveNext() state2: if (((_bits & 4L) != 0)) { - _current = new KeyValuePair("Date", _collection._Date); + _current = new KeyValuePair("Date", _collection._headers._Date); _state = 3; return true; } @@ -5113,7 +5119,7 @@ public bool MoveNext() state3: if (((_bits & 8L) != 0)) { - _current = new KeyValuePair("Keep-Alive", _collection._KeepAlive); + _current = new KeyValuePair("Keep-Alive", _collection._headers._KeepAlive); _state = 4; return true; } @@ -5121,7 +5127,7 @@ public bool MoveNext() state4: if (((_bits & 16L) != 0)) { - _current = new KeyValuePair("Pragma", _collection._Pragma); + _current = new KeyValuePair("Pragma", _collection._headers._Pragma); _state = 5; return true; } @@ -5129,7 +5135,7 @@ public bool MoveNext() state5: if (((_bits & 32L) != 0)) { - _current = new KeyValuePair("Trailer", _collection._Trailer); + _current = new KeyValuePair("Trailer", _collection._headers._Trailer); _state = 6; return true; } @@ -5137,7 +5143,7 @@ public bool MoveNext() state6: if (((_bits & 64L) != 0)) { - _current = new KeyValuePair("Transfer-Encoding", _collection._TransferEncoding); + _current = new KeyValuePair("Transfer-Encoding", _collection._headers._TransferEncoding); _state = 7; return true; } @@ -5145,7 +5151,7 @@ public bool MoveNext() state7: if (((_bits & 128L) != 0)) { - _current = new KeyValuePair("Upgrade", _collection._Upgrade); + _current = new KeyValuePair("Upgrade", _collection._headers._Upgrade); _state = 8; return true; } @@ -5153,7 +5159,7 @@ public bool MoveNext() state8: if (((_bits & 256L) != 0)) { - _current = new KeyValuePair("Via", _collection._Via); + _current = new KeyValuePair("Via", _collection._headers._Via); _state = 9; return true; } @@ -5161,7 +5167,7 @@ public bool MoveNext() state9: if (((_bits & 512L) != 0)) { - _current = new KeyValuePair("Warning", _collection._Warning); + _current = new KeyValuePair("Warning", _collection._headers._Warning); _state = 10; return true; } @@ -5169,7 +5175,7 @@ public bool MoveNext() state10: if (((_bits & 1024L) != 0)) { - _current = new KeyValuePair("Allow", _collection._Allow); + _current = new KeyValuePair("Allow", _collection._headers._Allow); _state = 11; return true; } @@ -5177,7 +5183,7 @@ public bool MoveNext() state11: if (((_bits & 2048L) != 0)) { - _current = new KeyValuePair("Content-Length", _collection._ContentLength); + _current = new KeyValuePair("Content-Length", _collection._headers._ContentLength); _state = 12; return true; } @@ -5185,7 +5191,7 @@ public bool MoveNext() state12: if (((_bits & 4096L) != 0)) { - _current = new KeyValuePair("Content-Type", _collection._ContentType); + _current = new KeyValuePair("Content-Type", _collection._headers._ContentType); _state = 13; return true; } @@ -5193,7 +5199,7 @@ public bool MoveNext() state13: if (((_bits & 8192L) != 0)) { - _current = new KeyValuePair("Content-Encoding", _collection._ContentEncoding); + _current = new KeyValuePair("Content-Encoding", _collection._headers._ContentEncoding); _state = 14; return true; } @@ -5201,7 +5207,7 @@ public bool MoveNext() state14: if (((_bits & 16384L) != 0)) { - _current = new KeyValuePair("Content-Language", _collection._ContentLanguage); + _current = new KeyValuePair("Content-Language", _collection._headers._ContentLanguage); _state = 15; return true; } @@ -5209,7 +5215,7 @@ public bool MoveNext() state15: if (((_bits & 32768L) != 0)) { - _current = new KeyValuePair("Content-Location", _collection._ContentLocation); + _current = new KeyValuePair("Content-Location", _collection._headers._ContentLocation); _state = 16; return true; } @@ -5217,7 +5223,7 @@ public bool MoveNext() state16: if (((_bits & 65536L) != 0)) { - _current = new KeyValuePair("Content-MD5", _collection._ContentMD5); + _current = new KeyValuePair("Content-MD5", _collection._headers._ContentMD5); _state = 17; return true; } @@ -5225,7 +5231,7 @@ public bool MoveNext() state17: if (((_bits & 131072L) != 0)) { - _current = new KeyValuePair("Content-Range", _collection._ContentRange); + _current = new KeyValuePair("Content-Range", _collection._headers._ContentRange); _state = 18; return true; } @@ -5233,7 +5239,7 @@ public bool MoveNext() state18: if (((_bits & 262144L) != 0)) { - _current = new KeyValuePair("Expires", _collection._Expires); + _current = new KeyValuePair("Expires", _collection._headers._Expires); _state = 19; return true; } @@ -5241,7 +5247,7 @@ public bool MoveNext() state19: if (((_bits & 524288L) != 0)) { - _current = new KeyValuePair("Last-Modified", _collection._LastModified); + _current = new KeyValuePair("Last-Modified", _collection._headers._LastModified); _state = 20; return true; } @@ -5249,7 +5255,7 @@ public bool MoveNext() state20: if (((_bits & 1048576L) != 0)) { - _current = new KeyValuePair("Accept", _collection._Accept); + _current = new KeyValuePair("Accept", _collection._headers._Accept); _state = 21; return true; } @@ -5257,7 +5263,7 @@ public bool MoveNext() state21: if (((_bits & 2097152L) != 0)) { - _current = new KeyValuePair("Accept-Charset", _collection._AcceptCharset); + _current = new KeyValuePair("Accept-Charset", _collection._headers._AcceptCharset); _state = 22; return true; } @@ -5265,7 +5271,7 @@ public bool MoveNext() state22: if (((_bits & 4194304L) != 0)) { - _current = new KeyValuePair("Accept-Encoding", _collection._AcceptEncoding); + _current = new KeyValuePair("Accept-Encoding", _collection._headers._AcceptEncoding); _state = 23; return true; } @@ -5273,7 +5279,7 @@ public bool MoveNext() state23: if (((_bits & 8388608L) != 0)) { - _current = new KeyValuePair("Accept-Language", _collection._AcceptLanguage); + _current = new KeyValuePair("Accept-Language", _collection._headers._AcceptLanguage); _state = 24; return true; } @@ -5281,7 +5287,7 @@ public bool MoveNext() state24: if (((_bits & 16777216L) != 0)) { - _current = new KeyValuePair("Authorization", _collection._Authorization); + _current = new KeyValuePair("Authorization", _collection._headers._Authorization); _state = 25; return true; } @@ -5289,7 +5295,7 @@ public bool MoveNext() state25: if (((_bits & 33554432L) != 0)) { - _current = new KeyValuePair("Cookie", _collection._Cookie); + _current = new KeyValuePair("Cookie", _collection._headers._Cookie); _state = 26; return true; } @@ -5297,7 +5303,7 @@ public bool MoveNext() state26: if (((_bits & 67108864L) != 0)) { - _current = new KeyValuePair("Expect", _collection._Expect); + _current = new KeyValuePair("Expect", _collection._headers._Expect); _state = 27; return true; } @@ -5305,7 +5311,7 @@ public bool MoveNext() state27: if (((_bits & 134217728L) != 0)) { - _current = new KeyValuePair("From", _collection._From); + _current = new KeyValuePair("From", _collection._headers._From); _state = 28; return true; } @@ -5313,7 +5319,7 @@ public bool MoveNext() state28: if (((_bits & 268435456L) != 0)) { - _current = new KeyValuePair("Host", _collection._Host); + _current = new KeyValuePair("Host", _collection._headers._Host); _state = 29; return true; } @@ -5321,7 +5327,7 @@ public bool MoveNext() state29: if (((_bits & 536870912L) != 0)) { - _current = new KeyValuePair("If-Match", _collection._IfMatch); + _current = new KeyValuePair("If-Match", _collection._headers._IfMatch); _state = 30; return true; } @@ -5329,7 +5335,7 @@ public bool MoveNext() state30: if (((_bits & 1073741824L) != 0)) { - _current = new KeyValuePair("If-Modified-Since", _collection._IfModifiedSince); + _current = new KeyValuePair("If-Modified-Since", _collection._headers._IfModifiedSince); _state = 31; return true; } @@ -5337,7 +5343,7 @@ public bool MoveNext() state31: if (((_bits & 2147483648L) != 0)) { - _current = new KeyValuePair("If-None-Match", _collection._IfNoneMatch); + _current = new KeyValuePair("If-None-Match", _collection._headers._IfNoneMatch); _state = 32; return true; } @@ -5345,7 +5351,7 @@ public bool MoveNext() state32: if (((_bits & 4294967296L) != 0)) { - _current = new KeyValuePair("If-Range", _collection._IfRange); + _current = new KeyValuePair("If-Range", _collection._headers._IfRange); _state = 33; return true; } @@ -5353,7 +5359,7 @@ public bool MoveNext() state33: if (((_bits & 8589934592L) != 0)) { - _current = new KeyValuePair("If-Unmodified-Since", _collection._IfUnmodifiedSince); + _current = new KeyValuePair("If-Unmodified-Since", _collection._headers._IfUnmodifiedSince); _state = 34; return true; } @@ -5361,7 +5367,7 @@ public bool MoveNext() state34: if (((_bits & 17179869184L) != 0)) { - _current = new KeyValuePair("Max-Forwards", _collection._MaxForwards); + _current = new KeyValuePair("Max-Forwards", _collection._headers._MaxForwards); _state = 35; return true; } @@ -5369,7 +5375,7 @@ public bool MoveNext() state35: if (((_bits & 34359738368L) != 0)) { - _current = new KeyValuePair("Proxy-Authorization", _collection._ProxyAuthorization); + _current = new KeyValuePair("Proxy-Authorization", _collection._headers._ProxyAuthorization); _state = 36; return true; } @@ -5377,7 +5383,7 @@ public bool MoveNext() state36: if (((_bits & 68719476736L) != 0)) { - _current = new KeyValuePair("Referer", _collection._Referer); + _current = new KeyValuePair("Referer", _collection._headers._Referer); _state = 37; return true; } @@ -5385,7 +5391,7 @@ public bool MoveNext() state37: if (((_bits & 137438953472L) != 0)) { - _current = new KeyValuePair("Range", _collection._Range); + _current = new KeyValuePair("Range", _collection._headers._Range); _state = 38; return true; } @@ -5393,7 +5399,7 @@ public bool MoveNext() state38: if (((_bits & 274877906944L) != 0)) { - _current = new KeyValuePair("TE", _collection._TE); + _current = new KeyValuePair("TE", _collection._headers._TE); _state = 39; return true; } @@ -5401,7 +5407,7 @@ public bool MoveNext() state39: if (((_bits & 549755813888L) != 0)) { - _current = new KeyValuePair("Translate", _collection._Translate); + _current = new KeyValuePair("Translate", _collection._headers._Translate); _state = 40; return true; } @@ -5409,7 +5415,7 @@ public bool MoveNext() state40: if (((_bits & 1099511627776L) != 0)) { - _current = new KeyValuePair("User-Agent", _collection._UserAgent); + _current = new KeyValuePair("User-Agent", _collection._headers._UserAgent); _state = 41; return true; } @@ -5417,7 +5423,7 @@ public bool MoveNext() state41: if (((_bits & 2199023255552L) != 0)) { - _current = new KeyValuePair("Origin", _collection._Origin); + _current = new KeyValuePair("Origin", _collection._headers._Origin); _state = 42; return true; } @@ -5425,7 +5431,7 @@ public bool MoveNext() state42: if (((_bits & 4398046511104L) != 0)) { - _current = new KeyValuePair("Access-Control-Request-Method", _collection._AccessControlRequestMethod); + _current = new KeyValuePair("Access-Control-Request-Method", _collection._headers._AccessControlRequestMethod); _state = 43; return true; } @@ -5433,7 +5439,7 @@ public bool MoveNext() state43: if (((_bits & 8796093022208L) != 0)) { - _current = new KeyValuePair("Access-Control-Request-Headers", _collection._AccessControlRequestHeaders); + _current = new KeyValuePair("Access-Control-Request-Headers", _collection._headers._AccessControlRequestHeaders); _state = 44; return true; } @@ -5458,49 +5464,7 @@ public partial class FrameResponseHeaders }; private long _bits = 0; - - private StringValues _CacheControl; - private StringValues _Connection; - private StringValues _Date; - private StringValues _KeepAlive; - private StringValues _Pragma; - private StringValues _Trailer; - private StringValues _TransferEncoding; - private StringValues _Upgrade; - private StringValues _Via; - private StringValues _Warning; - private StringValues _Allow; - private StringValues _ContentLength; - private StringValues _ContentType; - private StringValues _ContentEncoding; - private StringValues _ContentLanguage; - private StringValues _ContentLocation; - private StringValues _ContentMD5; - private StringValues _ContentRange; - private StringValues _Expires; - private StringValues _LastModified; - private StringValues _AcceptRanges; - private StringValues _Age; - private StringValues _ETag; - private StringValues _Location; - private StringValues _ProxyAutheticate; - private StringValues _RetryAfter; - private StringValues _Server; - private StringValues _SetCookie; - private StringValues _Vary; - private StringValues _WWWAuthenticate; - private StringValues _AccessControlAllowCredentials; - private StringValues _AccessControlAllowHeaders; - private StringValues _AccessControlAllowMethods; - private StringValues _AccessControlAllowOrigin; - private StringValues _AccessControlExposeHeaders; - private StringValues _AccessControlMaxAge; - - private byte[] _rawConnection; - private byte[] _rawDate; - private byte[] _rawTransferEncoding; - private byte[] _rawContentLength; - private byte[] _rawServer; + private HeaderReferences _headers; public StringValues HeaderCacheControl { @@ -5508,14 +5472,14 @@ public StringValues HeaderCacheControl { if (((_bits & 1L) != 0)) { - return _CacheControl; + return _headers._CacheControl; } return StringValues.Empty; } set { _bits |= 1L; - _CacheControl = value; + _headers._CacheControl = value; } } public StringValues HeaderConnection @@ -5524,15 +5488,15 @@ public StringValues HeaderConnection { if (((_bits & 2L) != 0)) { - return _Connection; + return _headers._Connection; } return StringValues.Empty; } set { _bits |= 2L; - _Connection = value; - _rawConnection = null; + _headers._Connection = value; + _headers._rawConnection = null; } } public StringValues HeaderDate @@ -5541,15 +5505,15 @@ public StringValues HeaderDate { if (((_bits & 4L) != 0)) { - return _Date; + return _headers._Date; } return StringValues.Empty; } set { _bits |= 4L; - _Date = value; - _rawDate = null; + _headers._Date = value; + _headers._rawDate = null; } } public StringValues HeaderKeepAlive @@ -5558,14 +5522,14 @@ public StringValues HeaderKeepAlive { if (((_bits & 8L) != 0)) { - return _KeepAlive; + return _headers._KeepAlive; } return StringValues.Empty; } set { _bits |= 8L; - _KeepAlive = value; + _headers._KeepAlive = value; } } public StringValues HeaderPragma @@ -5574,14 +5538,14 @@ public StringValues HeaderPragma { if (((_bits & 16L) != 0)) { - return _Pragma; + return _headers._Pragma; } return StringValues.Empty; } set { _bits |= 16L; - _Pragma = value; + _headers._Pragma = value; } } public StringValues HeaderTrailer @@ -5590,14 +5554,14 @@ public StringValues HeaderTrailer { if (((_bits & 32L) != 0)) { - return _Trailer; + return _headers._Trailer; } return StringValues.Empty; } set { _bits |= 32L; - _Trailer = value; + _headers._Trailer = value; } } public StringValues HeaderTransferEncoding @@ -5606,15 +5570,15 @@ public StringValues HeaderTransferEncoding { if (((_bits & 64L) != 0)) { - return _TransferEncoding; + return _headers._TransferEncoding; } return StringValues.Empty; } set { _bits |= 64L; - _TransferEncoding = value; - _rawTransferEncoding = null; + _headers._TransferEncoding = value; + _headers._rawTransferEncoding = null; } } public StringValues HeaderUpgrade @@ -5623,14 +5587,14 @@ public StringValues HeaderUpgrade { if (((_bits & 128L) != 0)) { - return _Upgrade; + return _headers._Upgrade; } return StringValues.Empty; } set { _bits |= 128L; - _Upgrade = value; + _headers._Upgrade = value; } } public StringValues HeaderVia @@ -5639,14 +5603,14 @@ public StringValues HeaderVia { if (((_bits & 256L) != 0)) { - return _Via; + return _headers._Via; } return StringValues.Empty; } set { _bits |= 256L; - _Via = value; + _headers._Via = value; } } public StringValues HeaderWarning @@ -5655,14 +5619,14 @@ public StringValues HeaderWarning { if (((_bits & 512L) != 0)) { - return _Warning; + return _headers._Warning; } return StringValues.Empty; } set { _bits |= 512L; - _Warning = value; + _headers._Warning = value; } } public StringValues HeaderAllow @@ -5671,14 +5635,14 @@ public StringValues HeaderAllow { if (((_bits & 1024L) != 0)) { - return _Allow; + return _headers._Allow; } return StringValues.Empty; } set { _bits |= 1024L; - _Allow = value; + _headers._Allow = value; } } public StringValues HeaderContentLength @@ -5687,15 +5651,15 @@ public StringValues HeaderContentLength { if (((_bits & 2048L) != 0)) { - return _ContentLength; + return _headers._ContentLength; } return StringValues.Empty; } set { _bits |= 2048L; - _ContentLength = value; - _rawContentLength = null; + _headers._ContentLength = value; + _headers._rawContentLength = null; } } public StringValues HeaderContentType @@ -5704,14 +5668,14 @@ public StringValues HeaderContentType { if (((_bits & 4096L) != 0)) { - return _ContentType; + return _headers._ContentType; } return StringValues.Empty; } set { _bits |= 4096L; - _ContentType = value; + _headers._ContentType = value; } } public StringValues HeaderContentEncoding @@ -5720,14 +5684,14 @@ public StringValues HeaderContentEncoding { if (((_bits & 8192L) != 0)) { - return _ContentEncoding; + return _headers._ContentEncoding; } return StringValues.Empty; } set { _bits |= 8192L; - _ContentEncoding = value; + _headers._ContentEncoding = value; } } public StringValues HeaderContentLanguage @@ -5736,14 +5700,14 @@ public StringValues HeaderContentLanguage { if (((_bits & 16384L) != 0)) { - return _ContentLanguage; + return _headers._ContentLanguage; } return StringValues.Empty; } set { _bits |= 16384L; - _ContentLanguage = value; + _headers._ContentLanguage = value; } } public StringValues HeaderContentLocation @@ -5752,14 +5716,14 @@ public StringValues HeaderContentLocation { if (((_bits & 32768L) != 0)) { - return _ContentLocation; + return _headers._ContentLocation; } return StringValues.Empty; } set { _bits |= 32768L; - _ContentLocation = value; + _headers._ContentLocation = value; } } public StringValues HeaderContentMD5 @@ -5768,14 +5732,14 @@ public StringValues HeaderContentMD5 { if (((_bits & 65536L) != 0)) { - return _ContentMD5; + return _headers._ContentMD5; } return StringValues.Empty; } set { _bits |= 65536L; - _ContentMD5 = value; + _headers._ContentMD5 = value; } } public StringValues HeaderContentRange @@ -5784,14 +5748,14 @@ public StringValues HeaderContentRange { if (((_bits & 131072L) != 0)) { - return _ContentRange; + return _headers._ContentRange; } return StringValues.Empty; } set { _bits |= 131072L; - _ContentRange = value; + _headers._ContentRange = value; } } public StringValues HeaderExpires @@ -5800,14 +5764,14 @@ public StringValues HeaderExpires { if (((_bits & 262144L) != 0)) { - return _Expires; + return _headers._Expires; } return StringValues.Empty; } set { _bits |= 262144L; - _Expires = value; + _headers._Expires = value; } } public StringValues HeaderLastModified @@ -5816,14 +5780,14 @@ public StringValues HeaderLastModified { if (((_bits & 524288L) != 0)) { - return _LastModified; + return _headers._LastModified; } return StringValues.Empty; } set { _bits |= 524288L; - _LastModified = value; + _headers._LastModified = value; } } public StringValues HeaderAcceptRanges @@ -5832,14 +5796,14 @@ public StringValues HeaderAcceptRanges { if (((_bits & 1048576L) != 0)) { - return _AcceptRanges; + return _headers._AcceptRanges; } return StringValues.Empty; } set { _bits |= 1048576L; - _AcceptRanges = value; + _headers._AcceptRanges = value; } } public StringValues HeaderAge @@ -5848,14 +5812,14 @@ public StringValues HeaderAge { if (((_bits & 2097152L) != 0)) { - return _Age; + return _headers._Age; } return StringValues.Empty; } set { _bits |= 2097152L; - _Age = value; + _headers._Age = value; } } public StringValues HeaderETag @@ -5864,14 +5828,14 @@ public StringValues HeaderETag { if (((_bits & 4194304L) != 0)) { - return _ETag; + return _headers._ETag; } return StringValues.Empty; } set { _bits |= 4194304L; - _ETag = value; + _headers._ETag = value; } } public StringValues HeaderLocation @@ -5880,14 +5844,14 @@ public StringValues HeaderLocation { if (((_bits & 8388608L) != 0)) { - return _Location; + return _headers._Location; } return StringValues.Empty; } set { _bits |= 8388608L; - _Location = value; + _headers._Location = value; } } public StringValues HeaderProxyAutheticate @@ -5896,14 +5860,14 @@ public StringValues HeaderProxyAutheticate { if (((_bits & 16777216L) != 0)) { - return _ProxyAutheticate; + return _headers._ProxyAutheticate; } return StringValues.Empty; } set { _bits |= 16777216L; - _ProxyAutheticate = value; + _headers._ProxyAutheticate = value; } } public StringValues HeaderRetryAfter @@ -5912,14 +5876,14 @@ public StringValues HeaderRetryAfter { if (((_bits & 33554432L) != 0)) { - return _RetryAfter; + return _headers._RetryAfter; } return StringValues.Empty; } set { _bits |= 33554432L; - _RetryAfter = value; + _headers._RetryAfter = value; } } public StringValues HeaderServer @@ -5928,15 +5892,15 @@ public StringValues HeaderServer { if (((_bits & 67108864L) != 0)) { - return _Server; + return _headers._Server; } return StringValues.Empty; } set { _bits |= 67108864L; - _Server = value; - _rawServer = null; + _headers._Server = value; + _headers._rawServer = null; } } public StringValues HeaderSetCookie @@ -5945,14 +5909,14 @@ public StringValues HeaderSetCookie { if (((_bits & 134217728L) != 0)) { - return _SetCookie; + return _headers._SetCookie; } return StringValues.Empty; } set { _bits |= 134217728L; - _SetCookie = value; + _headers._SetCookie = value; } } public StringValues HeaderVary @@ -5961,14 +5925,14 @@ public StringValues HeaderVary { if (((_bits & 268435456L) != 0)) { - return _Vary; + return _headers._Vary; } return StringValues.Empty; } set { _bits |= 268435456L; - _Vary = value; + _headers._Vary = value; } } public StringValues HeaderWWWAuthenticate @@ -5977,14 +5941,14 @@ public StringValues HeaderWWWAuthenticate { if (((_bits & 536870912L) != 0)) { - return _WWWAuthenticate; + return _headers._WWWAuthenticate; } return StringValues.Empty; } set { _bits |= 536870912L; - _WWWAuthenticate = value; + _headers._WWWAuthenticate = value; } } public StringValues HeaderAccessControlAllowCredentials @@ -5993,14 +5957,14 @@ public StringValues HeaderAccessControlAllowCredentials { if (((_bits & 1073741824L) != 0)) { - return _AccessControlAllowCredentials; + return _headers._AccessControlAllowCredentials; } return StringValues.Empty; } set { _bits |= 1073741824L; - _AccessControlAllowCredentials = value; + _headers._AccessControlAllowCredentials = value; } } public StringValues HeaderAccessControlAllowHeaders @@ -6009,14 +5973,14 @@ public StringValues HeaderAccessControlAllowHeaders { if (((_bits & 2147483648L) != 0)) { - return _AccessControlAllowHeaders; + return _headers._AccessControlAllowHeaders; } return StringValues.Empty; } set { _bits |= 2147483648L; - _AccessControlAllowHeaders = value; + _headers._AccessControlAllowHeaders = value; } } public StringValues HeaderAccessControlAllowMethods @@ -6025,14 +5989,14 @@ public StringValues HeaderAccessControlAllowMethods { if (((_bits & 4294967296L) != 0)) { - return _AccessControlAllowMethods; + return _headers._AccessControlAllowMethods; } return StringValues.Empty; } set { _bits |= 4294967296L; - _AccessControlAllowMethods = value; + _headers._AccessControlAllowMethods = value; } } public StringValues HeaderAccessControlAllowOrigin @@ -6041,14 +6005,14 @@ public StringValues HeaderAccessControlAllowOrigin { if (((_bits & 8589934592L) != 0)) { - return _AccessControlAllowOrigin; + return _headers._AccessControlAllowOrigin; } return StringValues.Empty; } set { _bits |= 8589934592L; - _AccessControlAllowOrigin = value; + _headers._AccessControlAllowOrigin = value; } } public StringValues HeaderAccessControlExposeHeaders @@ -6057,14 +6021,14 @@ public StringValues HeaderAccessControlExposeHeaders { if (((_bits & 17179869184L) != 0)) { - return _AccessControlExposeHeaders; + return _headers._AccessControlExposeHeaders; } return StringValues.Empty; } set { _bits |= 17179869184L; - _AccessControlExposeHeaders = value; + _headers._AccessControlExposeHeaders = value; } } public StringValues HeaderAccessControlMaxAge @@ -6073,46 +6037,46 @@ public StringValues HeaderAccessControlMaxAge { if (((_bits & 34359738368L) != 0)) { - return _AccessControlMaxAge; + return _headers._AccessControlMaxAge; } return StringValues.Empty; } set { _bits |= 34359738368L; - _AccessControlMaxAge = value; + _headers._AccessControlMaxAge = value; } } public void SetRawConnection(StringValues value, byte[] raw) { _bits |= 2L; - _Connection = value; - _rawConnection = raw; + _headers._Connection = value; + _headers._rawConnection = raw; } public void SetRawDate(StringValues value, byte[] raw) { _bits |= 4L; - _Date = value; - _rawDate = raw; + _headers._Date = value; + _headers._rawDate = raw; } public void SetRawTransferEncoding(StringValues value, byte[] raw) { _bits |= 64L; - _TransferEncoding = value; - _rawTransferEncoding = raw; + _headers._TransferEncoding = value; + _headers._rawTransferEncoding = raw; } public void SetRawContentLength(StringValues value, byte[] raw) { _bits |= 2048L; - _ContentLength = value; - _rawContentLength = raw; + _headers._ContentLength = value; + _headers._rawContentLength = raw; } public void SetRawServer(StringValues value, byte[] raw) { _bits |= 67108864L; - _Server = value; - _rawServer = raw; + _headers._Server = value; + _headers._rawServer = raw; } protected override int GetCountFast() { @@ -6128,11 +6092,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 1L) != 0)) { - return _CacheControl; + return _headers._CacheControl; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -6140,11 +6104,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 131072L) != 0)) { - return _ContentRange; + return _headers._ContentRange; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -6152,11 +6116,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 524288L) != 0)) { - return _LastModified; + return _headers._LastModified; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -6164,11 +6128,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 1048576L) != 0)) { - return _AcceptRanges; + return _headers._AcceptRanges; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -6180,11 +6144,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 2L) != 0)) { - return _Connection; + return _headers._Connection; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -6192,11 +6156,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 8L) != 0)) { - return _KeepAlive; + return _headers._KeepAlive; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -6204,11 +6168,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 134217728L) != 0)) { - return _SetCookie; + return _headers._SetCookie; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -6220,11 +6184,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 4L) != 0)) { - return _Date; + return _headers._Date; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -6232,11 +6196,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 4194304L) != 0)) { - return _ETag; + return _headers._ETag; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -6244,11 +6208,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 268435456L) != 0)) { - return _Vary; + return _headers._Vary; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -6260,11 +6224,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 16L) != 0)) { - return _Pragma; + return _headers._Pragma; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -6272,11 +6236,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 67108864L) != 0)) { - return _Server; + return _headers._Server; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -6288,11 +6252,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 32L) != 0)) { - return _Trailer; + return _headers._Trailer; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -6300,11 +6264,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 128L) != 0)) { - return _Upgrade; + return _headers._Upgrade; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -6312,11 +6276,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 512L) != 0)) { - return _Warning; + return _headers._Warning; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -6324,11 +6288,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 262144L) != 0)) { - return _Expires; + return _headers._Expires; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -6340,11 +6304,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 64L) != 0)) { - return _TransferEncoding; + return _headers._TransferEncoding; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -6352,11 +6316,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 16777216L) != 0)) { - return _ProxyAutheticate; + return _headers._ProxyAutheticate; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -6368,11 +6332,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 256L) != 0)) { - return _Via; + return _headers._Via; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -6380,11 +6344,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 2097152L) != 0)) { - return _Age; + return _headers._Age; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -6396,11 +6360,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 1024L) != 0)) { - return _Allow; + return _headers._Allow; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -6412,11 +6376,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 2048L) != 0)) { - return _ContentLength; + return _headers._ContentLength; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -6428,11 +6392,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 4096L) != 0)) { - return _ContentType; + return _headers._ContentType; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -6444,11 +6408,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 8192L) != 0)) { - return _ContentEncoding; + return _headers._ContentEncoding; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -6456,11 +6420,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 16384L) != 0)) { - return _ContentLanguage; + return _headers._ContentLanguage; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -6468,11 +6432,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 32768L) != 0)) { - return _ContentLocation; + return _headers._ContentLocation; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -6480,11 +6444,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 536870912L) != 0)) { - return _WWWAuthenticate; + return _headers._WWWAuthenticate; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -6496,11 +6460,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 65536L) != 0)) { - return _ContentMD5; + return _headers._ContentMD5; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -6508,11 +6472,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 33554432L) != 0)) { - return _RetryAfter; + return _headers._RetryAfter; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -6524,11 +6488,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 8388608L) != 0)) { - return _Location; + return _headers._Location; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -6540,11 +6504,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 1073741824L) != 0)) { - return _AccessControlAllowCredentials; + return _headers._AccessControlAllowCredentials; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -6556,11 +6520,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 2147483648L) != 0)) { - return _AccessControlAllowHeaders; + return _headers._AccessControlAllowHeaders; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } @@ -6568,11 +6532,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 4294967296L) != 0)) { - return _AccessControlAllowMethods; + return _headers._AccessControlAllowMethods; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -6584,11 +6548,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 8589934592L) != 0)) { - return _AccessControlAllowOrigin; + return _headers._AccessControlAllowOrigin; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -6600,11 +6564,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 17179869184L) != 0)) { - return _AccessControlExposeHeaders; + return _headers._AccessControlExposeHeaders; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -6616,11 +6580,11 @@ protected override StringValues GetValueFast(string key) { if (((_bits & 34359738368L) != 0)) { - return _AccessControlMaxAge; + return _headers._AccessControlMaxAge; } else { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } } } @@ -6628,7 +6592,7 @@ protected override StringValues GetValueFast(string key) } if (MaybeUnknown == null) { - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); } return MaybeUnknown[key]; } @@ -6642,7 +6606,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 1L) != 0)) { - value = _CacheControl; + value = _headers._CacheControl; return true; } else @@ -6656,7 +6620,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 131072L) != 0)) { - value = _ContentRange; + value = _headers._ContentRange; return true; } else @@ -6670,7 +6634,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 524288L) != 0)) { - value = _LastModified; + value = _headers._LastModified; return true; } else @@ -6684,7 +6648,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 1048576L) != 0)) { - value = _AcceptRanges; + value = _headers._AcceptRanges; return true; } else @@ -6702,7 +6666,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 2L) != 0)) { - value = _Connection; + value = _headers._Connection; return true; } else @@ -6716,7 +6680,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 8L) != 0)) { - value = _KeepAlive; + value = _headers._KeepAlive; return true; } else @@ -6730,7 +6694,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 134217728L) != 0)) { - value = _SetCookie; + value = _headers._SetCookie; return true; } else @@ -6748,7 +6712,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 4L) != 0)) { - value = _Date; + value = _headers._Date; return true; } else @@ -6762,7 +6726,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 4194304L) != 0)) { - value = _ETag; + value = _headers._ETag; return true; } else @@ -6776,7 +6740,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 268435456L) != 0)) { - value = _Vary; + value = _headers._Vary; return true; } else @@ -6794,7 +6758,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 16L) != 0)) { - value = _Pragma; + value = _headers._Pragma; return true; } else @@ -6808,7 +6772,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 67108864L) != 0)) { - value = _Server; + value = _headers._Server; return true; } else @@ -6826,7 +6790,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 32L) != 0)) { - value = _Trailer; + value = _headers._Trailer; return true; } else @@ -6840,7 +6804,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 128L) != 0)) { - value = _Upgrade; + value = _headers._Upgrade; return true; } else @@ -6854,7 +6818,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 512L) != 0)) { - value = _Warning; + value = _headers._Warning; return true; } else @@ -6868,7 +6832,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 262144L) != 0)) { - value = _Expires; + value = _headers._Expires; return true; } else @@ -6886,7 +6850,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 64L) != 0)) { - value = _TransferEncoding; + value = _headers._TransferEncoding; return true; } else @@ -6900,7 +6864,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 16777216L) != 0)) { - value = _ProxyAutheticate; + value = _headers._ProxyAutheticate; return true; } else @@ -6918,7 +6882,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 256L) != 0)) { - value = _Via; + value = _headers._Via; return true; } else @@ -6932,7 +6896,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 2097152L) != 0)) { - value = _Age; + value = _headers._Age; return true; } else @@ -6950,7 +6914,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 1024L) != 0)) { - value = _Allow; + value = _headers._Allow; return true; } else @@ -6968,7 +6932,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 2048L) != 0)) { - value = _ContentLength; + value = _headers._ContentLength; return true; } else @@ -6986,7 +6950,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 4096L) != 0)) { - value = _ContentType; + value = _headers._ContentType; return true; } else @@ -7004,7 +6968,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 8192L) != 0)) { - value = _ContentEncoding; + value = _headers._ContentEncoding; return true; } else @@ -7018,7 +6982,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 16384L) != 0)) { - value = _ContentLanguage; + value = _headers._ContentLanguage; return true; } else @@ -7032,7 +6996,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 32768L) != 0)) { - value = _ContentLocation; + value = _headers._ContentLocation; return true; } else @@ -7046,7 +7010,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 536870912L) != 0)) { - value = _WWWAuthenticate; + value = _headers._WWWAuthenticate; return true; } else @@ -7064,7 +7028,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 65536L) != 0)) { - value = _ContentMD5; + value = _headers._ContentMD5; return true; } else @@ -7078,7 +7042,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 33554432L) != 0)) { - value = _RetryAfter; + value = _headers._RetryAfter; return true; } else @@ -7096,7 +7060,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 8388608L) != 0)) { - value = _Location; + value = _headers._Location; return true; } else @@ -7114,7 +7078,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 1073741824L) != 0)) { - value = _AccessControlAllowCredentials; + value = _headers._AccessControlAllowCredentials; return true; } else @@ -7132,7 +7096,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 2147483648L) != 0)) { - value = _AccessControlAllowHeaders; + value = _headers._AccessControlAllowHeaders; return true; } else @@ -7146,7 +7110,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 4294967296L) != 0)) { - value = _AccessControlAllowMethods; + value = _headers._AccessControlAllowMethods; return true; } else @@ -7164,7 +7128,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 8589934592L) != 0)) { - value = _AccessControlAllowOrigin; + value = _headers._AccessControlAllowOrigin; return true; } else @@ -7182,7 +7146,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 17179869184L) != 0)) { - value = _AccessControlExposeHeaders; + value = _headers._AccessControlExposeHeaders; return true; } else @@ -7200,7 +7164,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) { if (((_bits & 34359738368L) != 0)) { - value = _AccessControlMaxAge; + value = _headers._AccessControlMaxAge; return true; } else @@ -7224,28 +7188,28 @@ protected override void SetValueFast(string key, StringValues value) if ("Cache-Control".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 1L; - _CacheControl = value; + _headers._CacheControl = value; return; } if ("Content-Range".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 131072L; - _ContentRange = value; + _headers._ContentRange = value; return; } if ("Last-Modified".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 524288L; - _LastModified = value; + _headers._LastModified = value; return; } if ("Accept-Ranges".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 1048576L; - _AcceptRanges = value; + _headers._AcceptRanges = value; return; } } @@ -7256,22 +7220,22 @@ protected override void SetValueFast(string key, StringValues value) if ("Connection".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 2L; - _Connection = value; - _rawConnection = null; + _headers._Connection = value; + _headers._rawConnection = null; return; } if ("Keep-Alive".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 8L; - _KeepAlive = value; + _headers._KeepAlive = value; return; } if ("Set-Cookie".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 134217728L; - _SetCookie = value; + _headers._SetCookie = value; return; } } @@ -7282,22 +7246,22 @@ protected override void SetValueFast(string key, StringValues value) if ("Date".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 4L; - _Date = value; - _rawDate = null; + _headers._Date = value; + _headers._rawDate = null; return; } if ("ETag".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 4194304L; - _ETag = value; + _headers._ETag = value; return; } if ("Vary".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 268435456L; - _Vary = value; + _headers._Vary = value; return; } } @@ -7308,15 +7272,15 @@ protected override void SetValueFast(string key, StringValues value) if ("Pragma".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 16L; - _Pragma = value; + _headers._Pragma = value; return; } if ("Server".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 67108864L; - _Server = value; - _rawServer = null; + _headers._Server = value; + _headers._rawServer = null; return; } } @@ -7327,28 +7291,28 @@ protected override void SetValueFast(string key, StringValues value) if ("Trailer".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 32L; - _Trailer = value; + _headers._Trailer = value; return; } if ("Upgrade".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 128L; - _Upgrade = value; + _headers._Upgrade = value; return; } if ("Warning".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 512L; - _Warning = value; + _headers._Warning = value; return; } if ("Expires".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 262144L; - _Expires = value; + _headers._Expires = value; return; } } @@ -7359,15 +7323,15 @@ protected override void SetValueFast(string key, StringValues value) if ("Transfer-Encoding".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 64L; - _TransferEncoding = value; - _rawTransferEncoding = null; + _headers._TransferEncoding = value; + _headers._rawTransferEncoding = null; return; } if ("Proxy-Autheticate".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 16777216L; - _ProxyAutheticate = value; + _headers._ProxyAutheticate = value; return; } } @@ -7378,14 +7342,14 @@ protected override void SetValueFast(string key, StringValues value) if ("Via".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 256L; - _Via = value; + _headers._Via = value; return; } if ("Age".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 2097152L; - _Age = value; + _headers._Age = value; return; } } @@ -7396,7 +7360,7 @@ protected override void SetValueFast(string key, StringValues value) if ("Allow".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 1024L; - _Allow = value; + _headers._Allow = value; return; } } @@ -7407,8 +7371,8 @@ protected override void SetValueFast(string key, StringValues value) if ("Content-Length".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 2048L; - _ContentLength = value; - _rawContentLength = null; + _headers._ContentLength = value; + _headers._rawContentLength = null; return; } } @@ -7419,7 +7383,7 @@ protected override void SetValueFast(string key, StringValues value) if ("Content-Type".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 4096L; - _ContentType = value; + _headers._ContentType = value; return; } } @@ -7430,28 +7394,28 @@ protected override void SetValueFast(string key, StringValues value) if ("Content-Encoding".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 8192L; - _ContentEncoding = value; + _headers._ContentEncoding = value; return; } if ("Content-Language".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 16384L; - _ContentLanguage = value; + _headers._ContentLanguage = value; return; } if ("Content-Location".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 32768L; - _ContentLocation = value; + _headers._ContentLocation = value; return; } if ("WWW-Authenticate".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 536870912L; - _WWWAuthenticate = value; + _headers._WWWAuthenticate = value; return; } } @@ -7462,14 +7426,14 @@ protected override void SetValueFast(string key, StringValues value) if ("Content-MD5".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 65536L; - _ContentMD5 = value; + _headers._ContentMD5 = value; return; } if ("Retry-After".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 33554432L; - _RetryAfter = value; + _headers._RetryAfter = value; return; } } @@ -7480,7 +7444,7 @@ protected override void SetValueFast(string key, StringValues value) if ("Location".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 8388608L; - _Location = value; + _headers._Location = value; return; } } @@ -7491,7 +7455,7 @@ protected override void SetValueFast(string key, StringValues value) if ("Access-Control-Allow-Credentials".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 1073741824L; - _AccessControlAllowCredentials = value; + _headers._AccessControlAllowCredentials = value; return; } } @@ -7502,14 +7466,14 @@ protected override void SetValueFast(string key, StringValues value) if ("Access-Control-Allow-Headers".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 2147483648L; - _AccessControlAllowHeaders = value; + _headers._AccessControlAllowHeaders = value; return; } if ("Access-Control-Allow-Methods".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 4294967296L; - _AccessControlAllowMethods = value; + _headers._AccessControlAllowMethods = value; return; } } @@ -7520,7 +7484,7 @@ protected override void SetValueFast(string key, StringValues value) if ("Access-Control-Allow-Origin".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 8589934592L; - _AccessControlAllowOrigin = value; + _headers._AccessControlAllowOrigin = value; return; } } @@ -7531,7 +7495,7 @@ protected override void SetValueFast(string key, StringValues value) if ("Access-Control-Expose-Headers".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 17179869184L; - _AccessControlExposeHeaders = value; + _headers._AccessControlExposeHeaders = value; return; } } @@ -7542,7 +7506,7 @@ protected override void SetValueFast(string key, StringValues value) if ("Access-Control-Max-Age".Equals(key, StringComparison.OrdinalIgnoreCase)) { _bits |= 34359738368L; - _AccessControlMaxAge = value; + _headers._AccessControlMaxAge = value; return; } } @@ -7560,10 +7524,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 1L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 1L; - _CacheControl = value; + _headers._CacheControl = value; return; } @@ -7571,10 +7535,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 131072L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 131072L; - _ContentRange = value; + _headers._ContentRange = value; return; } @@ -7582,10 +7546,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 524288L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 524288L; - _LastModified = value; + _headers._LastModified = value; return; } @@ -7593,10 +7557,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 1048576L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 1048576L; - _AcceptRanges = value; + _headers._AcceptRanges = value; return; } } @@ -7608,11 +7572,11 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 2L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 2L; - _Connection = value; - _rawConnection = null; + _headers._Connection = value; + _headers._rawConnection = null; return; } @@ -7620,10 +7584,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 8L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 8L; - _KeepAlive = value; + _headers._KeepAlive = value; return; } @@ -7631,10 +7595,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 134217728L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 134217728L; - _SetCookie = value; + _headers._SetCookie = value; return; } } @@ -7646,11 +7610,11 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 4L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 4L; - _Date = value; - _rawDate = null; + _headers._Date = value; + _headers._rawDate = null; return; } @@ -7658,10 +7622,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 4194304L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 4194304L; - _ETag = value; + _headers._ETag = value; return; } @@ -7669,10 +7633,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 268435456L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 268435456L; - _Vary = value; + _headers._Vary = value; return; } } @@ -7684,10 +7648,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 16L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 16L; - _Pragma = value; + _headers._Pragma = value; return; } @@ -7695,11 +7659,11 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 67108864L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 67108864L; - _Server = value; - _rawServer = null; + _headers._Server = value; + _headers._rawServer = null; return; } } @@ -7711,10 +7675,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 32L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 32L; - _Trailer = value; + _headers._Trailer = value; return; } @@ -7722,10 +7686,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 128L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 128L; - _Upgrade = value; + _headers._Upgrade = value; return; } @@ -7733,10 +7697,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 512L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 512L; - _Warning = value; + _headers._Warning = value; return; } @@ -7744,10 +7708,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 262144L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 262144L; - _Expires = value; + _headers._Expires = value; return; } } @@ -7759,11 +7723,11 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 64L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 64L; - _TransferEncoding = value; - _rawTransferEncoding = null; + _headers._TransferEncoding = value; + _headers._rawTransferEncoding = null; return; } @@ -7771,10 +7735,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 16777216L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 16777216L; - _ProxyAutheticate = value; + _headers._ProxyAutheticate = value; return; } } @@ -7786,10 +7750,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 256L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 256L; - _Via = value; + _headers._Via = value; return; } @@ -7797,10 +7761,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 2097152L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 2097152L; - _Age = value; + _headers._Age = value; return; } } @@ -7812,10 +7776,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 1024L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 1024L; - _Allow = value; + _headers._Allow = value; return; } } @@ -7827,11 +7791,11 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 2048L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 2048L; - _ContentLength = value; - _rawContentLength = null; + _headers._ContentLength = value; + _headers._rawContentLength = null; return; } } @@ -7843,10 +7807,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 4096L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 4096L; - _ContentType = value; + _headers._ContentType = value; return; } } @@ -7858,10 +7822,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 8192L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 8192L; - _ContentEncoding = value; + _headers._ContentEncoding = value; return; } @@ -7869,10 +7833,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 16384L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 16384L; - _ContentLanguage = value; + _headers._ContentLanguage = value; return; } @@ -7880,10 +7844,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 32768L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 32768L; - _ContentLocation = value; + _headers._ContentLocation = value; return; } @@ -7891,10 +7855,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 536870912L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 536870912L; - _WWWAuthenticate = value; + _headers._WWWAuthenticate = value; return; } } @@ -7906,10 +7870,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 65536L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 65536L; - _ContentMD5 = value; + _headers._ContentMD5 = value; return; } @@ -7917,10 +7881,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 33554432L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 33554432L; - _RetryAfter = value; + _headers._RetryAfter = value; return; } } @@ -7932,10 +7896,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 8388608L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 8388608L; - _Location = value; + _headers._Location = value; return; } } @@ -7947,10 +7911,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 1073741824L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 1073741824L; - _AccessControlAllowCredentials = value; + _headers._AccessControlAllowCredentials = value; return; } } @@ -7962,10 +7926,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 2147483648L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 2147483648L; - _AccessControlAllowHeaders = value; + _headers._AccessControlAllowHeaders = value; return; } @@ -7973,10 +7937,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 4294967296L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 4294967296L; - _AccessControlAllowMethods = value; + _headers._AccessControlAllowMethods = value; return; } } @@ -7988,10 +7952,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 8589934592L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 8589934592L; - _AccessControlAllowOrigin = value; + _headers._AccessControlAllowOrigin = value; return; } } @@ -8003,10 +7967,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 17179869184L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 17179869184L; - _AccessControlExposeHeaders = value; + _headers._AccessControlExposeHeaders = value; return; } } @@ -8018,10 +7982,10 @@ protected override void AddValueFast(string key, StringValues value) { if (((_bits & 34359738368L) != 0)) { - throw new ArgumentException("An item with the same key has already been added."); + ThrowDuplicateKeyException(); } _bits |= 34359738368L; - _AccessControlMaxAge = value; + _headers._AccessControlMaxAge = value; return; } } @@ -8040,7 +8004,7 @@ protected override bool RemoveFast(string key) if (((_bits & 1L) != 0)) { _bits &= ~1L; - _CacheControl = StringValues.Empty; + _headers._CacheControl = StringValues.Empty; return true; } else @@ -8054,7 +8018,7 @@ protected override bool RemoveFast(string key) if (((_bits & 131072L) != 0)) { _bits &= ~131072L; - _ContentRange = StringValues.Empty; + _headers._ContentRange = StringValues.Empty; return true; } else @@ -8068,7 +8032,7 @@ protected override bool RemoveFast(string key) if (((_bits & 524288L) != 0)) { _bits &= ~524288L; - _LastModified = StringValues.Empty; + _headers._LastModified = StringValues.Empty; return true; } else @@ -8082,7 +8046,7 @@ protected override bool RemoveFast(string key) if (((_bits & 1048576L) != 0)) { _bits &= ~1048576L; - _AcceptRanges = StringValues.Empty; + _headers._AcceptRanges = StringValues.Empty; return true; } else @@ -8100,8 +8064,8 @@ protected override bool RemoveFast(string key) if (((_bits & 2L) != 0)) { _bits &= ~2L; - _Connection = StringValues.Empty; - _rawConnection = null; + _headers._Connection = StringValues.Empty; + _headers._rawConnection = null; return true; } else @@ -8115,7 +8079,7 @@ protected override bool RemoveFast(string key) if (((_bits & 8L) != 0)) { _bits &= ~8L; - _KeepAlive = StringValues.Empty; + _headers._KeepAlive = StringValues.Empty; return true; } else @@ -8129,7 +8093,7 @@ protected override bool RemoveFast(string key) if (((_bits & 134217728L) != 0)) { _bits &= ~134217728L; - _SetCookie = StringValues.Empty; + _headers._SetCookie = StringValues.Empty; return true; } else @@ -8147,8 +8111,8 @@ protected override bool RemoveFast(string key) if (((_bits & 4L) != 0)) { _bits &= ~4L; - _Date = StringValues.Empty; - _rawDate = null; + _headers._Date = StringValues.Empty; + _headers._rawDate = null; return true; } else @@ -8162,7 +8126,7 @@ protected override bool RemoveFast(string key) if (((_bits & 4194304L) != 0)) { _bits &= ~4194304L; - _ETag = StringValues.Empty; + _headers._ETag = StringValues.Empty; return true; } else @@ -8176,7 +8140,7 @@ protected override bool RemoveFast(string key) if (((_bits & 268435456L) != 0)) { _bits &= ~268435456L; - _Vary = StringValues.Empty; + _headers._Vary = StringValues.Empty; return true; } else @@ -8194,7 +8158,7 @@ protected override bool RemoveFast(string key) if (((_bits & 16L) != 0)) { _bits &= ~16L; - _Pragma = StringValues.Empty; + _headers._Pragma = StringValues.Empty; return true; } else @@ -8208,8 +8172,8 @@ protected override bool RemoveFast(string key) if (((_bits & 67108864L) != 0)) { _bits &= ~67108864L; - _Server = StringValues.Empty; - _rawServer = null; + _headers._Server = StringValues.Empty; + _headers._rawServer = null; return true; } else @@ -8227,7 +8191,7 @@ protected override bool RemoveFast(string key) if (((_bits & 32L) != 0)) { _bits &= ~32L; - _Trailer = StringValues.Empty; + _headers._Trailer = StringValues.Empty; return true; } else @@ -8241,7 +8205,7 @@ protected override bool RemoveFast(string key) if (((_bits & 128L) != 0)) { _bits &= ~128L; - _Upgrade = StringValues.Empty; + _headers._Upgrade = StringValues.Empty; return true; } else @@ -8255,7 +8219,7 @@ protected override bool RemoveFast(string key) if (((_bits & 512L) != 0)) { _bits &= ~512L; - _Warning = StringValues.Empty; + _headers._Warning = StringValues.Empty; return true; } else @@ -8269,7 +8233,7 @@ protected override bool RemoveFast(string key) if (((_bits & 262144L) != 0)) { _bits &= ~262144L; - _Expires = StringValues.Empty; + _headers._Expires = StringValues.Empty; return true; } else @@ -8287,8 +8251,8 @@ protected override bool RemoveFast(string key) if (((_bits & 64L) != 0)) { _bits &= ~64L; - _TransferEncoding = StringValues.Empty; - _rawTransferEncoding = null; + _headers._TransferEncoding = StringValues.Empty; + _headers._rawTransferEncoding = null; return true; } else @@ -8302,7 +8266,7 @@ protected override bool RemoveFast(string key) if (((_bits & 16777216L) != 0)) { _bits &= ~16777216L; - _ProxyAutheticate = StringValues.Empty; + _headers._ProxyAutheticate = StringValues.Empty; return true; } else @@ -8320,7 +8284,7 @@ protected override bool RemoveFast(string key) if (((_bits & 256L) != 0)) { _bits &= ~256L; - _Via = StringValues.Empty; + _headers._Via = StringValues.Empty; return true; } else @@ -8334,7 +8298,7 @@ protected override bool RemoveFast(string key) if (((_bits & 2097152L) != 0)) { _bits &= ~2097152L; - _Age = StringValues.Empty; + _headers._Age = StringValues.Empty; return true; } else @@ -8352,7 +8316,7 @@ protected override bool RemoveFast(string key) if (((_bits & 1024L) != 0)) { _bits &= ~1024L; - _Allow = StringValues.Empty; + _headers._Allow = StringValues.Empty; return true; } else @@ -8370,8 +8334,8 @@ protected override bool RemoveFast(string key) if (((_bits & 2048L) != 0)) { _bits &= ~2048L; - _ContentLength = StringValues.Empty; - _rawContentLength = null; + _headers._ContentLength = StringValues.Empty; + _headers._rawContentLength = null; return true; } else @@ -8389,7 +8353,7 @@ protected override bool RemoveFast(string key) if (((_bits & 4096L) != 0)) { _bits &= ~4096L; - _ContentType = StringValues.Empty; + _headers._ContentType = StringValues.Empty; return true; } else @@ -8407,7 +8371,7 @@ protected override bool RemoveFast(string key) if (((_bits & 8192L) != 0)) { _bits &= ~8192L; - _ContentEncoding = StringValues.Empty; + _headers._ContentEncoding = StringValues.Empty; return true; } else @@ -8421,7 +8385,7 @@ protected override bool RemoveFast(string key) if (((_bits & 16384L) != 0)) { _bits &= ~16384L; - _ContentLanguage = StringValues.Empty; + _headers._ContentLanguage = StringValues.Empty; return true; } else @@ -8435,7 +8399,7 @@ protected override bool RemoveFast(string key) if (((_bits & 32768L) != 0)) { _bits &= ~32768L; - _ContentLocation = StringValues.Empty; + _headers._ContentLocation = StringValues.Empty; return true; } else @@ -8449,7 +8413,7 @@ protected override bool RemoveFast(string key) if (((_bits & 536870912L) != 0)) { _bits &= ~536870912L; - _WWWAuthenticate = StringValues.Empty; + _headers._WWWAuthenticate = StringValues.Empty; return true; } else @@ -8467,7 +8431,7 @@ protected override bool RemoveFast(string key) if (((_bits & 65536L) != 0)) { _bits &= ~65536L; - _ContentMD5 = StringValues.Empty; + _headers._ContentMD5 = StringValues.Empty; return true; } else @@ -8481,7 +8445,7 @@ protected override bool RemoveFast(string key) if (((_bits & 33554432L) != 0)) { _bits &= ~33554432L; - _RetryAfter = StringValues.Empty; + _headers._RetryAfter = StringValues.Empty; return true; } else @@ -8499,7 +8463,7 @@ protected override bool RemoveFast(string key) if (((_bits & 8388608L) != 0)) { _bits &= ~8388608L; - _Location = StringValues.Empty; + _headers._Location = StringValues.Empty; return true; } else @@ -8517,7 +8481,7 @@ protected override bool RemoveFast(string key) if (((_bits & 1073741824L) != 0)) { _bits &= ~1073741824L; - _AccessControlAllowCredentials = StringValues.Empty; + _headers._AccessControlAllowCredentials = StringValues.Empty; return true; } else @@ -8535,7 +8499,7 @@ protected override bool RemoveFast(string key) if (((_bits & 2147483648L) != 0)) { _bits &= ~2147483648L; - _AccessControlAllowHeaders = StringValues.Empty; + _headers._AccessControlAllowHeaders = StringValues.Empty; return true; } else @@ -8549,7 +8513,7 @@ protected override bool RemoveFast(string key) if (((_bits & 4294967296L) != 0)) { _bits &= ~4294967296L; - _AccessControlAllowMethods = StringValues.Empty; + _headers._AccessControlAllowMethods = StringValues.Empty; return true; } else @@ -8567,7 +8531,7 @@ protected override bool RemoveFast(string key) if (((_bits & 8589934592L) != 0)) { _bits &= ~8589934592L; - _AccessControlAllowOrigin = StringValues.Empty; + _headers._AccessControlAllowOrigin = StringValues.Empty; return true; } else @@ -8585,7 +8549,7 @@ protected override bool RemoveFast(string key) if (((_bits & 17179869184L) != 0)) { _bits &= ~17179869184L; - _AccessControlExposeHeaders = StringValues.Empty; + _headers._AccessControlExposeHeaders = StringValues.Empty; return true; } else @@ -8603,7 +8567,7 @@ protected override bool RemoveFast(string key) if (((_bits & 34359738368L) != 0)) { _bits &= ~34359738368L; - _AccessControlMaxAge = StringValues.Empty; + _headers._AccessControlMaxAge = StringValues.Empty; return true; } else @@ -8619,6 +8583,7 @@ protected override bool RemoveFast(string key) protected override void ClearFast() { _bits = 0; + _headers = default(HeaderReferences); MaybeUnknown?.Clear(); } @@ -8626,17 +8591,17 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex < 0) { - throw new ArgumentException(); + ThrowArgumentException(); } if (((_bits & 1L) != 0)) { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Cache-Control", _CacheControl); + array[arrayIndex] = new KeyValuePair("Cache-Control", _headers._CacheControl); ++arrayIndex; } @@ -8644,10 +8609,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Connection", _Connection); + array[arrayIndex] = new KeyValuePair("Connection", _headers._Connection); ++arrayIndex; } @@ -8655,10 +8620,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Date", _Date); + array[arrayIndex] = new KeyValuePair("Date", _headers._Date); ++arrayIndex; } @@ -8666,10 +8631,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Keep-Alive", _KeepAlive); + array[arrayIndex] = new KeyValuePair("Keep-Alive", _headers._KeepAlive); ++arrayIndex; } @@ -8677,10 +8642,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Pragma", _Pragma); + array[arrayIndex] = new KeyValuePair("Pragma", _headers._Pragma); ++arrayIndex; } @@ -8688,10 +8653,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Trailer", _Trailer); + array[arrayIndex] = new KeyValuePair("Trailer", _headers._Trailer); ++arrayIndex; } @@ -8699,10 +8664,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Transfer-Encoding", _TransferEncoding); + array[arrayIndex] = new KeyValuePair("Transfer-Encoding", _headers._TransferEncoding); ++arrayIndex; } @@ -8710,10 +8675,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Upgrade", _Upgrade); + array[arrayIndex] = new KeyValuePair("Upgrade", _headers._Upgrade); ++arrayIndex; } @@ -8721,10 +8686,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Via", _Via); + array[arrayIndex] = new KeyValuePair("Via", _headers._Via); ++arrayIndex; } @@ -8732,10 +8697,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Warning", _Warning); + array[arrayIndex] = new KeyValuePair("Warning", _headers._Warning); ++arrayIndex; } @@ -8743,10 +8708,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Allow", _Allow); + array[arrayIndex] = new KeyValuePair("Allow", _headers._Allow); ++arrayIndex; } @@ -8754,10 +8719,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Content-Length", _ContentLength); + array[arrayIndex] = new KeyValuePair("Content-Length", _headers._ContentLength); ++arrayIndex; } @@ -8765,10 +8730,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Content-Type", _ContentType); + array[arrayIndex] = new KeyValuePair("Content-Type", _headers._ContentType); ++arrayIndex; } @@ -8776,10 +8741,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Content-Encoding", _ContentEncoding); + array[arrayIndex] = new KeyValuePair("Content-Encoding", _headers._ContentEncoding); ++arrayIndex; } @@ -8787,10 +8752,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Content-Language", _ContentLanguage); + array[arrayIndex] = new KeyValuePair("Content-Language", _headers._ContentLanguage); ++arrayIndex; } @@ -8798,10 +8763,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Content-Location", _ContentLocation); + array[arrayIndex] = new KeyValuePair("Content-Location", _headers._ContentLocation); ++arrayIndex; } @@ -8809,10 +8774,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Content-MD5", _ContentMD5); + array[arrayIndex] = new KeyValuePair("Content-MD5", _headers._ContentMD5); ++arrayIndex; } @@ -8820,10 +8785,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Content-Range", _ContentRange); + array[arrayIndex] = new KeyValuePair("Content-Range", _headers._ContentRange); ++arrayIndex; } @@ -8831,10 +8796,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Expires", _Expires); + array[arrayIndex] = new KeyValuePair("Expires", _headers._Expires); ++arrayIndex; } @@ -8842,10 +8807,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Last-Modified", _LastModified); + array[arrayIndex] = new KeyValuePair("Last-Modified", _headers._LastModified); ++arrayIndex; } @@ -8853,10 +8818,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Accept-Ranges", _AcceptRanges); + array[arrayIndex] = new KeyValuePair("Accept-Ranges", _headers._AcceptRanges); ++arrayIndex; } @@ -8864,10 +8829,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Age", _Age); + array[arrayIndex] = new KeyValuePair("Age", _headers._Age); ++arrayIndex; } @@ -8875,10 +8840,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("ETag", _ETag); + array[arrayIndex] = new KeyValuePair("ETag", _headers._ETag); ++arrayIndex; } @@ -8886,10 +8851,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Location", _Location); + array[arrayIndex] = new KeyValuePair("Location", _headers._Location); ++arrayIndex; } @@ -8897,10 +8862,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Proxy-Autheticate", _ProxyAutheticate); + array[arrayIndex] = new KeyValuePair("Proxy-Autheticate", _headers._ProxyAutheticate); ++arrayIndex; } @@ -8908,10 +8873,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Retry-After", _RetryAfter); + array[arrayIndex] = new KeyValuePair("Retry-After", _headers._RetryAfter); ++arrayIndex; } @@ -8919,10 +8884,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Server", _Server); + array[arrayIndex] = new KeyValuePair("Server", _headers._Server); ++arrayIndex; } @@ -8930,10 +8895,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Set-Cookie", _SetCookie); + array[arrayIndex] = new KeyValuePair("Set-Cookie", _headers._SetCookie); ++arrayIndex; } @@ -8941,10 +8906,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Vary", _Vary); + array[arrayIndex] = new KeyValuePair("Vary", _headers._Vary); ++arrayIndex; } @@ -8952,10 +8917,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("WWW-Authenticate", _WWWAuthenticate); + array[arrayIndex] = new KeyValuePair("WWW-Authenticate", _headers._WWWAuthenticate); ++arrayIndex; } @@ -8963,10 +8928,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Access-Control-Allow-Credentials", _AccessControlAllowCredentials); + array[arrayIndex] = new KeyValuePair("Access-Control-Allow-Credentials", _headers._AccessControlAllowCredentials); ++arrayIndex; } @@ -8974,10 +8939,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Access-Control-Allow-Headers", _AccessControlAllowHeaders); + array[arrayIndex] = new KeyValuePair("Access-Control-Allow-Headers", _headers._AccessControlAllowHeaders); ++arrayIndex; } @@ -8985,10 +8950,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Access-Control-Allow-Methods", _AccessControlAllowMethods); + array[arrayIndex] = new KeyValuePair("Access-Control-Allow-Methods", _headers._AccessControlAllowMethods); ++arrayIndex; } @@ -8996,10 +8961,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Access-Control-Allow-Origin", _AccessControlAllowOrigin); + array[arrayIndex] = new KeyValuePair("Access-Control-Allow-Origin", _headers._AccessControlAllowOrigin); ++arrayIndex; } @@ -9007,10 +8972,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Access-Control-Expose-Headers", _AccessControlExposeHeaders); + array[arrayIndex] = new KeyValuePair("Access-Control-Expose-Headers", _headers._AccessControlExposeHeaders); ++arrayIndex; } @@ -9018,10 +8983,10 @@ protected override void CopyToFast(KeyValuePair[] array, i { if (arrayIndex == array.Length) { - throw new ArgumentException(); + ThrowArgumentException(); } - array[arrayIndex] = new KeyValuePair("Access-Control-Max-Age", _AccessControlMaxAge); + array[arrayIndex] = new KeyValuePair("Access-Control-Max-Age", _headers._AccessControlMaxAge); ++arrayIndex; } @@ -9033,7 +8998,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 1L) != 0)) { - foreach (var value in _CacheControl) + foreach (var value in _headers._CacheControl) { if (value != null) { @@ -9045,12 +9010,12 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 2L) != 0)) { - if (_rawConnection != null) + if (_headers._rawConnection != null) { - output.CopyFrom(_rawConnection, 0, _rawConnection.Length); + output.CopyFrom(_headers._rawConnection, 0, _headers._rawConnection.Length); } else - foreach (var value in _Connection) + foreach (var value in _headers._Connection) { if (value != null) { @@ -9062,12 +9027,12 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 4L) != 0)) { - if (_rawDate != null) + if (_headers._rawDate != null) { - output.CopyFrom(_rawDate, 0, _rawDate.Length); + output.CopyFrom(_headers._rawDate, 0, _headers._rawDate.Length); } else - foreach (var value in _Date) + foreach (var value in _headers._Date) { if (value != null) { @@ -9079,7 +9044,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 8L) != 0)) { - foreach (var value in _KeepAlive) + foreach (var value in _headers._KeepAlive) { if (value != null) { @@ -9091,7 +9056,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 16L) != 0)) { - foreach (var value in _Pragma) + foreach (var value in _headers._Pragma) { if (value != null) { @@ -9103,7 +9068,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 32L) != 0)) { - foreach (var value in _Trailer) + foreach (var value in _headers._Trailer) { if (value != null) { @@ -9115,12 +9080,12 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 64L) != 0)) { - if (_rawTransferEncoding != null) + if (_headers._rawTransferEncoding != null) { - output.CopyFrom(_rawTransferEncoding, 0, _rawTransferEncoding.Length); + output.CopyFrom(_headers._rawTransferEncoding, 0, _headers._rawTransferEncoding.Length); } else - foreach (var value in _TransferEncoding) + foreach (var value in _headers._TransferEncoding) { if (value != null) { @@ -9132,7 +9097,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 128L) != 0)) { - foreach (var value in _Upgrade) + foreach (var value in _headers._Upgrade) { if (value != null) { @@ -9144,7 +9109,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 256L) != 0)) { - foreach (var value in _Via) + foreach (var value in _headers._Via) { if (value != null) { @@ -9156,7 +9121,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 512L) != 0)) { - foreach (var value in _Warning) + foreach (var value in _headers._Warning) { if (value != null) { @@ -9168,7 +9133,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 1024L) != 0)) { - foreach (var value in _Allow) + foreach (var value in _headers._Allow) { if (value != null) { @@ -9180,12 +9145,12 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 2048L) != 0)) { - if (_rawContentLength != null) + if (_headers._rawContentLength != null) { - output.CopyFrom(_rawContentLength, 0, _rawContentLength.Length); + output.CopyFrom(_headers._rawContentLength, 0, _headers._rawContentLength.Length); } else - foreach (var value in _ContentLength) + foreach (var value in _headers._ContentLength) { if (value != null) { @@ -9197,7 +9162,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 4096L) != 0)) { - foreach (var value in _ContentType) + foreach (var value in _headers._ContentType) { if (value != null) { @@ -9209,7 +9174,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 8192L) != 0)) { - foreach (var value in _ContentEncoding) + foreach (var value in _headers._ContentEncoding) { if (value != null) { @@ -9221,7 +9186,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 16384L) != 0)) { - foreach (var value in _ContentLanguage) + foreach (var value in _headers._ContentLanguage) { if (value != null) { @@ -9233,7 +9198,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 32768L) != 0)) { - foreach (var value in _ContentLocation) + foreach (var value in _headers._ContentLocation) { if (value != null) { @@ -9245,7 +9210,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 65536L) != 0)) { - foreach (var value in _ContentMD5) + foreach (var value in _headers._ContentMD5) { if (value != null) { @@ -9257,7 +9222,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 131072L) != 0)) { - foreach (var value in _ContentRange) + foreach (var value in _headers._ContentRange) { if (value != null) { @@ -9269,7 +9234,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 262144L) != 0)) { - foreach (var value in _Expires) + foreach (var value in _headers._Expires) { if (value != null) { @@ -9281,7 +9246,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 524288L) != 0)) { - foreach (var value in _LastModified) + foreach (var value in _headers._LastModified) { if (value != null) { @@ -9293,7 +9258,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 1048576L) != 0)) { - foreach (var value in _AcceptRanges) + foreach (var value in _headers._AcceptRanges) { if (value != null) { @@ -9305,7 +9270,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 2097152L) != 0)) { - foreach (var value in _Age) + foreach (var value in _headers._Age) { if (value != null) { @@ -9317,7 +9282,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 4194304L) != 0)) { - foreach (var value in _ETag) + foreach (var value in _headers._ETag) { if (value != null) { @@ -9329,7 +9294,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 8388608L) != 0)) { - foreach (var value in _Location) + foreach (var value in _headers._Location) { if (value != null) { @@ -9341,7 +9306,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 16777216L) != 0)) { - foreach (var value in _ProxyAutheticate) + foreach (var value in _headers._ProxyAutheticate) { if (value != null) { @@ -9353,7 +9318,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 33554432L) != 0)) { - foreach (var value in _RetryAfter) + foreach (var value in _headers._RetryAfter) { if (value != null) { @@ -9365,12 +9330,12 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 67108864L) != 0)) { - if (_rawServer != null) + if (_headers._rawServer != null) { - output.CopyFrom(_rawServer, 0, _rawServer.Length); + output.CopyFrom(_headers._rawServer, 0, _headers._rawServer.Length); } else - foreach (var value in _Server) + foreach (var value in _headers._Server) { if (value != null) { @@ -9382,7 +9347,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 134217728L) != 0)) { - foreach (var value in _SetCookie) + foreach (var value in _headers._SetCookie) { if (value != null) { @@ -9394,7 +9359,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 268435456L) != 0)) { - foreach (var value in _Vary) + foreach (var value in _headers._Vary) { if (value != null) { @@ -9406,7 +9371,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 536870912L) != 0)) { - foreach (var value in _WWWAuthenticate) + foreach (var value in _headers._WWWAuthenticate) { if (value != null) { @@ -9418,7 +9383,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 1073741824L) != 0)) { - foreach (var value in _AccessControlAllowCredentials) + foreach (var value in _headers._AccessControlAllowCredentials) { if (value != null) { @@ -9430,7 +9395,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 2147483648L) != 0)) { - foreach (var value in _AccessControlAllowHeaders) + foreach (var value in _headers._AccessControlAllowHeaders) { if (value != null) { @@ -9442,7 +9407,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 4294967296L) != 0)) { - foreach (var value in _AccessControlAllowMethods) + foreach (var value in _headers._AccessControlAllowMethods) { if (value != null) { @@ -9454,7 +9419,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 8589934592L) != 0)) { - foreach (var value in _AccessControlAllowOrigin) + foreach (var value in _headers._AccessControlAllowOrigin) { if (value != null) { @@ -9466,7 +9431,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 17179869184L) != 0)) { - foreach (var value in _AccessControlExposeHeaders) + foreach (var value in _headers._AccessControlExposeHeaders) { if (value != null) { @@ -9478,7 +9443,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) if (((_bits & 34359738368L) != 0)) { - foreach (var value in _AccessControlMaxAge) + foreach (var value in _headers._AccessControlMaxAge) { if (value != null) { @@ -9489,603 +9454,53 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) } } - public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string value) + + private struct HeaderReferences { - fixed (byte* ptr = &keyBytes[keyOffset]) - { - var pUB = ptr; - var pUL = (ulong*)pUB; - var pUI = (uint*)pUB; - var pUS = (ushort*)pUB; - switch (keyLength) - { - case 13: - { - if ((((pUL[0] & 16131893727263186911uL) == 5711458528024281411uL) && ((pUI[2] & 3755991007u) == 1330795598u) && ((pUB[12] & 223u) == 76u))) - { - if (((_bits & 1L) != 0)) - { - _CacheControl = AppendValue(_CacheControl, value); - } - else - { - _bits |= 1L; - _CacheControl = new StringValues(value); - } - return; - } - - if ((((pUL[0] & 18437701552104792031uL) == 3266321689424580419uL) && ((pUI[2] & 3755991007u) == 1196310866u) && ((pUB[12] & 223u) == 69u))) - { - if (((_bits & 131072L) != 0)) - { - _ContentRange = AppendValue(_ContentRange, value); - } - else - { - _bits |= 131072L; - _ContentRange = new StringValues(value); - } - return; - } - - if ((((pUL[0] & 16131858680330051551uL) == 4922237774822850892uL) && ((pUI[2] & 3755991007u) == 1162430025u) && ((pUB[12] & 223u) == 68u))) - { - if (((_bits & 524288L) != 0)) - { - _LastModified = AppendValue(_LastModified, value); - } - else - { - _bits |= 524288L; - _LastModified = new StringValues(value); - } - return; - } - - if ((((pUL[0] & 16140865742145839071uL) == 5921481788798223169uL) && ((pUI[2] & 3755991007u) == 1162300993u) && ((pUB[12] & 223u) == 83u))) - { - if (((_bits & 1048576L) != 0)) - { - _AcceptRanges = AppendValue(_AcceptRanges, value); - } - else - { - _bits |= 1048576L; - _AcceptRanges = new StringValues(value); - } - return; - } - } - break; - - case 10: - { - if ((((pUL[0] & 16131858542891098079uL) == 5283922227757993795uL) && ((pUS[4] & 57311u) == 20047u))) - { - if (((_bits & 2L) != 0)) - { - _Connection = AppendValue(_Connection, value); - } - else - { - _bits |= 2L; - _Connection = new StringValues(value); - _rawConnection = null; - } - return; - } - - if ((((pUL[0] & 16131858680330051551uL) == 5281668125874799947uL) && ((pUS[4] & 57311u) == 17750u))) - { - if (((_bits & 8L) != 0)) - { - _KeepAlive = AppendValue(_KeepAlive, value); - } - else - { - _bits |= 8L; - _KeepAlive = new StringValues(value); - } - return; - } - - if ((((pUL[0] & 16131858543427968991uL) == 5426643225946637651uL) && ((pUS[4] & 57311u) == 17737u))) - { - if (((_bits & 134217728L) != 0)) - { - _SetCookie = AppendValue(_SetCookie, value); - } - else - { - _bits |= 134217728L; - _SetCookie = new StringValues(value); - } - return; - } - } - break; - - case 4: - { - if ((((pUI[0] & 3755991007u) == 1163149636u))) - { - if (((_bits & 4L) != 0)) - { - _Date = AppendValue(_Date, value); - } - else - { - _bits |= 4L; - _Date = new StringValues(value); - _rawDate = null; - } - return; - } - - if ((((pUI[0] & 3755991007u) == 1195463749u))) - { - if (((_bits & 4194304L) != 0)) - { - _ETag = AppendValue(_ETag, value); - } - else - { - _bits |= 4194304L; - _ETag = new StringValues(value); - } - return; - } - - if ((((pUI[0] & 3755991007u) == 1498562902u))) - { - if (((_bits & 268435456L) != 0)) - { - _Vary = AppendValue(_Vary, value); - } - else - { - _bits |= 268435456L; - _Vary = new StringValues(value); - } - return; - } - } - break; - - case 6: - { - if ((((pUI[0] & 3755991007u) == 1195463248u) && ((pUS[2] & 57311u) == 16717u))) - { - if (((_bits & 16L) != 0)) - { - _Pragma = AppendValue(_Pragma, value); - } - else - { - _bits |= 16L; - _Pragma = new StringValues(value); - } - return; - } - - if ((((pUI[0] & 3755991007u) == 1448232275u) && ((pUS[2] & 57311u) == 21061u))) - { - if (((_bits & 67108864L) != 0)) - { - _Server = AppendValue(_Server, value); - } - else - { - _bits |= 67108864L; - _Server = new StringValues(value); - _rawServer = null; - } - return; - } - } - break; - - case 7: - { - if ((((pUI[0] & 3755991007u) == 1229017684u) && ((pUS[2] & 57311u) == 17740u) && ((pUB[6] & 223u) == 82u))) - { - if (((_bits & 32L) != 0)) - { - _Trailer = AppendValue(_Trailer, value); - } - else - { - _bits |= 32L; - _Trailer = new StringValues(value); - } - return; - } - - if ((((pUI[0] & 3755991007u) == 1380405333u) && ((pUS[2] & 57311u) == 17473u) && ((pUB[6] & 223u) == 69u))) - { - if (((_bits & 128L) != 0)) - { - _Upgrade = AppendValue(_Upgrade, value); - } - else - { - _bits |= 128L; - _Upgrade = new StringValues(value); - } - return; - } - - if ((((pUI[0] & 3755991007u) == 1314013527u) && ((pUS[2] & 57311u) == 20041u) && ((pUB[6] & 223u) == 71u))) - { - if (((_bits & 512L) != 0)) - { - _Warning = AppendValue(_Warning, value); - } - else - { - _bits |= 512L; - _Warning = new StringValues(value); - } - return; - } - - if ((((pUI[0] & 3755991007u) == 1230002245u) && ((pUS[2] & 57311u) == 17746u) && ((pUB[6] & 223u) == 83u))) - { - if (((_bits & 262144L) != 0)) - { - _Expires = AppendValue(_Expires, value); - } - else - { - _bits |= 262144L; - _Expires = new StringValues(value); - } - return; - } - } - break; - - case 17: - { - if ((((pUL[0] & 16131858542891098079uL) == 5928221808112259668uL) && ((pUL[1] & 16131858542891098111uL) == 5641115115480565037uL) && ((pUB[16] & 223u) == 71u))) - { - if (((_bits & 64L) != 0)) - { - _TransferEncoding = AppendValue(_TransferEncoding, value); - } - else - { - _bits |= 64L; - _TransferEncoding = new StringValues(value); - _rawTransferEncoding = null; - } - return; - } - - if ((((pUL[0] & 16131893727263186911uL) == 6143241228466999888uL) && ((pUL[1] & 16131858542891098079uL) == 6071207754897639508uL) && ((pUB[16] & 223u) == 69u))) - { - if (((_bits & 16777216L) != 0)) - { - _ProxyAutheticate = AppendValue(_ProxyAutheticate, value); - } - else - { - _bits |= 16777216L; - _ProxyAutheticate = new StringValues(value); - } - return; - } - } - break; - - case 3: - { - if ((((pUS[0] & 57311u) == 18774u) && ((pUB[2] & 223u) == 65u))) - { - if (((_bits & 256L) != 0)) - { - _Via = AppendValue(_Via, value); - } - else - { - _bits |= 256L; - _Via = new StringValues(value); - } - return; - } - - if ((((pUS[0] & 57311u) == 18241u) && ((pUB[2] & 223u) == 69u))) - { - if (((_bits & 2097152L) != 0)) - { - _Age = AppendValue(_Age, value); - } - else - { - _bits |= 2097152L; - _Age = new StringValues(value); - } - return; - } - } - break; - - case 5: - { - if ((((pUI[0] & 3755991007u) == 1330400321u) && ((pUB[4] & 223u) == 87u))) - { - if (((_bits & 1024L) != 0)) - { - _Allow = AppendValue(_Allow, value); - } - else - { - _bits |= 1024L; - _Allow = new StringValues(value); - } - return; - } - } - break; - - case 14: - { - if ((((pUL[0] & 18437701552104792031uL) == 3266321689424580419uL) && ((pUI[2] & 3755991007u) == 1196311884u) && ((pUS[6] & 57311u) == 18516u))) - { - if (((_bits & 2048L) != 0)) - { - _ContentLength = AppendValue(_ContentLength, value); - } - else - { - _bits |= 2048L; - _ContentLength = new StringValues(value); - _rawContentLength = null; - } - return; - } - } - break; - - case 12: - { - if ((((pUL[0] & 18437701552104792031uL) == 3266321689424580419uL) && ((pUI[2] & 3755991007u) == 1162893652u))) - { - if (((_bits & 4096L) != 0)) - { - _ContentType = AppendValue(_ContentType, value); - } - else - { - _bits |= 4096L; - _ContentType = new StringValues(value); - } - return; - } - } - break; - - case 16: - { - if ((((pUL[0] & 18437701552104792031uL) == 3266321689424580419uL) && ((pUL[1] & 16131858542891098079uL) == 5138124782612729413uL))) - { - if (((_bits & 8192L) != 0)) - { - _ContentEncoding = AppendValue(_ContentEncoding, value); - } - else - { - _bits |= 8192L; - _ContentEncoding = new StringValues(value); - } - return; - } - - if ((((pUL[0] & 18437701552104792031uL) == 3266321689424580419uL) && ((pUL[1] & 16131858542891098079uL) == 4992030546487820620uL))) - { - if (((_bits & 16384L) != 0)) - { - _ContentLanguage = AppendValue(_ContentLanguage, value); - } - else - { - _bits |= 16384L; - _ContentLanguage = new StringValues(value); - } - return; - } - - if ((((pUL[0] & 18437701552104792031uL) == 3266321689424580419uL) && ((pUL[1] & 16131858542891098079uL) == 5642809484339531596uL))) - { - if (((_bits & 32768L) != 0)) - { - _ContentLocation = AppendValue(_ContentLocation, value); - } - else - { - _bits |= 32768L; - _ContentLocation = new StringValues(value); - } - return; - } - - if ((((pUL[0] & 16131858543427968991uL) == 5211884407196440407uL) && ((pUL[1] & 16131858542891098079uL) == 4995689643909598789uL))) - { - if (((_bits & 536870912L) != 0)) - { - _WWWAuthenticate = AppendValue(_WWWAuthenticate, value); - } - else - { - _bits |= 536870912L; - _WWWAuthenticate = new StringValues(value); - } - return; - } - } - break; - - case 11: - { - if ((((pUL[0] & 18437701552104792031uL) == 3266321689424580419uL) && ((pUS[4] & 57311u) == 17485u) && ((pUB[10] & 255u) == 53u))) - { - if (((_bits & 65536L) != 0)) - { - _ContentMD5 = AppendValue(_ContentMD5, value); - } - else - { - _bits |= 65536L; - _ContentMD5 = new StringValues(value); - } - return; - } - - if ((((pUL[0] & 16131893727263186911uL) == 5062377317797741906uL) && ((pUS[4] & 57311u) == 17748u) && ((pUB[10] & 223u) == 82u))) - { - if (((_bits & 33554432L) != 0)) - { - _RetryAfter = AppendValue(_RetryAfter, value); - } - else - { - _bits |= 33554432L; - _RetryAfter = new StringValues(value); - } - return; - } - } - break; - - case 8: - { - if ((((pUL[0] & 16131858542891098079uL) == 5642809484339531596uL))) - { - if (((_bits & 8388608L) != 0)) - { - _Location = AppendValue(_Location, value); - } - else - { - _bits |= 8388608L; - _Location = new StringValues(value); - } - return; - } - } - break; - - case 32: - { - if ((((pUL[0] & 16140865742145839071uL) == 4840616791602578241uL) && ((pUL[1] & 16140865742145839071uL) == 4696493889984679503uL) && ((pUL[2] & 16131858680330051551uL) == 4995128798724705356uL) && ((pUL[3] & 16131858542891098079uL) == 6002244186580862276uL))) - { - if (((_bits & 1073741824L) != 0)) - { - _AccessControlAllowCredentials = AppendValue(_AccessControlAllowCredentials, value); - } - else - { - _bits |= 1073741824L; - _AccessControlAllowCredentials = new StringValues(value); - } - return; - } - } - break; - - case 28: - { - if ((((pUL[0] & 16140865742145839071uL) == 4840616791602578241uL) && ((pUL[1] & 16140865742145839071uL) == 4696493889984679503uL) && ((pUL[2] & 16131858680330051551uL) == 4703244745433893964uL) && ((pUI[6] & 3755991007u) == 1397900612u))) - { - if (((_bits & 2147483648L) != 0)) - { - _AccessControlAllowHeaders = AppendValue(_AccessControlAllowHeaders, value); - } - else - { - _bits |= 2147483648L; - _AccessControlAllowHeaders = new StringValues(value); - } - return; - } - - if ((((pUL[0] & 16140865742145839071uL) == 4840616791602578241uL) && ((pUL[1] & 16140865742145839071uL) == 4696493889984679503uL) && ((pUL[2] & 16131858680330051551uL) == 6072344529712663628uL) && ((pUI[6] & 3755991007u) == 1396985672u))) - { - if (((_bits & 4294967296L) != 0)) - { - _AccessControlAllowMethods = AppendValue(_AccessControlAllowMethods, value); - } - else - { - _bits |= 4294967296L; - _AccessControlAllowMethods = new StringValues(value); - } - return; - } - } - break; - - case 27: - { - if ((((pUL[0] & 16140865742145839071uL) == 4840616791602578241uL) && ((pUL[1] & 16140865742145839071uL) == 4696493889984679503uL) && ((pUL[2] & 16131858680330051551uL) == 5283372369015950412uL) && ((pUS[12] & 57311u) == 18759u) && ((pUB[26] & 223u) == 78u))) - { - if (((_bits & 8589934592L) != 0)) - { - _AccessControlAllowOrigin = AppendValue(_AccessControlAllowOrigin, value); - } - else - { - _bits |= 8589934592L; - _AccessControlAllowOrigin = new StringValues(value); - } - return; - } - } - break; - - case 29: - { - if ((((pUL[0] & 16140865742145839071uL) == 4840616791602578241uL) && ((pUL[1] & 16140865742145839071uL) == 4984724266136391247uL) && ((pUL[2] & 16131893727263186911uL) == 4992289962713895000uL) && ((pUI[6] & 3755991007u) == 1380271169u) && ((pUB[28] & 223u) == 83u))) - { - if (((_bits & 17179869184L) != 0)) - { - _AccessControlExposeHeaders = AppendValue(_AccessControlExposeHeaders, value); - } - else - { - _bits |= 17179869184L; - _AccessControlExposeHeaders = new StringValues(value); - } - return; - } - } - break; - - case 22: - { - if ((((pUL[0] & 16140865742145839071uL) == 4840616791602578241uL) && ((pUL[1] & 16140865742145839071uL) == 5561185018439814735uL) && ((pUI[4] & 3758088159u) == 1093490753u) && ((pUS[10] & 57311u) == 17735u))) - { - if (((_bits & 34359738368L) != 0)) - { - _AccessControlMaxAge = AppendValue(_AccessControlMaxAge, value); - } - else - { - _bits |= 34359738368L; - _AccessControlMaxAge = new StringValues(value); - } - return; - } - } - break; - } - } - var key = System.Text.Encoding.ASCII.GetString(keyBytes, keyOffset, keyLength); - StringValues existing; - Unknown.TryGetValue(key, out existing); - Unknown[key] = AppendValue(existing, value); + public StringValues _CacheControl; + public StringValues _Connection; + public StringValues _Date; + public StringValues _KeepAlive; + public StringValues _Pragma; + public StringValues _Trailer; + public StringValues _TransferEncoding; + public StringValues _Upgrade; + public StringValues _Via; + public StringValues _Warning; + public StringValues _Allow; + public StringValues _ContentLength; + public StringValues _ContentType; + public StringValues _ContentEncoding; + public StringValues _ContentLanguage; + public StringValues _ContentLocation; + public StringValues _ContentMD5; + public StringValues _ContentRange; + public StringValues _Expires; + public StringValues _LastModified; + public StringValues _AcceptRanges; + public StringValues _Age; + public StringValues _ETag; + public StringValues _Location; + public StringValues _ProxyAutheticate; + public StringValues _RetryAfter; + public StringValues _Server; + public StringValues _SetCookie; + public StringValues _Vary; + public StringValues _WWWAuthenticate; + public StringValues _AccessControlAllowCredentials; + public StringValues _AccessControlAllowHeaders; + public StringValues _AccessControlAllowMethods; + public StringValues _AccessControlAllowOrigin; + public StringValues _AccessControlExposeHeaders; + public StringValues _AccessControlMaxAge; + + public byte[] _rawConnection; + public byte[] _rawDate; + public byte[] _rawTransferEncoding; + public byte[] _rawContentLength; + public byte[] _rawServer; } + public partial struct Enumerator { public bool MoveNext() @@ -10208,7 +9623,7 @@ public bool MoveNext() state0: if (((_bits & 1L) != 0)) { - _current = new KeyValuePair("Cache-Control", _collection._CacheControl); + _current = new KeyValuePair("Cache-Control", _collection._headers._CacheControl); _state = 1; return true; } @@ -10216,7 +9631,7 @@ public bool MoveNext() state1: if (((_bits & 2L) != 0)) { - _current = new KeyValuePair("Connection", _collection._Connection); + _current = new KeyValuePair("Connection", _collection._headers._Connection); _state = 2; return true; } @@ -10224,7 +9639,7 @@ public bool MoveNext() state2: if (((_bits & 4L) != 0)) { - _current = new KeyValuePair("Date", _collection._Date); + _current = new KeyValuePair("Date", _collection._headers._Date); _state = 3; return true; } @@ -10232,7 +9647,7 @@ public bool MoveNext() state3: if (((_bits & 8L) != 0)) { - _current = new KeyValuePair("Keep-Alive", _collection._KeepAlive); + _current = new KeyValuePair("Keep-Alive", _collection._headers._KeepAlive); _state = 4; return true; } @@ -10240,7 +9655,7 @@ public bool MoveNext() state4: if (((_bits & 16L) != 0)) { - _current = new KeyValuePair("Pragma", _collection._Pragma); + _current = new KeyValuePair("Pragma", _collection._headers._Pragma); _state = 5; return true; } @@ -10248,7 +9663,7 @@ public bool MoveNext() state5: if (((_bits & 32L) != 0)) { - _current = new KeyValuePair("Trailer", _collection._Trailer); + _current = new KeyValuePair("Trailer", _collection._headers._Trailer); _state = 6; return true; } @@ -10256,7 +9671,7 @@ public bool MoveNext() state6: if (((_bits & 64L) != 0)) { - _current = new KeyValuePair("Transfer-Encoding", _collection._TransferEncoding); + _current = new KeyValuePair("Transfer-Encoding", _collection._headers._TransferEncoding); _state = 7; return true; } @@ -10264,7 +9679,7 @@ public bool MoveNext() state7: if (((_bits & 128L) != 0)) { - _current = new KeyValuePair("Upgrade", _collection._Upgrade); + _current = new KeyValuePair("Upgrade", _collection._headers._Upgrade); _state = 8; return true; } @@ -10272,7 +9687,7 @@ public bool MoveNext() state8: if (((_bits & 256L) != 0)) { - _current = new KeyValuePair("Via", _collection._Via); + _current = new KeyValuePair("Via", _collection._headers._Via); _state = 9; return true; } @@ -10280,7 +9695,7 @@ public bool MoveNext() state9: if (((_bits & 512L) != 0)) { - _current = new KeyValuePair("Warning", _collection._Warning); + _current = new KeyValuePair("Warning", _collection._headers._Warning); _state = 10; return true; } @@ -10288,7 +9703,7 @@ public bool MoveNext() state10: if (((_bits & 1024L) != 0)) { - _current = new KeyValuePair("Allow", _collection._Allow); + _current = new KeyValuePair("Allow", _collection._headers._Allow); _state = 11; return true; } @@ -10296,7 +9711,7 @@ public bool MoveNext() state11: if (((_bits & 2048L) != 0)) { - _current = new KeyValuePair("Content-Length", _collection._ContentLength); + _current = new KeyValuePair("Content-Length", _collection._headers._ContentLength); _state = 12; return true; } @@ -10304,7 +9719,7 @@ public bool MoveNext() state12: if (((_bits & 4096L) != 0)) { - _current = new KeyValuePair("Content-Type", _collection._ContentType); + _current = new KeyValuePair("Content-Type", _collection._headers._ContentType); _state = 13; return true; } @@ -10312,7 +9727,7 @@ public bool MoveNext() state13: if (((_bits & 8192L) != 0)) { - _current = new KeyValuePair("Content-Encoding", _collection._ContentEncoding); + _current = new KeyValuePair("Content-Encoding", _collection._headers._ContentEncoding); _state = 14; return true; } @@ -10320,7 +9735,7 @@ public bool MoveNext() state14: if (((_bits & 16384L) != 0)) { - _current = new KeyValuePair("Content-Language", _collection._ContentLanguage); + _current = new KeyValuePair("Content-Language", _collection._headers._ContentLanguage); _state = 15; return true; } @@ -10328,7 +9743,7 @@ public bool MoveNext() state15: if (((_bits & 32768L) != 0)) { - _current = new KeyValuePair("Content-Location", _collection._ContentLocation); + _current = new KeyValuePair("Content-Location", _collection._headers._ContentLocation); _state = 16; return true; } @@ -10336,7 +9751,7 @@ public bool MoveNext() state16: if (((_bits & 65536L) != 0)) { - _current = new KeyValuePair("Content-MD5", _collection._ContentMD5); + _current = new KeyValuePair("Content-MD5", _collection._headers._ContentMD5); _state = 17; return true; } @@ -10344,7 +9759,7 @@ public bool MoveNext() state17: if (((_bits & 131072L) != 0)) { - _current = new KeyValuePair("Content-Range", _collection._ContentRange); + _current = new KeyValuePair("Content-Range", _collection._headers._ContentRange); _state = 18; return true; } @@ -10352,7 +9767,7 @@ public bool MoveNext() state18: if (((_bits & 262144L) != 0)) { - _current = new KeyValuePair("Expires", _collection._Expires); + _current = new KeyValuePair("Expires", _collection._headers._Expires); _state = 19; return true; } @@ -10360,7 +9775,7 @@ public bool MoveNext() state19: if (((_bits & 524288L) != 0)) { - _current = new KeyValuePair("Last-Modified", _collection._LastModified); + _current = new KeyValuePair("Last-Modified", _collection._headers._LastModified); _state = 20; return true; } @@ -10368,7 +9783,7 @@ public bool MoveNext() state20: if (((_bits & 1048576L) != 0)) { - _current = new KeyValuePair("Accept-Ranges", _collection._AcceptRanges); + _current = new KeyValuePair("Accept-Ranges", _collection._headers._AcceptRanges); _state = 21; return true; } @@ -10376,7 +9791,7 @@ public bool MoveNext() state21: if (((_bits & 2097152L) != 0)) { - _current = new KeyValuePair("Age", _collection._Age); + _current = new KeyValuePair("Age", _collection._headers._Age); _state = 22; return true; } @@ -10384,7 +9799,7 @@ public bool MoveNext() state22: if (((_bits & 4194304L) != 0)) { - _current = new KeyValuePair("ETag", _collection._ETag); + _current = new KeyValuePair("ETag", _collection._headers._ETag); _state = 23; return true; } @@ -10392,7 +9807,7 @@ public bool MoveNext() state23: if (((_bits & 8388608L) != 0)) { - _current = new KeyValuePair("Location", _collection._Location); + _current = new KeyValuePair("Location", _collection._headers._Location); _state = 24; return true; } @@ -10400,7 +9815,7 @@ public bool MoveNext() state24: if (((_bits & 16777216L) != 0)) { - _current = new KeyValuePair("Proxy-Autheticate", _collection._ProxyAutheticate); + _current = new KeyValuePair("Proxy-Autheticate", _collection._headers._ProxyAutheticate); _state = 25; return true; } @@ -10408,7 +9823,7 @@ public bool MoveNext() state25: if (((_bits & 33554432L) != 0)) { - _current = new KeyValuePair("Retry-After", _collection._RetryAfter); + _current = new KeyValuePair("Retry-After", _collection._headers._RetryAfter); _state = 26; return true; } @@ -10416,7 +9831,7 @@ public bool MoveNext() state26: if (((_bits & 67108864L) != 0)) { - _current = new KeyValuePair("Server", _collection._Server); + _current = new KeyValuePair("Server", _collection._headers._Server); _state = 27; return true; } @@ -10424,7 +9839,7 @@ public bool MoveNext() state27: if (((_bits & 134217728L) != 0)) { - _current = new KeyValuePair("Set-Cookie", _collection._SetCookie); + _current = new KeyValuePair("Set-Cookie", _collection._headers._SetCookie); _state = 28; return true; } @@ -10432,7 +9847,7 @@ public bool MoveNext() state28: if (((_bits & 268435456L) != 0)) { - _current = new KeyValuePair("Vary", _collection._Vary); + _current = new KeyValuePair("Vary", _collection._headers._Vary); _state = 29; return true; } @@ -10440,7 +9855,7 @@ public bool MoveNext() state29: if (((_bits & 536870912L) != 0)) { - _current = new KeyValuePair("WWW-Authenticate", _collection._WWWAuthenticate); + _current = new KeyValuePair("WWW-Authenticate", _collection._headers._WWWAuthenticate); _state = 30; return true; } @@ -10448,7 +9863,7 @@ public bool MoveNext() state30: if (((_bits & 1073741824L) != 0)) { - _current = new KeyValuePair("Access-Control-Allow-Credentials", _collection._AccessControlAllowCredentials); + _current = new KeyValuePair("Access-Control-Allow-Credentials", _collection._headers._AccessControlAllowCredentials); _state = 31; return true; } @@ -10456,7 +9871,7 @@ public bool MoveNext() state31: if (((_bits & 2147483648L) != 0)) { - _current = new KeyValuePair("Access-Control-Allow-Headers", _collection._AccessControlAllowHeaders); + _current = new KeyValuePair("Access-Control-Allow-Headers", _collection._headers._AccessControlAllowHeaders); _state = 32; return true; } @@ -10464,7 +9879,7 @@ public bool MoveNext() state32: if (((_bits & 4294967296L) != 0)) { - _current = new KeyValuePair("Access-Control-Allow-Methods", _collection._AccessControlAllowMethods); + _current = new KeyValuePair("Access-Control-Allow-Methods", _collection._headers._AccessControlAllowMethods); _state = 33; return true; } @@ -10472,7 +9887,7 @@ public bool MoveNext() state33: if (((_bits & 8589934592L) != 0)) { - _current = new KeyValuePair("Access-Control-Allow-Origin", _collection._AccessControlAllowOrigin); + _current = new KeyValuePair("Access-Control-Allow-Origin", _collection._headers._AccessControlAllowOrigin); _state = 34; return true; } @@ -10480,7 +9895,7 @@ public bool MoveNext() state34: if (((_bits & 17179869184L) != 0)) { - _current = new KeyValuePair("Access-Control-Expose-Headers", _collection._AccessControlExposeHeaders); + _current = new KeyValuePair("Access-Control-Expose-Headers", _collection._headers._AccessControlExposeHeaders); _state = 35; return true; } @@ -10488,7 +9903,7 @@ public bool MoveNext() state35: if (((_bits & 34359738368L) != 0)) { - _current = new KeyValuePair("Access-Control-Max-Age", _collection._AccessControlMaxAge); + _current = new KeyValuePair("Access-Control-Max-Age", _collection._headers._AccessControlMaxAge); _state = 36; return true; } diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/Http/FrameHeaders.cs b/src/Microsoft.AspNetCore.Server.Kestrel/Http/FrameHeaders.cs index 45c935534..596b97357 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/Http/FrameHeaders.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/Http/FrameHeaders.cs @@ -12,6 +12,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Http { public abstract class FrameHeaders : IHeaderDictionary { + protected bool _isReadOnly; protected Dictionary MaybeUnknown; protected Dictionary Unknown => MaybeUnknown ?? (MaybeUnknown = new Dictionary(StringComparer.OrdinalIgnoreCase)); @@ -26,6 +27,10 @@ StringValues IHeaderDictionary.this[string key] } set { + if (_isReadOnly) + { + ThrowReadOnlyException(); + } SetValueFast(key, value); } } @@ -38,20 +43,50 @@ StringValues IDictionary.this[string key] } set { + if (_isReadOnly) + { + ThrowReadOnlyException(); + } SetValueFast(key, value); } } + protected void ThrowReadOnlyException() + { + throw new InvalidOperationException("Headers are readonly, reponse has already started."); + } + + protected void ThrowArgumentException() + { + throw new ArgumentException(); + } + + protected void ThrowKeyNotFoundException() + { + throw new KeyNotFoundException(); + } + + protected void ThrowDuplicateKeyException() + { + throw new ArgumentException("An item with the same key has already been added."); + } + int ICollection>.Count => GetCountFast(); - bool ICollection>.IsReadOnly => false; + bool ICollection>.IsReadOnly => _isReadOnly; ICollection IDictionary.Keys => ((IDictionary)this).Select(pair => pair.Key).ToList(); ICollection IDictionary.Values => ((IDictionary)this).Select(pair => pair.Value).ToList(); + public void SetReadOnly() + { + _isReadOnly = true; + } + public void Reset() { + _isReadOnly = false; ClearFast(); } @@ -105,16 +140,28 @@ protected virtual IEnumerator> GetEnumeratorF void ICollection>.Add(KeyValuePair item) { + if (_isReadOnly) + { + ThrowReadOnlyException(); + } AddValueFast(item.Key, item.Value); } void IDictionary.Add(string key, StringValues value) { + if (_isReadOnly) + { + ThrowReadOnlyException(); + } AddValueFast(key, value); } void ICollection>.Clear() { + if (_isReadOnly) + { + ThrowReadOnlyException(); + } ClearFast(); } @@ -158,6 +205,10 @@ bool ICollection>.Remove(KeyValuePair.Remove(string key) { + if (_isReadOnly) + { + ThrowReadOnlyException(); + } return RemoveFast(key); } diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/Http/FrameOfT.cs b/src/Microsoft.AspNetCore.Server.Kestrel/Http/FrameOfT.cs index 0d9ea1d67..affb4d586 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/Http/FrameOfT.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/Http/FrameOfT.cs @@ -52,7 +52,9 @@ public override async Task RequestProcessingAsync() await SocketInput; } - while (!_requestProcessingStopping && !TakeMessageHeaders(SocketInput, _requestHeaders)) + InitializeHeaders(); + + while (!_requestProcessingStopping && !TakeMessageHeaders(SocketInput, FrameRequestHeaders)) { if (SocketInput.RemoteIntakeFin) { @@ -63,20 +65,10 @@ public override async Task RequestProcessingAsync() if (!_requestProcessingStopping) { - var messageBody = MessageBody.For(HttpVersion, _requestHeaders, this); + var messageBody = MessageBody.For(HttpVersion, FrameRequestHeaders, this); _keepAlive = messageBody.RequestKeepAlive; - // _duplexStream may be null if flag switched while running - if (!ReuseStreams || _duplexStream == null) - { - _requestBody = new FrameRequestStream(); - _responseBody = new FrameResponseStream(this); - _duplexStream = new FrameDuplexStream(_requestBody, _responseBody); - } - - RequestBody = _requestBody.StartAcceptingReads(messageBody); - ResponseBody = _responseBody.StartAcceptingWrites(); - DuplexStream = _duplexStream; + InitializeStreams(messageBody); _abortedCts = null; _manuallySetRequestAbortToken = null; @@ -101,8 +93,7 @@ public override async Task RequestProcessingAsync() await FireOnStarting(); } - _requestBody.PauseAcceptingReads(); - _responseBody.PauseAcceptingWrites(); + PauseStreams(); if (_onCompleted != null) { @@ -114,23 +105,23 @@ public override async Task RequestProcessingAsync() // If _requestAbort is set, the connection has already been closed. if (Volatile.Read(ref _requestAborted) == 0) { - _responseBody.ResumeAcceptingWrites(); + ResumeStreams(); + await ProduceEnd(); if (_keepAlive) { - _requestBody.ResumeAcceptingReads(); // Finish reading the request body in case the app did not. await messageBody.Consume(); } } - _requestBody.StopAcceptingReads(); - _responseBody.StopAcceptingWrites(); + StopStreams(); } if (!_keepAlive) { + ResetComponents(poolingPermitted: true); return; } } @@ -140,12 +131,15 @@ public override async Task RequestProcessingAsync() } catch (Exception ex) { + // Error occurred, do not return components to pool + _poolingPermitted = false; Log.LogWarning(0, ex, "Connection processing ended abnormally"); } finally { try { + ResetComponents(poolingPermitted: _poolingPermitted); _abortedCts = null; // If _requestAborted is set, the connection has already been closed. diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/Http/FrameResponseStream.cs b/src/Microsoft.AspNetCore.Server.Kestrel/Http/FrameResponseStream.cs index 3cf9600ec..145710af2 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/Http/FrameResponseStream.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/Http/FrameResponseStream.cs @@ -11,12 +11,11 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Http { class FrameResponseStream : Stream { - private readonly FrameContext _context; + private FrameContext _context; private FrameStreamState _state; - public FrameResponseStream(FrameContext context) + public FrameResponseStream() { - _context = context; _state = FrameStreamState.Closed; } @@ -125,6 +124,17 @@ public void Abort() } } + public void Initialize(FrameContext context) + { + _context = context; + } + + public void Uninitialize() + { + _context = null; + _state = FrameStreamState.Closed; + } + private Task ValidateState(CancellationToken cancellationToken) { switch (_state) diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/Http/TcpListener.cs b/src/Microsoft.AspNetCore.Server.Kestrel/Http/TcpListener.cs index 4c0f8f19b..fc845b523 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/Http/TcpListener.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/Http/TcpListener.cs @@ -23,7 +23,7 @@ protected override UvStreamHandle CreateListenSocket() { var socket = new UvTcpHandle(Log); socket.Init(Thread.Loop, Thread.QueueCloseHandle); - socket.NoDelay(NoDelay); + socket.NoDelay(ServerInformation.NoDelay); socket.Bind(ServerAddress); socket.Listen(Constants.ListenBacklog, (stream, status, error, state) => ConnectionCallback(stream, status, error, state), this); return socket; @@ -41,7 +41,7 @@ protected override void OnConnection(UvStreamHandle listenSocket, int status) try { acceptSocket.Init(Thread.Loop, Thread.QueueCloseHandle); - acceptSocket.NoDelay(NoDelay); + acceptSocket.NoDelay(ServerInformation.NoDelay); listenSocket.Accept(acceptSocket); DispatchConnection(acceptSocket); diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/Http/TcpListenerPrimary.cs b/src/Microsoft.AspNetCore.Server.Kestrel/Http/TcpListenerPrimary.cs index 6c1697cfe..e791d3056 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/Http/TcpListenerPrimary.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/Http/TcpListenerPrimary.cs @@ -25,7 +25,7 @@ protected override UvStreamHandle CreateListenSocket() { var socket = new UvTcpHandle(Log); socket.Init(Thread.Loop, Thread.QueueCloseHandle); - socket.NoDelay(NoDelay); + socket.NoDelay(ServerInformation.NoDelay); socket.Bind(ServerAddress); socket.Listen(Constants.ListenBacklog, (stream, status, error, state) => ConnectionCallback(stream, status, error, state), this); return socket; @@ -43,7 +43,7 @@ protected override void OnConnection(UvStreamHandle listenSocket, int status) try { acceptSocket.Init(Thread.Loop, Thread.QueueCloseHandle); - acceptSocket.NoDelay(NoDelay); + acceptSocket.NoDelay(ServerInformation.NoDelay); listenSocket.Accept(acceptSocket); DispatchConnection(acceptSocket); diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/Http/TcpListenerSecondary.cs b/src/Microsoft.AspNetCore.Server.Kestrel/Http/TcpListenerSecondary.cs index ce0616171..d52ac62b7 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/Http/TcpListenerSecondary.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/Http/TcpListenerSecondary.cs @@ -21,7 +21,7 @@ protected override UvStreamHandle CreateAcceptSocket() { var acceptSocket = new UvTcpHandle(Log); acceptSocket.Init(Thread.Loop, Thread.QueueCloseHandle); - acceptSocket.NoDelay(NoDelay); + acceptSocket.NoDelay(ServerInformation.NoDelay); return acceptSocket; } } diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/IKestrelServerInformation.cs b/src/Microsoft.AspNetCore.Server.Kestrel/IKestrelServerInformation.cs index a08db08ea..fa8159187 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/IKestrelServerInformation.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/IKestrelServerInformation.cs @@ -12,17 +12,13 @@ public interface IKestrelServerInformation bool NoDelay { get; set; } /// - /// Gets or sets a flag that instructs whether it is safe to - /// reuse the Request and Response objects + /// Gets or sets values that instruct whether it is safe to + /// pool the Request and Response objects, Headers etc /// for another request after the Response's OnCompleted callback has fired. - /// When this is set to true it is not safe to retain references to these streams after this event has fired. - /// It is false by default. + /// When these values are greater than zero it is not safe to retain references to feature components after this event has fired. + /// They are zero by default. /// - /// - /// When this is set to true it is not safe to retain references to these streams after this event has fired. - /// It is false by default. - /// - bool ReuseStreams { get; set; } + KestrelServerPoolingParameters PoolingParameters { get; } IConnectionFilter ConnectionFilter { get; set; } } diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/Infrastructure/HttpComponentFactory.cs b/src/Microsoft.AspNetCore.Server.Kestrel/Infrastructure/HttpComponentFactory.cs new file mode 100644 index 000000000..f58102c1b --- /dev/null +++ b/src/Microsoft.AspNetCore.Server.Kestrel/Infrastructure/HttpComponentFactory.cs @@ -0,0 +1,123 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Collections.Concurrent; +using System.Text; +using Microsoft.AspNetCore.Server.Kestrel.Http; + +namespace Microsoft.AspNetCore.Server.Kestrel.Infrastructure +{ + class HttpComponentFactory : IHttpComponentFactory + { + + private ConcurrentQueue _streamPool = new ConcurrentQueue(); + private ConcurrentQueue _headerPool = new ConcurrentQueue(); + + public IKestrelServerInformation ServerInformation { get; set; } + + public HttpComponentFactory(IKestrelServerInformation serverInformation) + { + ServerInformation = serverInformation; + } + + public Streams CreateStreams(FrameContext owner) + { + Streams streams; + + if (!_streamPool.TryDequeue(out streams)) + { + streams = new Streams(); + } + + streams.Initialize(owner); + + return streams; + } + + public void DisposeStreams(Streams streams, bool poolingPermitted) + { + if (poolingPermitted && _streamPool.Count < ServerInformation.PoolingParameters.MaxPooledStreams) + { + streams.Uninitialize(); + + _streamPool.Enqueue(streams); + } + } + + public Headers CreateHeaders(DateHeaderValueManager dateValueManager) + { + Headers headers; + + if (!_headerPool.TryDequeue(out headers)) + { + headers = new Headers(); + } + + headers.Initialize(dateValueManager); + + return headers; + } + + public void DisposeHeaders(Headers headers, bool poolingPermitted) + { + if (poolingPermitted && _headerPool.Count < ServerInformation.PoolingParameters.MaxPooledHeaders) + { + headers.Uninitialize(); + + _headerPool.Enqueue(headers); + } + } + } + + internal class Headers + { + public static readonly byte[] BytesServer = Encoding.ASCII.GetBytes("\r\nServer: Kestrel"); + + public readonly FrameRequestHeaders RequestHeaders = new FrameRequestHeaders(); + public readonly FrameResponseHeaders ResponseHeaders = new FrameResponseHeaders(); + + public Headers() + { + RequestHeaders = new FrameRequestHeaders(); + ResponseHeaders = new FrameResponseHeaders(); + } + + public void Initialize(DateHeaderValueManager dateValueManager) + { + ResponseHeaders.SetRawDate( + dateValueManager.GetDateHeaderValue(), + dateValueManager.GetDateHeaderValueBytes()); + ResponseHeaders.SetRawServer("Kestrel", BytesServer); + } + + public void Uninitialize() + { + RequestHeaders.Reset(); + ResponseHeaders.Reset(); + } + } + + internal class Streams + { + public readonly FrameRequestStream RequestBody; + public readonly FrameResponseStream ResponseBody; + public readonly FrameDuplexStream DuplexStream; + + public Streams() + { + RequestBody = new FrameRequestStream(); + ResponseBody = new FrameResponseStream(); + DuplexStream = new FrameDuplexStream(RequestBody, ResponseBody); + } + + public void Initialize(FrameContext renter) + { + ResponseBody.Initialize(renter); + } + + public void Uninitialize() + { + ResponseBody.Uninitialize(); + } + } +} diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/Infrastructure/IHttpComponentFactory.cs b/src/Microsoft.AspNetCore.Server.Kestrel/Infrastructure/IHttpComponentFactory.cs new file mode 100644 index 000000000..620c663fb --- /dev/null +++ b/src/Microsoft.AspNetCore.Server.Kestrel/Infrastructure/IHttpComponentFactory.cs @@ -0,0 +1,20 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Server.Kestrel.Http; + +namespace Microsoft.AspNetCore.Server.Kestrel.Infrastructure +{ + interface IHttpComponentFactory + { + IKestrelServerInformation ServerInformation { get; set; } + + Streams CreateStreams(FrameContext owner); + + void DisposeStreams(Streams streams, bool poolingPermitted); + + Headers CreateHeaders(DateHeaderValueManager dateValueManager); + + void DisposeHeaders(Headers headers, bool poolingPermitted); + } +} diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/KestrelServer.cs b/src/Microsoft.AspNetCore.Server.Kestrel/KestrelServer.cs index fed5bea66..b6768de67 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/KestrelServer.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/KestrelServer.cs @@ -54,6 +54,7 @@ public void Start(IHttpApplication application) try { var information = (KestrelServerInformation)Features.Get(); + var componentFactory = Features.Get(); var dateHeaderValueManager = new DateHeaderValueManager(); var trace = new KestrelTrace(_logger); var engine = new KestrelEngine(new ServiceContext @@ -66,9 +67,8 @@ public void Start(IHttpApplication application) Log = trace, ThreadPool = new LoggingThreadPool(trace), DateHeaderValueManager = dateHeaderValueManager, - ConnectionFilter = information.ConnectionFilter, - NoDelay = information.NoDelay, - ReuseStreams = information.ReuseStreams + ServerInformation = information, + HttpComponentFactory = componentFactory }); _disposables.Push(engine); diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/KestrelServerInformation.cs b/src/Microsoft.AspNetCore.Server.Kestrel/KestrelServerInformation.cs index 6f05a1da5..b1d4d335a 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/KestrelServerInformation.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/KestrelServerInformation.cs @@ -22,7 +22,7 @@ public KestrelServerInformation(IConfiguration configuration) Addresses = GetAddresses(configuration); ThreadCount = GetThreadCount(configuration); NoDelay = GetNoDelay(configuration); - ReuseStreams = GetReuseStreams(configuration); + PoolingParameters = new KestrelServerPoolingParameters(configuration); } public ICollection Addresses { get; } @@ -31,7 +31,7 @@ public KestrelServerInformation(IConfiguration configuration) public bool NoDelay { get; set; } - public bool ReuseStreams { get; set; } + public KestrelServerPoolingParameters PoolingParameters { get; } public IConnectionFilter ConnectionFilter { get; set; } @@ -110,18 +110,5 @@ private static bool GetNoDelay(IConfiguration configuration) return true; } - - private static bool GetReuseStreams(IConfiguration configuration) - { - var reuseStreamsString = configuration["kestrel.reuseStreams"]; - - bool reuseStreams; - if (bool.TryParse(reuseStreamsString, out reuseStreams)) - { - return reuseStreams; - } - - return false; - } } } diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/KestrelServerPoolingParameters.cs b/src/Microsoft.AspNetCore.Server.Kestrel/KestrelServerPoolingParameters.cs new file mode 100644 index 000000000..9a019d1d9 --- /dev/null +++ b/src/Microsoft.AspNetCore.Server.Kestrel/KestrelServerPoolingParameters.cs @@ -0,0 +1,43 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Globalization; +using Microsoft.Extensions.Configuration; + +namespace Microsoft.AspNetCore.Server.Kestrel +{ + public class KestrelServerPoolingParameters + { + public KestrelServerPoolingParameters(IConfiguration configuration) + { + if (configuration == null) + { + throw new ArgumentNullException(nameof(configuration)); + } + + MaxPooledStreams = GetPooledCount(configuration["kestrel.maxPooledStreams"]); + MaxPooledHeaders = GetPooledCount(configuration["kestrel.maxPooledHeaders"]); + } + + public int MaxPooledStreams { get; set; } + + public int MaxPooledHeaders { get; set; } + + private static int GetPooledCount(string countString) + { + if (string.IsNullOrEmpty(countString)) + { + return 0; + } + + int count; + if (int.TryParse(countString, NumberStyles.Integer, CultureInfo.InvariantCulture, out count)) + { + return count; + } + + return 0; + } + } +} diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/ServerFactory.cs b/src/Microsoft.AspNetCore.Server.Kestrel/ServerFactory.cs index 06a7fb368..c6bf62f60 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/ServerFactory.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/ServerFactory.cs @@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Hosting.Server; using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Server.Features; +using Microsoft.AspNetCore.Server.Kestrel.Infrastructure; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; @@ -28,8 +29,10 @@ public ServerFactory(IApplicationLifetime appLifetime, ILoggerFactory loggerFact public IServer CreateServer(IConfiguration configuration) { var information = new KestrelServerInformation(configuration); + var componentFactory = new HttpComponentFactory(information); var serverFeatures = new FeatureCollection(); serverFeatures.Set(information); + serverFeatures.Set(componentFactory); serverFeatures.Set(information); return new KestrelServer(serverFeatures, _appLifetime, _loggerFactory.CreateLogger("Microsoft.AspNetCore.Server.Kestrel")); } diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/ServiceContext.cs b/src/Microsoft.AspNetCore.Server.Kestrel/ServiceContext.cs index a299ff946..f702fd1c5 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/ServiceContext.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/ServiceContext.cs @@ -24,9 +24,8 @@ public ServiceContext(ServiceContext context) ThreadPool = context.ThreadPool; FrameFactory = context.FrameFactory; DateHeaderValueManager = context.DateHeaderValueManager; - ConnectionFilter = context.ConnectionFilter; - NoDelay = context.NoDelay; - ReuseStreams = context.ReuseStreams; + ServerInformation = context.ServerInformation; + HttpComponentFactory = context.HttpComponentFactory; } public IApplicationLifetime AppLifetime { get; set; } @@ -39,10 +38,8 @@ public ServiceContext(ServiceContext context) public DateHeaderValueManager DateHeaderValueManager { get; set; } - public IConnectionFilter ConnectionFilter { get; set; } + public IKestrelServerInformation ServerInformation { get; set; } - public bool NoDelay { get; set; } - - public bool ReuseStreams { get; set; } + internal IHttpComponentFactory HttpComponentFactory { get; set; } } } diff --git a/test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/RequestTests.cs b/test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/RequestTests.cs index 3f9b0870d..a6fac125e 100644 --- a/test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/RequestTests.cs +++ b/test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/RequestTests.cs @@ -132,7 +132,7 @@ public async Task DoesNotHangOnConnectionCloseRequest() [ConditionalFact] [FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")] - public async Task RequestPathIsNormalized() + public void RequestPathIsNormalized() { var port = PortManager.GetPort(); var config = new ConfigurationBuilder().AddInMemoryCollection( diff --git a/test/Microsoft.AspNetCore.Server.KestrelTests/ConnectionFilterTests.cs b/test/Microsoft.AspNetCore.Server.KestrelTests/ConnectionFilterTests.cs index 353d998e5..dce414fa3 100644 --- a/test/Microsoft.AspNetCore.Server.KestrelTests/ConnectionFilterTests.cs +++ b/test/Microsoft.AspNetCore.Server.KestrelTests/ConnectionFilterTests.cs @@ -36,10 +36,8 @@ private async Task App(HttpContext httpContext) public async Task CanReadAndWriteWithRewritingConnectionFilter() { var filter = new RewritingConnectionFilter(); - var serviceContext = new TestServiceContext() - { - ConnectionFilter = filter - }; + var serviceContext = new TestServiceContext(filter); + var sendString = "POST / HTTP/1.0\r\n\r\nHello World?"; using (var server = new TestServer(App, serviceContext)) @@ -62,10 +60,7 @@ await connection.ReceiveEnd( [FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")] public async Task CanReadAndWriteWithAsyncConnectionFilter() { - var serviceContext = new TestServiceContext() - { - ConnectionFilter = new AsyncConnectionFilter() - }; + var serviceContext = new TestServiceContext(new AsyncConnectionFilter()); using (var server = new TestServer(App, serviceContext)) { @@ -87,10 +82,7 @@ await connection.ReceiveEnd( [FrameworkSkipCondition(RuntimeFrameworks.Mono, SkipReason = "Test hangs after execution on Mono.")] public async Task ThrowingSynchronousConnectionFilterDoesNotCrashServer() { - var serviceContext = new TestServiceContext() - { - ConnectionFilter = new ThrowingConnectionFilter() - }; + var serviceContext = new TestServiceContext(new ThrowingConnectionFilter()); using (var server = new TestServer(App, serviceContext)) { diff --git a/test/Microsoft.AspNetCore.Server.KestrelTests/EngineTests.cs b/test/Microsoft.AspNetCore.Server.KestrelTests/EngineTests.cs index 42315796d..73c159299 100644 --- a/test/Microsoft.AspNetCore.Server.KestrelTests/EngineTests.cs +++ b/test/Microsoft.AspNetCore.Server.KestrelTests/EngineTests.cs @@ -35,10 +35,7 @@ public static TheoryData ConnectionFilterData new TestServiceContext() }, { - new TestServiceContext - { - ConnectionFilter = new PassThroughConnectionFilter() - } + new TestServiceContext(new PassThroughConnectionFilter()) } }; } @@ -188,7 +185,7 @@ await connection.ReceiveEnd( [MemberData(nameof(ConnectionFilterData))] public async Task ReuseStreamsOn(ServiceContext testContext) { - testContext.ReuseStreams = true; + testContext.ServerInformation.PoolingParameters.MaxPooledStreams = 120; var streamCount = 0; var loopCount = 20; @@ -231,7 +228,7 @@ public async Task ReuseStreamsOn(ServiceContext testContext) [MemberData(nameof(ConnectionFilterData))] public async Task ReuseStreamsOff(ServiceContext testContext) { - testContext.ReuseStreams = false; + testContext.ServerInformation.PoolingParameters.MaxPooledStreams = 0; var streamCount = 0; var loopCount = 20; diff --git a/test/Microsoft.AspNetCore.Server.KestrelTests/FrameResponseHeadersTests.cs b/test/Microsoft.AspNetCore.Server.KestrelTests/FrameResponseHeadersTests.cs index 5fa4f6bec..30c03a0b3 100644 --- a/test/Microsoft.AspNetCore.Server.KestrelTests/FrameResponseHeadersTests.cs +++ b/test/Microsoft.AspNetCore.Server.KestrelTests/FrameResponseHeadersTests.cs @@ -5,6 +5,8 @@ using System.Collections.Generic; using Microsoft.AspNetCore.Server.Kestrel; using Microsoft.AspNetCore.Server.Kestrel.Http; +using Microsoft.AspNetCore.Server.Kestrel.Infrastructure; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Primitives; using Xunit; @@ -15,12 +17,18 @@ public class FrameResponseHeadersTests [Fact] public void InitialDictionaryContainsServerAndDate() { + var configuration = new ConfigurationBuilder().Build(); + var serverInformation = new KestrelServerInformation(configuration); var connectionContext = new ConnectionContext { DateHeaderValueManager = new DateHeaderValueManager(), - ServerAddress = ServerAddress.FromUrl("http://localhost:5000") - }; - var frame = new Frame(application: null, context: connectionContext); + ServerAddress = ServerAddress.FromUrl("http://localhost:5000"), + ServerInformation = serverInformation, + HttpComponentFactory = new HttpComponentFactory(serverInformation) + }; + var frame = new Frame(application: null, context: connectionContext) + .InitializeHeaders(); + IDictionary headers = frame.ResponseHeaders; Assert.Equal(2, headers.Count); @@ -43,13 +51,18 @@ public void InitialDictionaryContainsServerAndDate() [Fact] public void InitialEntriesCanBeCleared() { + var configuration = new ConfigurationBuilder().Build(); + var serverInformation = new KestrelServerInformation(configuration); var connectionContext = new ConnectionContext { DateHeaderValueManager = new DateHeaderValueManager(), - ServerAddress = ServerAddress.FromUrl("http://localhost:5000") + ServerAddress = ServerAddress.FromUrl("http://localhost:5000"), + ServerInformation = serverInformation, + HttpComponentFactory = new HttpComponentFactory(serverInformation) }; - var frame = new Frame(application: null, context: connectionContext); - + var frame = new Frame(application: null, context: connectionContext) + .InitializeHeaders(); + Assert.True(frame.ResponseHeaders.Count > 0); frame.ResponseHeaders.Clear(); diff --git a/test/Microsoft.AspNetCore.Server.KestrelTests/HttpsConnectionFilterTests.cs b/test/Microsoft.AspNetCore.Server.KestrelTests/HttpsConnectionFilterTests.cs index e3bed702b..3758a54fc 100644 --- a/test/Microsoft.AspNetCore.Server.KestrelTests/HttpsConnectionFilterTests.cs +++ b/test/Microsoft.AspNetCore.Server.KestrelTests/HttpsConnectionFilterTests.cs @@ -59,13 +59,11 @@ public async Task CanReadAndWriteWithHttpsConnectionFilter() handler.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true; #endif var serverAddress = $"https://localhost:{TestServer.GetNextPort()}/"; - var serviceContext = new TestServiceContext() - { - ConnectionFilter = new HttpsConnectionFilter( + var serviceContext = new TestServiceContext(new HttpsConnectionFilter( new HttpsConnectionFilterOptions - { ServerCertificate = new X509Certificate2(@"TestResources/testCert.pfx", "testPassword")}, + { ServerCertificate = new X509Certificate2(@"TestResources/testCert.pfx", "testPassword") }, new NoOpConnectionFilter()) - }; + ); using (var server = new TestServer(App, serviceContext, serverAddress)) { @@ -108,16 +106,14 @@ public async Task RequireCertificateFailsWhenNoCertificate() #endif var serverAddress = $"https://localhost:{TestServer.GetNextPort()}/"; - var serviceContext = new TestServiceContext() - { - ConnectionFilter = new HttpsConnectionFilter( + var serviceContext = new TestServiceContext(new HttpsConnectionFilter( new HttpsConnectionFilterOptions { ServerCertificate = new X509Certificate2(@"TestResources/testCert.pfx", "testPassword"), ClientCertificateMode = ClientCertificateMode.RequireCertificate }, new NoOpConnectionFilter()) - }; + ); using (var server = new TestServer(App, serviceContext, serverAddress)) { @@ -157,16 +153,14 @@ public async Task AllowCertificateContinuesWhenNoCertificate() #endif var serverAddress = $"https://localhost:{TestServer.GetNextPort()}/"; - var serviceContext = new TestServiceContext() - { - ConnectionFilter = new HttpsConnectionFilter( - new HttpsConnectionFilterOptions - { - ServerCertificate = new X509Certificate2(@"TestResources/testCert.pfx", "testPassword"), - ClientCertificateMode = ClientCertificateMode.AllowCertificate - }, - new NoOpConnectionFilter()) - }; + var serviceContext = new TestServiceContext(new HttpsConnectionFilter( + new HttpsConnectionFilterOptions + { + ServerCertificate = new X509Certificate2(@"TestResources/testCert.pfx", "testPassword"), + ClientCertificateMode = ClientCertificateMode.AllowCertificate + }, + new NoOpConnectionFilter()) + ); RequestDelegate app = context => { @@ -209,17 +203,15 @@ public async Task CertificatePassedToHttpContext() #endif var serverAddress = $"https://localhost:{TestServer.GetNextPort()}/"; - var serviceContext = new TestServiceContext() - { - ConnectionFilter = new HttpsConnectionFilter( - new HttpsConnectionFilterOptions - { - ServerCertificate = new X509Certificate2(@"TestResources/testCert.pfx", "testPassword"), - ClientCertificateMode = ClientCertificateMode.RequireCertificate, - ClientCertificateValidation = (certificate, chain, sslPolicyErrors) => true - }, - new NoOpConnectionFilter()) - }; + var serviceContext = new TestServiceContext(new HttpsConnectionFilter( + new HttpsConnectionFilterOptions + { + ServerCertificate = new X509Certificate2(@"TestResources/testCert.pfx", "testPassword"), + ClientCertificateMode = ClientCertificateMode.RequireCertificate, + ClientCertificateValidation = (certificate, chain, sslPolicyErrors) => true + }, + new NoOpConnectionFilter()) + ); RequestDelegate app = context => { @@ -281,15 +273,14 @@ public async Task HttpsSchemePassedToRequestFeature() #endif var serverAddress = $"https://localhost:{TestServer.GetNextPort()}/"; - var serviceContext = new TestServiceContext() - { - ConnectionFilter = new HttpsConnectionFilter( + var serviceContext = new TestServiceContext( + new HttpsConnectionFilter( new HttpsConnectionFilterOptions { ServerCertificate = new X509Certificate2(@"TestResources/testCert.pfx", "testPassword") }, new NoOpConnectionFilter()) - }; + ); RequestDelegate app = context => context.Response.WriteAsync(context.Request.Scheme); diff --git a/test/Microsoft.AspNetCore.Server.KestrelTests/KestrelServerInformationTests.cs b/test/Microsoft.AspNetCore.Server.KestrelTests/KestrelServerInformationTests.cs index 9818d9d42..d8594e623 100644 --- a/test/Microsoft.AspNetCore.Server.KestrelTests/KestrelServerInformationTests.cs +++ b/test/Microsoft.AspNetCore.Server.KestrelTests/KestrelServerInformationTests.cs @@ -86,19 +86,19 @@ public void SetNoDelayUsingConfiguration() } [Theory] - [InlineData(null, false)] - [InlineData("", false)] - [InlineData("false", false)] - [InlineData("False", false)] - [InlineData("true", true)] - [InlineData("True", true)] - [InlineData("Foo", false)] - [InlineData("FooBar", false)] - public void SetReuseStreamsUsingConfiguration(string input, bool expected) + [InlineData(null, 0)] + [InlineData("", 0)] + [InlineData("0", 0)] + [InlineData("00", 0)] + [InlineData("0.0", 0)] + [InlineData("1", 1)] + [InlineData("16", 16)] + [InlineData("1000", 1000)] + public void SetMaxPooledStreamsUsingConfiguration(string input, int expected) { var values = new Dictionary { - { "kestrel.reuseStreams", input } + { "kestrel.maxPooledStreams", input } }; var configuration = new ConfigurationBuilder() @@ -107,7 +107,33 @@ public void SetReuseStreamsUsingConfiguration(string input, bool expected) var information = new KestrelServerInformation(configuration); - Assert.Equal(expected, information.ReuseStreams); + Assert.Equal(expected, information.PoolingParameters.MaxPooledStreams); + } + + + [Theory] + [InlineData(null, 0)] + [InlineData("", 0)] + [InlineData("0", 0)] + [InlineData("00", 0)] + [InlineData("0.0", 0)] + [InlineData("1", 1)] + [InlineData("16", 16)] + [InlineData("1000", 1000)] + public void SetMaxPooledHeadersUsingConfiguration(string input, int expected) + { + var values = new Dictionary + { + { "kestrel.maxPooledHeaders", input } + }; + + var configuration = new ConfigurationBuilder() + .AddInMemoryCollection(values) + .Build(); + + var information = new KestrelServerInformation(configuration); + + Assert.Equal(expected, information.PoolingParameters.MaxPooledHeaders); } private static int Clamp(int value, int min, int max) diff --git a/test/Microsoft.AspNetCore.Server.KestrelTests/TestServiceContext.cs b/test/Microsoft.AspNetCore.Server.KestrelTests/TestServiceContext.cs index 4224c776d..0ac9c5c76 100644 --- a/test/Microsoft.AspNetCore.Server.KestrelTests/TestServiceContext.cs +++ b/test/Microsoft.AspNetCore.Server.KestrelTests/TestServiceContext.cs @@ -3,8 +3,10 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Server.Kestrel; +using Microsoft.AspNetCore.Server.Kestrel.Filter; using Microsoft.AspNetCore.Server.Kestrel.Http; using Microsoft.AspNetCore.Server.Kestrel.Infrastructure; +using Microsoft.Extensions.Configuration; namespace Microsoft.AspNetCore.Server.KestrelTests { @@ -18,6 +20,16 @@ public TestServiceContext() Log = new TestKestrelTrace(); ThreadPool = new LoggingThreadPool(Log); DateHeaderValueManager = new TestDateHeaderValueManager(); + + var configuration = new ConfigurationBuilder().Build(); + ServerInformation = new KestrelServerInformation(configuration); + HttpComponentFactory = new HttpComponentFactory(ServerInformation); + } + + public TestServiceContext(IConnectionFilter filter) + : base() + { + ServerInformation.ConnectionFilter = filter; } public RequestDelegate App diff --git a/tools/Microsoft.AspNetCore.Server.Kestrel.GeneratedCode/KnownHeaders.cs b/tools/Microsoft.AspNetCore.Server.Kestrel.GeneratedCode/KnownHeaders.cs index 32a5f057e..1593da3ac 100644 --- a/tools/Microsoft.AspNetCore.Server.Kestrel.GeneratedCode/KnownHeaders.cs +++ b/tools/Microsoft.AspNetCore.Server.Kestrel.GeneratedCode/KnownHeaders.cs @@ -216,10 +216,7 @@ public partial class {loop.ClassName} : "")} private long _bits = 0; - {Each(loop.Headers, header => @" - private StringValues _" + header.Identifier + ";")} - {Each(loop.Headers.Where(header => header.EnhancedSetter), header => @" - private byte[] _raw" + header.Identifier + ";")} + private HeaderReferences _headers; {Each(loop.Headers, header => $@" public StringValues Header{header.Identifier} {{ @@ -227,23 +224,23 @@ public StringValues Header{header.Identifier} {{ if ({header.TestBit()}) {{ - return _{header.Identifier}; + return _headers._{header.Identifier}; }} return StringValues.Empty; }} set {{ {header.SetBit()}; - _{header.Identifier} = value; {(header.EnhancedSetter == false ? "" : $@" - _raw{header.Identifier} = null;")} + _headers._{header.Identifier} = value; {(header.EnhancedSetter == false ? "" : $@" + _headers._raw{header.Identifier} = null;")} }} }}")} {Each(loop.Headers.Where(header => header.EnhancedSetter), header => $@" public void SetRaw{header.Identifier}(StringValues value, byte[] raw) {{ {header.SetBit()}; - _{header.Identifier} = value; - _raw{header.Identifier} = raw; + _headers._{header.Identifier} = value; + _headers._raw{header.Identifier} = raw; }}")} protected override int GetCountFast() {{ @@ -259,11 +256,11 @@ protected override StringValues GetValueFast(string key) {{ if ({header.TestBit()}) {{ - return _{header.Identifier}; + return _headers._{header.Identifier}; }} else {{ - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); }} }} ")}}} @@ -271,7 +268,7 @@ protected override StringValues GetValueFast(string key) ")}}} if (MaybeUnknown == null) {{ - throw new System.Collections.Generic.KeyNotFoundException(); + ThrowKeyNotFoundException(); }} return MaybeUnknown[key]; }} @@ -285,7 +282,7 @@ protected override bool TryGetValueFast(string key, out StringValues value) {{ if ({header.TestBit()}) {{ - value = _{header.Identifier}; + value = _headers._{header.Identifier}; return true; }} else @@ -309,8 +306,8 @@ protected override void SetValueFast(string key, StringValues value) if (""{header.Name}"".Equals(key, StringComparison.OrdinalIgnoreCase)) {{ {header.SetBit()}; - _{header.Identifier} = value;{(header.EnhancedSetter == false ? "" : $@" - _raw{header.Identifier} = null;")} + _headers._{header.Identifier} = value;{(header.EnhancedSetter == false ? "" : $@" + _headers._raw{header.Identifier} = null;")} return; }} ")}}} @@ -328,11 +325,11 @@ protected override void AddValueFast(string key, StringValues value) {{ if ({header.TestBit()}) {{ - throw new ArgumentException(""An item with the same key has already been added.""); + ThrowDuplicateKeyException(); }} {header.SetBit()}; - _{header.Identifier} = value;{(header.EnhancedSetter == false ? "" : $@" - _raw{header.Identifier} = null;")} + _headers._{header.Identifier} = value;{(header.EnhancedSetter == false ? "" : $@" + _headers._raw{header.Identifier} = null;")} return; }} ")}}} @@ -351,8 +348,8 @@ protected override bool RemoveFast(string key) if ({header.TestBit()}) {{ {header.ClearBit()}; - _{header.Identifier} = StringValues.Empty;{(header.EnhancedSetter == false ? "" : $@" - _raw{header.Identifier} = null;")} + _headers._{header.Identifier} = StringValues.Empty;{(header.EnhancedSetter == false ? "" : $@" + _headers._raw{header.Identifier} = null;")} return true; }} else @@ -368,6 +365,7 @@ protected override bool RemoveFast(string key) protected override void ClearFast() {{ _bits = 0; + _headers = default(HeaderReferences); MaybeUnknown?.Clear(); }} @@ -375,17 +373,17 @@ protected override void CopyToFast(KeyValuePair[] array, i {{ if (arrayIndex < 0) {{ - throw new ArgumentException(); + ThrowArgumentException(); }} {Each(loop.Headers, header => $@" if ({header.TestBit()}) {{ if (arrayIndex == array.Length) {{ - throw new ArgumentException(); + ThrowArgumentException(); }} - array[arrayIndex] = new KeyValuePair(""{header.Name}"", _{header.Identifier}); + array[arrayIndex] = new KeyValuePair(""{header.Name}"", _headers._{header.Identifier}); ++arrayIndex; }} ")} @@ -397,12 +395,12 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) {Each(loop.Headers, header => $@" if ({header.TestBit()}) {{ {(header.EnhancedSetter == false ? "" : $@" - if (_raw{header.Identifier} != null) + if (_headers._raw{header.Identifier} != null) {{ - output.CopyFrom(_raw{header.Identifier}, 0, _raw{header.Identifier}.Length); + output.CopyFrom(_headers._raw{header.Identifier}, 0, _headers._raw{header.Identifier}.Length); }} else ")} - foreach (var value in _{header.Identifier}) + foreach (var value in _headers._{header.Identifier}) {{ if (value != null) {{ @@ -413,6 +411,7 @@ protected void CopyToFast(ref MemoryPoolIterator2 output) }} ")} }}" : "")} + {(loop.ClassName == "FrameRequestHeaders" ? $@" public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string value) {{ fixed (byte* ptr = &keyBytes[keyOffset]) @@ -429,13 +428,13 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string {{ if ({header.TestBit()}) {{ - _{header.Identifier} = AppendValue(_{header.Identifier}, value); + _headers._{header.Identifier} = AppendValue(_headers._{header.Identifier}, value); }} else {{ {header.SetBit()}; - _{header.Identifier} = new StringValues(value);{(header.EnhancedSetter == false ? "" : $@" - _raw{header.Identifier} = null;")} + _headers._{header.Identifier} = new StringValues(value);{(header.EnhancedSetter == false ? "" : $@" + _headers._raw{header.Identifier} = null;")} }} return; }} @@ -447,7 +446,14 @@ public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string StringValues existing; Unknown.TryGetValue(key, out existing); Unknown[key] = AppendValue(existing, value); + }}" : "")} + private struct HeaderReferences + {{{Each(loop.Headers, header => @" + public StringValues _" + header.Identifier + ";")} + {Each(loop.Headers.Where(header => header.EnhancedSetter), header => @" + public byte[] _raw" + header.Identifier + ";")} }} + public partial struct Enumerator {{ public bool MoveNext() @@ -465,7 +471,7 @@ public bool MoveNext() state{header.Index}: if ({header.TestBit()}) {{ - _current = new KeyValuePair(""{header.Name}"", _collection._{header.Identifier}); + _current = new KeyValuePair(""{header.Name}"", _collection._headers._{header.Identifier}); _state = {header.Index + 1}; return true; }}