Using the well-known-header field without checking set bit

This commit is contained in:
Louis DeJardin 2015-09-25 11:14:54 -07:00
parent b6c272cd5b
commit 0adbbd0217
2 changed files with 144 additions and 576 deletions

View File

@ -182,16 +182,9 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
public StringValues Header{header.Identifier} public StringValues Header{header.Identifier}
{{ {{
get get
{{
if ({header.TestBit()})
{{ {{
return _{header.Identifier}; return _{header.Identifier};
}} }}
else
{{
return StringValues.Empty;
}}
}}
set set
{{ {{
{header.SetBit()}; {header.SetBit()};
@ -316,6 +309,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
if ({header.TestBit()}) if ({header.TestBit()})
{{ {{
{header.ClearBit()}; {header.ClearBit()};
_{header.Identifier} = StringValues.Empty;
return true; return true;
}} }}
else else