Enable IIS connection: close test.
This commit is contained in:
parent
a5daae325e
commit
eaecffb9d7
|
|
@ -34,9 +34,9 @@ namespace ServerComparison.FunctionalTests
|
||||||
return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync);
|
return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync);
|
||||||
}
|
}
|
||||||
|
|
||||||
// [ConditionalTheory]
|
[ConditionalTheory]
|
||||||
// [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||||
// TODO: Not supported [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5071/")]
|
[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5071/")]
|
||||||
// https://github.com/aspnet/Helios/issues/148
|
// https://github.com/aspnet/Helios/issues/148
|
||||||
// TODO: Chunks anyways [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")]
|
// TODO: Chunks anyways [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")]
|
||||||
// https://github.com/aspnet/WebListener/issues/113
|
// https://github.com/aspnet/WebListener/issues/113
|
||||||
|
|
@ -155,8 +155,8 @@ namespace ServerComparison.FunctionalTests
|
||||||
var response = await client.GetAsync("connectionclose");
|
var response = await client.GetAsync("connectionclose");
|
||||||
responseText = await response.Content.ReadAsStringAsync();
|
responseText = await response.Content.ReadAsStringAsync();
|
||||||
Assert.Equal("Connnection Close", responseText);
|
Assert.Equal("Connnection Close", responseText);
|
||||||
Assert.Null(response.Headers.TransferEncodingChunked);
|
|
||||||
Assert.True(response.Headers.ConnectionClose, "/connectionclose, closed?");
|
Assert.True(response.Headers.ConnectionClose, "/connectionclose, closed?");
|
||||||
|
Assert.Null(response.Headers.TransferEncodingChunked);
|
||||||
Assert.Null(GetContentLength(response));
|
Assert.Null(GetContentLength(response));
|
||||||
}
|
}
|
||||||
catch (XunitException)
|
catch (XunitException)
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,11 @@ namespace ServerComparison.TestSites
|
||||||
|
|
||||||
app.Map("/connectionclose", subApp =>
|
app.Map("/connectionclose", subApp =>
|
||||||
{
|
{
|
||||||
subApp.Run(context =>
|
subApp.Run(async context =>
|
||||||
{
|
{
|
||||||
context.Response.Headers[HeaderNames.Connection] = "close";
|
context.Response.Headers[HeaderNames.Connection] = "close";
|
||||||
return context.Response.WriteAsync("Connnection Close");
|
await context.Response.WriteAsync("Connnection Close");
|
||||||
|
await context.Response.Body.FlushAsync(); // Bypass IIS write-behind buffering
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue