Merge remote-tracking branch 'origin/rel/2.0.0-preview1' into dev
This commit is contained in:
commit
3d0b97cab9
|
|
@ -5,6 +5,7 @@ using System;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Server.HttpSys;
|
using Microsoft.AspNetCore.Server.HttpSys;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace ServerComparison.TestSites
|
namespace ServerComparison.TestSites
|
||||||
{
|
{
|
||||||
|
|
@ -18,6 +19,11 @@ namespace ServerComparison.TestSites
|
||||||
|
|
||||||
var builder = new WebHostBuilder()
|
var builder = new WebHostBuilder()
|
||||||
.UseConfiguration(config)
|
.UseConfiguration(config)
|
||||||
|
.ConfigureLogging((_, factory) =>
|
||||||
|
{
|
||||||
|
factory.AddConsole();
|
||||||
|
factory.AddFilter("Console", level => level >= LogLevel.Warning);
|
||||||
|
})
|
||||||
.UseIISIntegration()
|
.UseIISIntegration()
|
||||||
.UseStartup("ServerComparison.TestSites");
|
.UseStartup("ServerComparison.TestSites");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,6 @@ namespace ServerComparison.TestSites
|
||||||
{
|
{
|
||||||
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
|
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
|
||||||
{
|
{
|
||||||
loggerFactory.AddConsole(minLevel: LogLevel.Warning);
|
|
||||||
|
|
||||||
app.Run(ctx =>
|
app.Run(ctx =>
|
||||||
{
|
{
|
||||||
return ctx.Response.WriteAsync("Hello World");
|
return ctx.Response.WriteAsync("Hello World");
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,6 @@ namespace ServerComparison.TestSites
|
||||||
{
|
{
|
||||||
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
|
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
|
||||||
{
|
{
|
||||||
loggerFactory.AddConsole(minLevel: LogLevel.Warning);
|
|
||||||
|
|
||||||
app.Use(async (context, next) =>
|
app.Use(async (context, next) =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,6 @@ namespace ServerComparison.TestSites
|
||||||
|
|
||||||
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
|
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
|
||||||
{
|
{
|
||||||
loggerFactory.AddConsole(minLevel: LogLevel.Warning);
|
|
||||||
|
|
||||||
// NGinx's default min size is 20 bytes
|
// NGinx's default min size is 20 bytes
|
||||||
var helloWorldBody = "Hello World;" + new string('a', 20);
|
var helloWorldBody = "Hello World;" + new string('a', 20);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,6 @@ namespace ServerComparison.TestSites
|
||||||
{
|
{
|
||||||
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
|
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
|
||||||
{
|
{
|
||||||
loggerFactory.AddConsole(minLevel: LogLevel.Warning);
|
|
||||||
|
|
||||||
app.Map("/contentlength", subApp =>
|
app.Map("/contentlength", subApp =>
|
||||||
{
|
{
|
||||||
subApp.Run(context =>
|
subApp.Run(context =>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue