test fixes and whitespace changes to generated code

This commit is contained in:
Nathan Anderson 2016-10-20 15:23:03 -07:00
parent 11ed34f229
commit 610601cc6e
3 changed files with 569 additions and 663 deletions

View File

@ -712,8 +712,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
await connection.Receive(
$"HTTP/1.1 200 OK",
$"Date: {server.Context.DateHeaderValue}",
"Transfer-Encoding: chunked",
"Content-Length: 13",
"Transfer-Encoding: chunked",
"",
"hello, world");
}
@ -748,8 +748,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
await connection.Receive(
$"HTTP/1.1 200 OK",
$"Date: {server.Context.DateHeaderValue}",
"Transfer-Encoding: chunked",
"Content-Length: 11",
"Transfer-Encoding: chunked",
"",
"hello, world");
}

View File

@ -44,12 +44,9 @@ namespace Microsoft.AspNetCore.Server.Kestrel.GeneratedCode
_headers._raw{header.Identifier} = null;")}
}}
return;
}}
")}}}
break;
")}}}
{(handleUnknown ? $@"
@ -450,17 +447,16 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Http
_bits = 0;
return;
}}
{Each(loop.Headers.OrderBy(h => !h.PrimaryHeader), header => $@"
if ({header.TestBit()})
if ({header.TestBit()})
{{
_headers._{header.Identifier} = default(StringValues);
{header.ClearBit()};
if(_bits == 0)
{{
_headers._{header.Identifier} = default(StringValues);
{header.ClearBit()};
if(_bits == 0)
{{
return;
}}
return;
}}
}}
")}
}}