diff --git a/src/Servers/HttpSys/test/FunctionalTests/ResponseBodyTests.cs b/src/Servers/HttpSys/test/FunctionalTests/ResponseBodyTests.cs index 90634d72cfbf..71b2ce6054e6 100644 --- a/src/Servers/HttpSys/test/FunctionalTests/ResponseBodyTests.cs +++ b/src/Servers/HttpSys/test/FunctionalTests/ResponseBodyTests.cs @@ -212,7 +212,7 @@ public async Task ResponseBody_WriteContentLength_PassedThrough() using (Utilities.CreateHttpServer(out address, async httpContext => { httpContext.Features.Get().AllowSynchronousIO = true; - httpContext.Response.Headers["Content-lenGth"] = " 30 "; + httpContext.Response.Headers["Content-lenGth"] = "30"; Stream stream = httpContext.Response.Body; stream.EndWrite(stream.BeginWrite(new byte[10], 0, 10, null, null)); stream.Write(new byte[10], 0, 10); @@ -236,7 +236,7 @@ public async Task ResponseBody_WriteContentLengthNoneWritten_Throws() string address; using (Utilities.CreateHttpServer(out address, httpContext => { - httpContext.Response.Headers["Content-lenGth"] = " 20 "; + httpContext.Response.Headers["Content-lenGth"] = "20"; return Task.FromResult(0); }, LoggerFactory)) { @@ -250,7 +250,7 @@ public async Task ResponseBody_WriteContentLengthNotEnoughWritten_Throws() string address; using (Utilities.CreateHttpServer(out address, httpContext => { - httpContext.Response.Headers["Content-lenGth"] = " 20 "; + httpContext.Response.Headers["Content-lenGth"] = "20"; return httpContext.Response.Body.WriteAsync(new byte[5], 0, 5); }, LoggerFactory)) { @@ -265,7 +265,7 @@ public async Task ResponseBody_WriteContentLengthTooMuchWritten_Throws() string address; using (Utilities.CreateHttpServer(out address, async httpContext => { - httpContext.Response.Headers["Content-lenGth"] = " 10 "; + httpContext.Response.Headers["Content-lenGth"] = "10"; await httpContext.Response.Body.WriteAsync(new byte[5], 0, 5); await Assert.ThrowsAsync(() => httpContext.Response.Body.WriteAsync(new byte[6], 0, 6)); @@ -286,7 +286,7 @@ public async Task ResponseBody_WriteContentLengthExtraWritten_Throws() try { httpContext.Features.Get().AllowSynchronousIO = true; - httpContext.Response.Headers["Content-lenGth"] = " 10 "; + httpContext.Response.Headers["Content-lenGth"] = "10"; httpContext.Response.Body.Write(new byte[10], 0, 10); httpContext.Response.Body.Write(new byte[9], 0, 9); requestThrew.SetResult(false);