From 354cb18d6304b24063d460e0a41c6c1d51ea4000 Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Mon, 16 Apr 2018 16:54:18 -0700 Subject: [PATCH 01/45] Update version number to 2.2.0 --- version.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.props b/version.props index 9124b26738..db5c0a52bf 100644 --- a/version.props +++ b/version.props @@ -1,7 +1,7 @@ - 2.1.0 - preview3 + 2.2.0 + preview1 $(VersionPrefix) $(VersionPrefix)-$(VersionSuffix)-final t000 From 30600fc80297e9d8fc39c063c4bf0f874865a28a Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Mon, 23 Apr 2018 12:01:01 -0700 Subject: [PATCH 02/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 40 ++++++++++++++++++++-------------------- korebuild-lock.txt | 4 ++-- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 0e00596e51..40e83a856d 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,27 +3,27 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.0-rc1-15774 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 - 2.1.0-rc1-30613 + 2.2.0-preview1-17037 + 2.2.0-preview1-34029 + 2.2.0-preview1-34029 + 2.2.0-preview1-34029 + 2.2.0-preview1-34029 + 2.2.0-preview1-34029 + 2.2.0-preview1-34029 + 2.2.0-preview1-34029 + 2.2.0-preview1-34029 + 2.2.0-preview1-34029 + 2.2.0-preview1-34029 + 2.2.0-preview1-34029 + 2.2.0-preview1-34029 + 2.2.0-preview1-34029 + 2.2.0-preview1-34029 + 2.2.0-preview1-34029 + 2.2.0-preview1-34029 + 2.2.0-preview1-34029 2.0.0 - 2.1.0-rc1-26419-02 - 2.1.0-rc1-30613 + 2.1.0-preview3-26413-05 + 2.2.0-preview1-34029 15.6.1 4.7.49 2.0.1 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index b419d767b9..f27a67b442 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview3-17018 -commithash:af264ca131f212b5ba8aafbc5110fc0fc510a2be +version:2.2.0-preview1-17037 +commithash:557055a86cbdc359c97d4fb1c2d23a3dc7ae731e From da786f920743b50115e4b5142a84018ce7682e77 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 29 Apr 2018 12:08:46 -0700 Subject: [PATCH 03/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 42 ++++++++++++++++++++-------------------- korebuild-lock.txt | 4 ++-- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 40e83a856d..eb0bd9d538 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,30 +3,30 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.2.0-preview1-17037 - 2.2.0-preview1-34029 - 2.2.0-preview1-34029 - 2.2.0-preview1-34029 - 2.2.0-preview1-34029 - 2.2.0-preview1-34029 - 2.2.0-preview1-34029 - 2.2.0-preview1-34029 - 2.2.0-preview1-34029 - 2.2.0-preview1-34029 - 2.2.0-preview1-34029 - 2.2.0-preview1-34029 - 2.2.0-preview1-34029 - 2.2.0-preview1-34029 - 2.2.0-preview1-34029 - 2.2.0-preview1-34029 - 2.2.0-preview1-34029 - 2.2.0-preview1-34029 + 2.2.0-preview1-17042 + 2.2.0-preview1-34066 + 2.2.0-preview1-34066 + 2.2.0-preview1-34066 + 2.2.0-preview1-34066 + 2.2.0-preview1-34066 + 2.2.0-preview1-34066 + 2.2.0-preview1-34066 + 2.2.0-preview1-34066 + 2.2.0-preview1-34066 + 2.2.0-preview1-34066 + 2.2.0-preview1-34066 + 2.2.0-preview1-34066 + 2.2.0-preview1-34066 + 2.2.0-preview1-34066 + 2.2.0-preview1-34066 + 2.2.0-preview1-34066 + 2.2.0-preview1-34066 2.0.0 - 2.1.0-preview3-26413-05 - 2.2.0-preview1-34029 + 2.2.0-preview1-26424-04 + 2.2.0-preview1-34066 15.6.1 4.7.49 - 2.0.1 + 2.0.3 0.8.0 2.3.1 2.4.0-beta.1.build3945 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index f27a67b442..335e579e06 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-17037 -commithash:557055a86cbdc359c97d4fb1c2d23a3dc7ae731e +version:2.2.0-preview1-17042 +commithash:edf0705d014293c260de763543784330514db9a3 From 597ed938ea457e9924070f654284006f6de2bc95 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 6 May 2018 12:07:57 -0700 Subject: [PATCH 04/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 38 +++++++++++++++++++------------------- korebuild-lock.txt | 4 ++-- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index eb0bd9d538..954463cb26 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,27 +3,27 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.2.0-preview1-17042 - 2.2.0-preview1-34066 - 2.2.0-preview1-34066 - 2.2.0-preview1-34066 - 2.2.0-preview1-34066 - 2.2.0-preview1-34066 - 2.2.0-preview1-34066 - 2.2.0-preview1-34066 - 2.2.0-preview1-34066 - 2.2.0-preview1-34066 - 2.2.0-preview1-34066 - 2.2.0-preview1-34066 - 2.2.0-preview1-34066 - 2.2.0-preview1-34066 - 2.2.0-preview1-34066 - 2.2.0-preview1-34066 - 2.2.0-preview1-34066 - 2.2.0-preview1-34066 + 2.2.0-preview1-17047 + 2.2.0-preview1-34135 + 2.2.0-preview1-34135 + 2.2.0-preview1-34135 + 2.2.0-preview1-34135 + 2.2.0-preview1-34135 + 2.2.0-preview1-34135 + 2.2.0-preview1-34135 + 2.2.0-preview1-34135 + 2.2.0-preview1-34135 + 2.2.0-preview1-34135 + 2.2.0-preview1-34135 + 2.2.0-preview1-34135 + 2.2.0-preview1-34135 + 2.2.0-preview1-34135 + 2.2.0-preview1-34135 + 2.2.0-preview1-34135 + 2.2.0-preview1-34135 2.0.0 2.2.0-preview1-26424-04 - 2.2.0-preview1-34066 + 2.2.0-preview1-34135 15.6.1 4.7.49 2.0.3 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 335e579e06..a16d4b9ee4 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-17042 -commithash:edf0705d014293c260de763543784330514db9a3 +version:2.2.0-preview1-17047 +commithash:e1957b52ddc8b62bd39c5c400322fccb5364624c From 77c9bc38f914b78f53fd5828c68c4ceca44bd841 Mon Sep 17 00:00:00 2001 From: Nate Barbettini Date: Mon, 7 May 2018 08:18:04 -0700 Subject: [PATCH 05/45] Add logging to HstsMiddleware (#327) --- .../HstsMiddleware.cs | 21 ++- .../internal/HstsLoggingExtensions.cs | 37 ++++++ .../HstsMiddlewareTests.cs | 124 ++++++++++++++++++ 3 files changed, 179 insertions(+), 3 deletions(-) create mode 100644 src/Microsoft.AspNetCore.HttpsPolicy/internal/HstsLoggingExtensions.cs diff --git a/src/Microsoft.AspNetCore.HttpsPolicy/HstsMiddleware.cs b/src/Microsoft.AspNetCore.HttpsPolicy/HstsMiddleware.cs index 252ae44c1e..da5aa3af4b 100644 --- a/src/Microsoft.AspNetCore.HttpsPolicy/HstsMiddleware.cs +++ b/src/Microsoft.AspNetCore.HttpsPolicy/HstsMiddleware.cs @@ -6,6 +6,8 @@ using System.Collections.Generic; using System.Globalization; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.HttpsPolicy.Internal; +using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.Extensions.Primitives; using Microsoft.Net.Http.Headers; @@ -24,13 +26,15 @@ namespace Microsoft.AspNetCore.HttpsPolicy private readonly RequestDelegate _next; private readonly StringValues _strictTransportSecurityValue; private readonly IList _excludedHosts; + private readonly ILogger _logger; /// /// Initialize the HSTS middleware. /// /// /// - public HstsMiddleware(RequestDelegate next, IOptions options) + /// + public HstsMiddleware(RequestDelegate next, IOptions options, ILoggerFactory loggerFactory) { if (options == null) { @@ -46,6 +50,7 @@ namespace Microsoft.AspNetCore.HttpsPolicy var preload = hstsOptions.Preload ? Preload : StringSegment.Empty; _strictTransportSecurityValue = new StringValues($"max-age={maxAge}{includeSubdomains}{preload}"); _excludedHosts = hstsOptions.ExcludedHosts; + _logger = loggerFactory.CreateLogger(); } /// @@ -55,11 +60,21 @@ namespace Microsoft.AspNetCore.HttpsPolicy /// public Task Invoke(HttpContext context) { - if (context.Request.IsHttps && !IsHostExcluded(context.Request.Host.Host)) + if (!context.Request.IsHttps) { - context.Response.Headers[HeaderNames.StrictTransportSecurity] = _strictTransportSecurityValue; + _logger.SkippingInsecure(); + return _next(context); } + if (IsHostExcluded(context.Request.Host.Host)) + { + _logger.SkippingExcludedHost(context.Request.Host.Host); + return _next(context); + } + + context.Response.Headers[HeaderNames.StrictTransportSecurity] = _strictTransportSecurityValue; + _logger.AddingHstsHeader(); + return _next(context); } diff --git a/src/Microsoft.AspNetCore.HttpsPolicy/internal/HstsLoggingExtensions.cs b/src/Microsoft.AspNetCore.HttpsPolicy/internal/HstsLoggingExtensions.cs new file mode 100644 index 0000000000..5162ccb9f5 --- /dev/null +++ b/src/Microsoft.AspNetCore.HttpsPolicy/internal/HstsLoggingExtensions.cs @@ -0,0 +1,37 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.Extensions.Logging; + +namespace Microsoft.AspNetCore.HttpsPolicy.Internal +{ + internal static class HstsLoggingExtensions + { + private static readonly Action _notSecure; + private static readonly Action _excludedHost; + private static readonly Action _addingHstsHeader; + + static HstsLoggingExtensions() + { + _notSecure = LoggerMessage.Define(LogLevel.Debug, 1, "The request is insecure. Skipping HSTS header."); + _excludedHost = LoggerMessage.Define(LogLevel.Debug, 2, "The host '{host}' is excluded. Skipping HSTS header."); + _addingHstsHeader = LoggerMessage.Define(LogLevel.Trace, 3, "Adding HSTS header to response."); + } + + public static void SkippingInsecure(this ILogger logger) + { + _notSecure(logger, null); + } + + public static void SkippingExcludedHost(this ILogger logger, string host) + { + _excludedHost(logger, host, null); + } + + public static void AddingHstsHeader(this ILogger logger) + { + _addingHstsHeader(logger, null); + } + } +} diff --git a/test/Microsoft.AspNetCore.HttpsPolicy.Tests/HstsMiddlewareTests.cs b/test/Microsoft.AspNetCore.HttpsPolicy.Tests/HstsMiddlewareTests.cs index 08df78f7c2..0cb5f5755c 100644 --- a/test/Microsoft.AspNetCore.HttpsPolicy.Tests/HstsMiddlewareTests.cs +++ b/test/Microsoft.AspNetCore.HttpsPolicy.Tests/HstsMiddlewareTests.cs @@ -12,6 +12,8 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.TestHost; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Testing; using Microsoft.Net.Http.Headers; using Xunit; @@ -131,7 +133,16 @@ namespace Microsoft.AspNetCore.HttpsPolicy.Tests [InlineData("[::1]")] public async Task DefaultExcludesCommonLocalhostDomains_DoesNotSetHstsHeader(string host) { + var sink = new TestSink( + TestSink.EnableWithTypeName, + TestSink.EnableWithTypeName); + var loggerFactory = new TestLoggerFactory(sink, enabled: true); + var builder = new WebHostBuilder() + .ConfigureServices(services => + { + services.AddSingleton(loggerFactory); + }) .Configure(app => { app.UseHsts(); @@ -149,6 +160,13 @@ namespace Microsoft.AspNetCore.HttpsPolicy.Tests Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Empty(response.Headers); + + var logMessages = sink.Writes.ToList(); + + Assert.Single(logMessages); + var message = logMessages.Single(); + Assert.Equal(LogLevel.Debug, message.LogLevel); + Assert.Equal($"The host '{host}' is excluded. Skipping HSTS header.", message.State.ToString(), ignoreCase: true); } [Theory] @@ -157,9 +175,16 @@ namespace Microsoft.AspNetCore.HttpsPolicy.Tests [InlineData("[::1]")] public async Task AllowLocalhostDomainsIfListIsReset_SetHstsHeader(string host) { + var sink = new TestSink( + TestSink.EnableWithTypeName, + TestSink.EnableWithTypeName); + var loggerFactory = new TestLoggerFactory(sink, enabled: true); + var builder = new WebHostBuilder() .ConfigureServices(services => { + services.AddSingleton(loggerFactory); + services.AddHsts(options => { options.ExcludedHosts.Clear(); @@ -182,6 +207,13 @@ namespace Microsoft.AspNetCore.HttpsPolicy.Tests Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Single(response.Headers); + + var logMessages = sink.Writes.ToList(); + + Assert.Single(logMessages); + var message = logMessages.Single(); + Assert.Equal(LogLevel.Trace, message.LogLevel); + Assert.Equal("Adding HSTS header to response.", message.State.ToString()); } [Theory] @@ -190,9 +222,16 @@ namespace Microsoft.AspNetCore.HttpsPolicy.Tests [InlineData("EXAMPLE.COM")] public async Task AddExcludedDomains_DoesNotAddHstsHeader(string host) { + var sink = new TestSink( + TestSink.EnableWithTypeName, + TestSink.EnableWithTypeName); + var loggerFactory = new TestLoggerFactory(sink, enabled: true); + var builder = new WebHostBuilder() .ConfigureServices(services => { + services.AddSingleton(loggerFactory); + services.AddHsts(options => { options.ExcludedHosts.Add(host); }); @@ -214,6 +253,91 @@ namespace Microsoft.AspNetCore.HttpsPolicy.Tests Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Empty(response.Headers); + + var logMessages = sink.Writes.ToList(); + + Assert.Single(logMessages); + var message = logMessages.Single(); + Assert.Equal(LogLevel.Debug, message.LogLevel); + Assert.Equal($"The host '{host}' is excluded. Skipping HSTS header.", message.State.ToString(), ignoreCase: true); + } + + [Fact] + public async Task WhenRequestIsInsecure_DoesNotAddHstsHeader() + { + var sink = new TestSink( + TestSink.EnableWithTypeName, + TestSink.EnableWithTypeName); + var loggerFactory = new TestLoggerFactory(sink, enabled: true); + + var builder = new WebHostBuilder() + .ConfigureServices(services => + { + services.AddSingleton(loggerFactory); + }) + .Configure(app => + { + app.UseHsts(); + app.Run(context => + { + return context.Response.WriteAsync("Hello world"); + }); + }); + var server = new TestServer(builder); + var client = server.CreateClient(); + client.BaseAddress = new Uri("http://example.com:5050"); + var request = new HttpRequestMessage(HttpMethod.Get, ""); + + var response = await client.SendAsync(request); + + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Empty(response.Headers); + + var logMessages = sink.Writes.ToList(); + + Assert.Single(logMessages); + var message = logMessages.Single(); + Assert.Equal(LogLevel.Debug, message.LogLevel); + Assert.Equal("The request is insecure. Skipping HSTS header.", message.State.ToString()); + } + + [Fact] + public async Task WhenRequestIsSecure_AddsHstsHeader() + { + var sink = new TestSink( + TestSink.EnableWithTypeName, + TestSink.EnableWithTypeName); + var loggerFactory = new TestLoggerFactory(sink, enabled: true); + + var builder = new WebHostBuilder() + .ConfigureServices(services => + { + services.AddSingleton(loggerFactory); + }) + .Configure(app => + { + app.UseHsts(); + app.Run(context => + { + return context.Response.WriteAsync("Hello world"); + }); + }); + var server = new TestServer(builder); + var client = server.CreateClient(); + client.BaseAddress = new Uri("https://example.com:5050"); + var request = new HttpRequestMessage(HttpMethod.Get, ""); + + var response = await client.SendAsync(request); + + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Contains(response.Headers, x => x.Key == HeaderNames.StrictTransportSecurity); + + var logMessages = sink.Writes.ToList(); + + Assert.Single(logMessages); + var message = logMessages.Single(); + Assert.Equal(LogLevel.Trace, message.LogLevel); + Assert.Equal("Adding HSTS header to response.", message.State.ToString()); } } } From 1c0918c1f19d3eee220c76a0203bb3d4235f60e1 Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Fri, 4 May 2018 16:52:08 -0700 Subject: [PATCH 06/45] Upgrade to netcoreapp22 --- Directory.Build.targets | 7 ++-- build/dependencies.props | 41 +++++++++---------- build/repo.props | 5 +-- korebuild-lock.txt | 4 +- .../HostFilteringSample.csproj | 2 +- .../HttpOverridesSample.csproj | 2 +- .../HttpsPolicySample.csproj | 4 +- .../ResponseBufferingSample.csproj | 2 +- .../ResponseCompressionSample.csproj | 2 +- samples/RewriteSample/RewriteSample.csproj | 2 +- test/Directory.Build.props | 4 +- ...rosoft.AspNetCore.HttpsPolicy.Tests.csproj | 5 +-- .../ResponseCompressionMiddlewareTest.cs | 4 +- 13 files changed, 41 insertions(+), 43 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index 53b3f6e1da..2991ae3052 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,7 +1,8 @@ - + - $(MicrosoftNETCoreApp20PackageVersion) - $(MicrosoftNETCoreApp21PackageVersion) + $(MicrosoftNETCoreApp22PackageVersion) $(NETStandardLibrary20PackageVersion) + + 99.9 diff --git a/build/dependencies.props b/build/dependencies.props index 954463cb26..bc851e5352 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,27 +3,26 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.2.0-preview1-17047 - 2.2.0-preview1-34135 - 2.2.0-preview1-34135 - 2.2.0-preview1-34135 - 2.2.0-preview1-34135 - 2.2.0-preview1-34135 - 2.2.0-preview1-34135 - 2.2.0-preview1-34135 - 2.2.0-preview1-34135 - 2.2.0-preview1-34135 - 2.2.0-preview1-34135 - 2.2.0-preview1-34135 - 2.2.0-preview1-34135 - 2.2.0-preview1-34135 - 2.2.0-preview1-34135 - 2.2.0-preview1-34135 - 2.2.0-preview1-34135 - 2.2.0-preview1-34135 - 2.0.0 - 2.2.0-preview1-26424-04 - 2.2.0-preview1-34135 + 2.2.0-preview1-17048 + 2.2.0-preview1-34140 + 2.2.0-preview1-34140 + 2.2.0-preview1-34140 + 2.2.0-preview1-34140 + 2.2.0-preview1-34140 + 2.2.0-preview1-34140 + 2.2.0-preview1-34140 + 2.2.0-preview1-34140 + 2.2.0-preview1-34140 + 2.2.0-preview1-34140 + 2.2.0-preview1-34140 + 2.2.0-preview1-34140 + 2.2.0-preview1-34140 + 2.2.0-preview1-34140 + 2.2.0-preview1-34140 + 2.2.0-preview1-34140 + 2.2.0-preview1-34140 + 2.2.0-preview1-26502-01 + 2.2.0-preview1-34140 15.6.1 4.7.49 2.0.3 diff --git a/build/repo.props b/build/repo.props index 78b0ce5879..62bcfa994f 100644 --- a/build/repo.props +++ b/build/repo.props @@ -1,4 +1,4 @@ - + @@ -8,7 +8,6 @@ - - + diff --git a/korebuild-lock.txt b/korebuild-lock.txt index a16d4b9ee4..2573a03995 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-17047 -commithash:e1957b52ddc8b62bd39c5c400322fccb5364624c +version:2.2.0-preview1-17048 +commithash:de14a0ee5fb48508ee8a29c14280a2928f8dabf8 diff --git a/samples/HostFilteringSample/HostFilteringSample.csproj b/samples/HostFilteringSample/HostFilteringSample.csproj index 7818be1fb0..92f6fbc290 100644 --- a/samples/HostFilteringSample/HostFilteringSample.csproj +++ b/samples/HostFilteringSample/HostFilteringSample.csproj @@ -1,7 +1,7 @@ - netcoreapp2.1;net461 + netcoreapp2.2;net461 diff --git a/samples/HttpOverridesSample/HttpOverridesSample.csproj b/samples/HttpOverridesSample/HttpOverridesSample.csproj index e966dd09a7..49ca42e718 100644 --- a/samples/HttpOverridesSample/HttpOverridesSample.csproj +++ b/samples/HttpOverridesSample/HttpOverridesSample.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1;net461 + netcoreapp2.2;net461 diff --git a/samples/HttpsPolicySample/HttpsPolicySample.csproj b/samples/HttpsPolicySample/HttpsPolicySample.csproj index fdfa716478..38ca805a0b 100644 --- a/samples/HttpsPolicySample/HttpsPolicySample.csproj +++ b/samples/HttpsPolicySample/HttpsPolicySample.csproj @@ -1,8 +1,8 @@  - net461;netcoreapp2.0 - netcoreapp2.0 + net461;netcoreapp2.2 + netcoreapp2.2 diff --git a/samples/ResponseBufferingSample/ResponseBufferingSample.csproj b/samples/ResponseBufferingSample/ResponseBufferingSample.csproj index b9595a89d8..f988e035a8 100644 --- a/samples/ResponseBufferingSample/ResponseBufferingSample.csproj +++ b/samples/ResponseBufferingSample/ResponseBufferingSample.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1;net461 + netcoreapp2.2;net461 diff --git a/samples/ResponseCompressionSample/ResponseCompressionSample.csproj b/samples/ResponseCompressionSample/ResponseCompressionSample.csproj index 2a7f4cfbb7..d6ac370925 100644 --- a/samples/ResponseCompressionSample/ResponseCompressionSample.csproj +++ b/samples/ResponseCompressionSample/ResponseCompressionSample.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1;net461 + netcoreapp2.2;net461 diff --git a/samples/RewriteSample/RewriteSample.csproj b/samples/RewriteSample/RewriteSample.csproj index a74fc45b85..f76f114da3 100644 --- a/samples/RewriteSample/RewriteSample.csproj +++ b/samples/RewriteSample/RewriteSample.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1;net461 + netcoreapp2.2;net461 diff --git a/test/Directory.Build.props b/test/Directory.Build.props index b936409242..bea39a089d 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -2,9 +2,9 @@ - netcoreapp2.1 + netcoreapp2.2 $(DeveloperBuildTestTfms) - netcoreapp2.1;netcoreapp2.0 + $(StandardTestTfms);net461 diff --git a/test/Microsoft.AspNetCore.HttpsPolicy.Tests/Microsoft.AspNetCore.HttpsPolicy.Tests.csproj b/test/Microsoft.AspNetCore.HttpsPolicy.Tests/Microsoft.AspNetCore.HttpsPolicy.Tests.csproj index e51e3a6640..9117246de5 100644 --- a/test/Microsoft.AspNetCore.HttpsPolicy.Tests/Microsoft.AspNetCore.HttpsPolicy.Tests.csproj +++ b/test/Microsoft.AspNetCore.HttpsPolicy.Tests/Microsoft.AspNetCore.HttpsPolicy.Tests.csproj @@ -1,8 +1,7 @@ - + - netcoreapp2.1 - $(TargetFrameworks);netcoreapp2.0 + netcoreapp2.2 diff --git a/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs b/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs index 213a4c8fd7..52eb965cf0 100644 --- a/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs +++ b/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs @@ -508,7 +508,7 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests #if NET461 // Flush not supported, compression disabled Assert.NotNull(response.Content.Headers.GetValues(HeaderNames.ContentMD5)); Assert.Empty(response.Content.Headers.ContentEncoding); -#elif NETCOREAPP2_0 || NETCOREAPP2_1 // Flush supported, compression enabled +#elif NETCOREAPP2_2 // Flush supported, compression enabled IEnumerable contentMD5 = null; Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5)); Assert.Single(response.Content.Headers.ContentEncoding, "gzip"); @@ -573,7 +573,7 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests #if NET461 // Flush not supported, compression disabled Assert.NotNull(response.Content.Headers.GetValues(HeaderNames.ContentMD5)); Assert.Empty(response.Content.Headers.ContentEncoding); -#elif NETCOREAPP2_0 || NETCOREAPP2_1 // Flush supported, compression enabled +#elif NETCOREAPP2_2 // Flush supported, compression enabled IEnumerable contentMD5 = null; Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5)); Assert.Single(response.Content.Headers.ContentEncoding, "gzip"); From f263e72389fe4468c1c353d2b97ea82704001c31 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 13 May 2018 14:01:17 -0700 Subject: [PATCH 07/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 40 ++++++++++++++++++++-------------------- korebuild-lock.txt | 4 ++-- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index bc851e5352..063c2ee5c2 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,26 +3,26 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.2.0-preview1-17048 - 2.2.0-preview1-34140 - 2.2.0-preview1-34140 - 2.2.0-preview1-34140 - 2.2.0-preview1-34140 - 2.2.0-preview1-34140 - 2.2.0-preview1-34140 - 2.2.0-preview1-34140 - 2.2.0-preview1-34140 - 2.2.0-preview1-34140 - 2.2.0-preview1-34140 - 2.2.0-preview1-34140 - 2.2.0-preview1-34140 - 2.2.0-preview1-34140 - 2.2.0-preview1-34140 - 2.2.0-preview1-34140 - 2.2.0-preview1-34140 - 2.2.0-preview1-34140 - 2.2.0-preview1-26502-01 - 2.2.0-preview1-34140 + 2.2.0-preview1-17051 + 2.2.0-preview1-34184 + 2.2.0-preview1-34184 + 2.2.0-preview1-34184 + 2.2.0-preview1-34184 + 2.2.0-preview1-34184 + 2.2.0-preview1-34184 + 2.2.0-preview1-34184 + 2.2.0-preview1-34184 + 2.2.0-preview1-34184 + 2.2.0-preview1-34184 + 2.2.0-preview1-34184 + 2.2.0-preview1-34184 + 2.2.0-preview1-34184 + 2.2.0-preview1-34184 + 2.2.0-preview1-34184 + 2.2.0-preview1-34184 + 2.2.0-preview1-34184 + 2.2.0-preview1-26509-06 + 2.2.0-preview1-34184 15.6.1 4.7.49 2.0.3 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 2573a03995..89629b454c 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-17048 -commithash:de14a0ee5fb48508ee8a29c14280a2928f8dabf8 +version:2.2.0-preview1-17051 +commithash:253c3a480063bc3abaa5cde42f6e27b58457ef9b From 7323781fa8563b5d2de4a02dd46a3109218f9ed3 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 20 May 2018 19:24:34 +0000 Subject: [PATCH 08/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 38 +++++++++++++++++++------------------- korebuild-lock.txt | 4 ++-- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 063c2ee5c2..7492c3a64e 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,26 +3,26 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.2.0-preview1-17051 - 2.2.0-preview1-34184 - 2.2.0-preview1-34184 - 2.2.0-preview1-34184 - 2.2.0-preview1-34184 - 2.2.0-preview1-34184 - 2.2.0-preview1-34184 - 2.2.0-preview1-34184 - 2.2.0-preview1-34184 - 2.2.0-preview1-34184 - 2.2.0-preview1-34184 - 2.2.0-preview1-34184 - 2.2.0-preview1-34184 - 2.2.0-preview1-34184 - 2.2.0-preview1-34184 - 2.2.0-preview1-34184 - 2.2.0-preview1-34184 - 2.2.0-preview1-34184 + 2.2.0-preview1-17060 + 2.2.0-preview1-34255 + 2.2.0-preview1-34255 + 2.2.0-preview1-34255 + 2.2.0-preview1-34255 + 2.2.0-preview1-34255 + 2.2.0-preview1-34255 + 2.2.0-preview1-34255 + 2.2.0-preview1-34255 + 2.2.0-preview1-34255 + 2.2.0-preview1-34255 + 2.2.0-preview1-34255 + 2.2.0-preview1-34255 + 2.2.0-preview1-34255 + 2.2.0-preview1-34255 + 2.2.0-preview1-34255 + 2.2.0-preview1-34255 + 2.2.0-preview1-34255 2.2.0-preview1-26509-06 - 2.2.0-preview1-34184 + 2.2.0-preview1-34255 15.6.1 4.7.49 2.0.3 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 89629b454c..cf2fff7def 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-17051 -commithash:253c3a480063bc3abaa5cde42f6e27b58457ef9b +version:2.2.0-preview1-17060 +commithash:25b4b134d6f8f7b461928f0d495cfc695ccabb5b From 541e91d3670b53a5f0ff5d847a233bdb61fe2eca Mon Sep 17 00:00:00 2001 From: "Nate McMaster (automated)" Date: Fri, 25 May 2018 16:12:44 -0700 Subject: [PATCH 09/45] Update bootstrapper scripts (automated commit) [ci skip] --- run.ps1 | 25 +++++++++++++++++++------ run.sh | 33 +++++++++++++++++++++++++++++---- 2 files changed, 48 insertions(+), 10 deletions(-) diff --git a/run.ps1 b/run.ps1 index 27dcf848f8..3b27382468 100644 --- a/run.ps1 +++ b/run.ps1 @@ -26,12 +26,18 @@ The base url where build tools can be downloaded. Overrides the value from the c .PARAMETER Update Updates KoreBuild to the latest version even if a lock file is present. +.PARAMETER Reinstall +Re-installs KoreBuild + .PARAMETER ConfigFile The path to the configuration file that stores values. Defaults to korebuild.json. .PARAMETER ToolsSourceSuffix The Suffix to append to the end of the ToolsSource. Useful for query strings in blob stores. +.PARAMETER CI +Sets up CI specific settings and variables. + .PARAMETER Arguments Arguments to be passed to the command @@ -65,8 +71,10 @@ param( [string]$ToolsSource, [Alias('u')] [switch]$Update, - [string]$ConfigFile, + [switch]$Reinstall, [string]$ToolsSourceSuffix, + [string]$ConfigFile = $null, + [switch]$CI, [Parameter(ValueFromRemainingArguments = $true)] [string[]]$Arguments ) @@ -93,6 +101,10 @@ function Get-KoreBuild { $version = $version.TrimStart('version:').Trim() $korebuildPath = Join-Paths $DotNetHome ('buildtools', 'korebuild', $version) + if ($Reinstall -and (Test-Path $korebuildPath)) { + Remove-Item -Force -Recurse $korebuildPath + } + if (!(Test-Path $korebuildPath)) { Write-Host -ForegroundColor Magenta "Downloading KoreBuild $version" New-Item -ItemType Directory -Path $korebuildPath | Out-Null @@ -101,9 +113,9 @@ function Get-KoreBuild { try { $tmpfile = Join-Path ([IO.Path]::GetTempPath()) "KoreBuild-$([guid]::NewGuid()).zip" Get-RemoteFile $remotePath $tmpfile $ToolsSourceSuffix - if (Get-Command -Name 'Expand-Archive' -ErrorAction Ignore) { + if (Get-Command -Name 'Microsoft.PowerShell.Archive\Expand-Archive' -ErrorAction Ignore) { # Use built-in commands where possible as they are cross-plat compatible - Expand-Archive -Path $tmpfile -DestinationPath $korebuildPath + Microsoft.PowerShell.Archive\Expand-Archive -Path $tmpfile -DestinationPath $korebuildPath } else { # Fallback to old approach for old installations of PowerShell @@ -167,8 +179,9 @@ if (Test-Path $ConfigFile) { } } catch { - Write-Warning "$ConfigFile could not be read. Its settings will be ignored." - Write-Warning $Error[0] + Write-Host -ForegroundColor Red $Error[0] + Write-Error "$ConfigFile contains invalid JSON." + exit 1 } } @@ -188,7 +201,7 @@ $korebuildPath = Get-KoreBuild Import-Module -Force -Scope Local (Join-Path $korebuildPath 'KoreBuild.psd1') try { - Set-KoreBuildSettings -ToolsSource $ToolsSource -DotNetHome $DotNetHome -RepoPath $Path -ConfigFile $ConfigFile + Set-KoreBuildSettings -ToolsSource $ToolsSource -DotNetHome $DotNetHome -RepoPath $Path -ConfigFile $ConfigFile -CI:$CI Invoke-KoreBuildCommand $Command @Arguments } finally { diff --git a/run.sh b/run.sh index 834961fc3a..02aac15874 100755 --- a/run.sh +++ b/run.sh @@ -14,10 +14,12 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" [ -z "${DOTNET_HOME:-}" ] && DOTNET_HOME="$HOME/.dotnet" verbose=false update=false +reinstall=false repo_path="$DIR" channel='' tools_source='' tools_source_suffix='' +ci=false # # Functions @@ -38,6 +40,8 @@ __usage() { echo " -s|--tools-source|-ToolsSource The base url where build tools can be downloaded. Overrides the value from the config file." echo " --tools-source-suffix|-ToolsSourceSuffix The suffix to append to tools-source. Useful for query strings." echo " -u|--update Update to the latest KoreBuild even if the lock file is present." + echo " --reinstall Reinstall KoreBuild." + echo " --ci Apply CI specific settings and environment variables." echo "" echo "Description:" echo " This function will create a file \$DIR/korebuild-lock.txt. This lock file can be committed to source, but does not have to be." @@ -62,6 +66,10 @@ get_korebuild() { version="$(echo "${version#version:}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" local korebuild_path="$DOTNET_HOME/buildtools/korebuild/$version" + if [ "$reinstall" = true ] && [ -d "$korebuild_path" ]; then + rm -rf "$korebuild_path" + fi + { if [ ! -d "$korebuild_path" ]; then mkdir -p "$korebuild_path" @@ -175,6 +183,12 @@ while [[ $# -gt 0 ]]; do -u|--update|-Update) update=true ;; + --reinstall|-[Rr]einstall) + reinstall=true + ;; + --ci|-[Cc][Ii]) + ci=true + ;; --verbose|-Verbose) verbose=true ;; @@ -206,17 +220,28 @@ if [ -f "$config_file" ]; then config_channel="$(jq -r 'select(.channel!=null) | .channel' "$config_file")" config_tools_source="$(jq -r 'select(.toolsSource!=null) | .toolsSource' "$config_file")" else - __warn "$config_file is invalid JSON. Its settings will be ignored." + _error "$config_file contains invalid JSON." + exit 1 fi elif __machine_has python ; then if python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'))" >/dev/null ; then config_channel="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['channel'] if 'channel' in obj else '')")" config_tools_source="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['toolsSource'] if 'toolsSource' in obj else '')")" else - __warn "$config_file is invalid JSON. Its settings will be ignored." + _error "$config_file contains invalid JSON." + exit 1 + fi + elif __machine_has python3 ; then + if python3 -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'))" >/dev/null ; then + config_channel="$(python3 -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['channel'] if 'channel' in obj else '')")" + config_tools_source="$(python3 -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['toolsSource'] if 'toolsSource' in obj else '')")" + else + _error "$config_file contains invalid JSON." + exit 1 fi else - __warn 'Missing required command: jq or pyton. Could not parse the JSON file. Its settings will be ignored.' + _error 'Missing required command: jq or python. Could not parse the JSON file.' + exit 1 fi [ ! -z "${config_channel:-}" ] && channel="$config_channel" @@ -227,5 +252,5 @@ fi [ -z "$tools_source" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools' get_korebuild -set_korebuildsettings "$tools_source" "$DOTNET_HOME" "$repo_path" "$config_file" +set_korebuildsettings "$tools_source" "$DOTNET_HOME" "$repo_path" "$config_file" "$ci" invoke_korebuild_command "$command" "$@" From 8017b87eb5a03d0271440b05999ed54e3b191de9 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 27 May 2018 19:07:35 +0000 Subject: [PATCH 10/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 40 ++++++++++++++++++++-------------------- korebuild-lock.txt | 4 ++-- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 7492c3a64e..61e152d985 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,26 +3,26 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.2.0-preview1-17060 - 2.2.0-preview1-34255 - 2.2.0-preview1-34255 - 2.2.0-preview1-34255 - 2.2.0-preview1-34255 - 2.2.0-preview1-34255 - 2.2.0-preview1-34255 - 2.2.0-preview1-34255 - 2.2.0-preview1-34255 - 2.2.0-preview1-34255 - 2.2.0-preview1-34255 - 2.2.0-preview1-34255 - 2.2.0-preview1-34255 - 2.2.0-preview1-34255 - 2.2.0-preview1-34255 - 2.2.0-preview1-34255 - 2.2.0-preview1-34255 - 2.2.0-preview1-34255 - 2.2.0-preview1-26509-06 - 2.2.0-preview1-34255 + 2.2.0-preview1-17064 + 2.2.0-preview1-34326 + 2.2.0-preview1-34326 + 2.2.0-preview1-34326 + 2.2.0-preview1-34326 + 2.2.0-preview1-34326 + 2.2.0-preview1-34326 + 2.2.0-preview1-34326 + 2.2.0-preview1-34326 + 2.2.0-preview1-34326 + 2.2.0-preview1-34326 + 2.2.0-preview1-34326 + 2.2.0-preview1-34326 + 2.2.0-preview1-34326 + 2.2.0-preview1-34326 + 2.2.0-preview1-34326 + 2.2.0-preview1-34326 + 2.2.0-preview1-34326 + 2.2.0-preview1-26526-03 + 2.2.0-preview1-34326 15.6.1 4.7.49 2.0.3 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index cf2fff7def..3028b66761 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-17060 -commithash:25b4b134d6f8f7b461928f0d495cfc695ccabb5b +version:2.2.0-preview1-17064 +commithash:5380a2461b135b261646f31d1c919ab0a7b577a8 From 898586722cdb39038c86600331957dc4438e88dd Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Fri, 1 Jun 2018 09:06:17 -0700 Subject: [PATCH 11/45] Update HttpsPort comments (#331) --- src/Microsoft.AspNetCore.HttpsPolicy/HttpsRedirectionOptions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.AspNetCore.HttpsPolicy/HttpsRedirectionOptions.cs b/src/Microsoft.AspNetCore.HttpsPolicy/HttpsRedirectionOptions.cs index cc46b0155a..07a166c162 100644 --- a/src/Microsoft.AspNetCore.HttpsPolicy/HttpsRedirectionOptions.cs +++ b/src/Microsoft.AspNetCore.HttpsPolicy/HttpsRedirectionOptions.cs @@ -22,7 +22,7 @@ namespace Microsoft.AspNetCore.HttpsPolicy /// If the HttpsPort is not set, we will try to get the HttpsPort from the following: /// 1. HTTPS_PORT environment variable /// 2. IServerAddressesFeature - /// 3. 443 (or not set) + /// If that fails then the middleware will log a warning and turn off. /// public int? HttpsPort { get; set; } } From 5975eb78a0e01ce7cb2a552c4ffef52ada96a45b Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 3 Jun 2018 19:07:21 +0000 Subject: [PATCH 12/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 40 ++++++++++++++++++++-------------------- korebuild-lock.txt | 4 ++-- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 61e152d985..bf2805d8ba 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,26 +3,26 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.2.0-preview1-17064 - 2.2.0-preview1-34326 - 2.2.0-preview1-34326 - 2.2.0-preview1-34326 - 2.2.0-preview1-34326 - 2.2.0-preview1-34326 - 2.2.0-preview1-34326 - 2.2.0-preview1-34326 - 2.2.0-preview1-34326 - 2.2.0-preview1-34326 - 2.2.0-preview1-34326 - 2.2.0-preview1-34326 - 2.2.0-preview1-34326 - 2.2.0-preview1-34326 - 2.2.0-preview1-34326 - 2.2.0-preview1-34326 - 2.2.0-preview1-34326 - 2.2.0-preview1-34326 - 2.2.0-preview1-26526-03 - 2.2.0-preview1-34326 + 2.2.0-preview1-17067 + 2.2.0-preview1-34373 + 2.2.0-preview1-34373 + 2.2.0-preview1-34373 + 2.2.0-preview1-34373 + 2.2.0-preview1-34373 + 2.2.0-preview1-34373 + 2.2.0-preview1-34373 + 2.2.0-preview1-34373 + 2.2.0-preview1-34373 + 2.2.0-preview1-34373 + 2.2.0-preview1-34373 + 2.2.0-preview1-34373 + 2.2.0-preview1-34373 + 2.2.0-preview1-34373 + 2.2.0-preview1-34373 + 2.2.0-preview1-34373 + 2.2.0-preview1-34373 + 2.2.0-preview1-26531-03 + 2.2.0-preview1-34373 15.6.1 4.7.49 2.0.3 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 3028b66761..06ba6285b7 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-17064 -commithash:5380a2461b135b261646f31d1c919ab0a7b577a8 +version:2.2.0-preview1-17067 +commithash:2af0e2e3d02329b4f0290061ab9bd8c7ca1aa26f From 40510c0affb130243c1a77b2c2022ea957775298 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 5 Jun 2018 22:30:29 -0700 Subject: [PATCH 13/45] Add certificate names for code signing --- Directory.Build.props | 2 ++ korebuild-lock.txt | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 0600ee6c34..b196351340 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -14,6 +14,8 @@ $(MSBuildThisFileDirectory) $(MSBuildThisFileDirectory)build\Key.snk true + Microsoft + MicrosoftNuGet true true diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 06ba6285b7..b679b80427 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-17067 -commithash:2af0e2e3d02329b4f0290061ab9bd8c7ca1aa26f +version:2.2.0-preview1-17075 +commithash:d9f07c7f313a0af1d49f003f5424b4dbbdd3e09f From 8d4c1da8effe91745a91c7d62ae8d53bfd19bfad Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Thu, 7 Jun 2018 19:28:04 +0000 Subject: [PATCH 14/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 40 ++++++++++++++++++++-------------------- korebuild-lock.txt | 4 ++-- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index bf2805d8ba..f1155dd699 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,26 +3,26 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.2.0-preview1-17067 - 2.2.0-preview1-34373 - 2.2.0-preview1-34373 - 2.2.0-preview1-34373 - 2.2.0-preview1-34373 - 2.2.0-preview1-34373 - 2.2.0-preview1-34373 - 2.2.0-preview1-34373 - 2.2.0-preview1-34373 - 2.2.0-preview1-34373 - 2.2.0-preview1-34373 - 2.2.0-preview1-34373 - 2.2.0-preview1-34373 - 2.2.0-preview1-34373 - 2.2.0-preview1-34373 - 2.2.0-preview1-34373 - 2.2.0-preview1-34373 - 2.2.0-preview1-34373 - 2.2.0-preview1-26531-03 - 2.2.0-preview1-34373 + 2.2.0-preview1-17081 + 2.2.0-preview1-34411 + 2.2.0-preview1-34411 + 2.2.0-preview1-34411 + 2.2.0-preview1-34411 + 2.2.0-preview1-34411 + 2.2.0-preview1-34411 + 2.2.0-preview1-34411 + 2.2.0-preview1-34411 + 2.2.0-preview1-34411 + 2.2.0-preview1-34411 + 2.2.0-preview1-34411 + 2.2.0-preview1-34411 + 2.2.0-preview1-34411 + 2.2.0-preview1-34411 + 2.2.0-preview1-34411 + 2.2.0-preview1-34411 + 2.2.0-preview1-34411 + 2.2.0-preview1-26606-01 + 2.2.0-preview1-34411 15.6.1 4.7.49 2.0.3 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index b679b80427..deb7e546f0 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-17075 -commithash:d9f07c7f313a0af1d49f003f5424b4dbbdd3e09f +version:2.2.0-preview1-17081 +commithash:73f09c256e2a54270951562ecc0ef4a953926c36 From 5c39221ba3077a957dfea6f2b8161dfa2ba0b636 Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Thu, 7 Jun 2018 15:43:02 -0700 Subject: [PATCH 15/45] Adding VSTS file --- .vsts-pipelines/builds/ci-internal.yml | 13 +++++++++++++ .vsts-pipelines/builds/ci-public.yml | 15 +++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 .vsts-pipelines/builds/ci-internal.yml create mode 100644 .vsts-pipelines/builds/ci-public.yml diff --git a/.vsts-pipelines/builds/ci-internal.yml b/.vsts-pipelines/builds/ci-internal.yml new file mode 100644 index 0000000000..d7ceb76378 --- /dev/null +++ b/.vsts-pipelines/builds/ci-internal.yml @@ -0,0 +1,13 @@ +trigger: +- dev +- release/* + +resources: + repositories: + - repository: buildtools + type: git + name: aspnet-BuildTools + ref: refs/heads/dev + +phases: +- template: .vsts-pipelines/templates/project-ci.yml@buildtools diff --git a/.vsts-pipelines/builds/ci-public.yml b/.vsts-pipelines/builds/ci-public.yml new file mode 100644 index 0000000000..b7f25723f8 --- /dev/null +++ b/.vsts-pipelines/builds/ci-public.yml @@ -0,0 +1,15 @@ +trigger: +- dev +- release/* + +# See https://github.com/aspnet/BuildTools +resources: + repositories: + - repository: buildtools + type: github + endpoint: DotNet-Bot GitHub Connection + name: aspnet/BuildTools + ref: refs/heads/dev + +phases: +- template: .vsts-pipelines/templates/project-ci.yml@buildtools From 555f36e12e8e5ef80a6e5429ae552f4604669d2e Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Thu, 14 Jun 2018 10:26:01 -0700 Subject: [PATCH 16/45] Set 2.1 baselines --- .../baseline.netcore.json | 184 + .../baseline.netcore.json | 54 +- .../baseline.netcore.json | 378 ++ .../breakingchanges.netcore.json | 7 + .../baseline.netcore.json | 2 +- .../baseline.netframework.json | 2 +- .../baseline.netcore.json | 5364 +---------------- 7 files changed, 643 insertions(+), 5348 deletions(-) create mode 100644 src/Microsoft.AspNetCore.HostFiltering/baseline.netcore.json create mode 100644 src/Microsoft.AspNetCore.HttpsPolicy/baseline.netcore.json create mode 100644 src/Microsoft.AspNetCore.HttpsPolicy/breakingchanges.netcore.json diff --git a/src/Microsoft.AspNetCore.HostFiltering/baseline.netcore.json b/src/Microsoft.AspNetCore.HostFiltering/baseline.netcore.json new file mode 100644 index 0000000000..18c6e39345 --- /dev/null +++ b/src/Microsoft.AspNetCore.HostFiltering/baseline.netcore.json @@ -0,0 +1,184 @@ +{ + "AssemblyIdentity": "Microsoft.AspNetCore.HostFiltering, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", + "Types": [ + { + "Name": "Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware", + "Visibility": "Public", + "Kind": "Class", + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "Invoke", + "Parameters": [ + { + "Name": "context", + "Type": "Microsoft.AspNetCore.Http.HttpContext" + } + ], + "ReturnType": "System.Threading.Tasks.Task", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Constructor", + "Name": ".ctor", + "Parameters": [ + { + "Name": "next", + "Type": "Microsoft.AspNetCore.Http.RequestDelegate" + }, + { + "Name": "logger", + "Type": "Microsoft.Extensions.Logging.ILogger" + }, + { + "Name": "optionsMonitor", + "Type": "Microsoft.Extensions.Options.IOptionsMonitor" + } + ], + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, + { + "Name": "Microsoft.AspNetCore.HostFiltering.HostFilteringOptions", + "Visibility": "Public", + "Kind": "Class", + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "get_AllowedHosts", + "Parameters": [], + "ReturnType": "System.Collections.Generic.IList", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_AllowedHosts", + "Parameters": [ + { + "Name": "value", + "Type": "System.Collections.Generic.IList" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_AllowEmptyHosts", + "Parameters": [], + "ReturnType": "System.Boolean", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_AllowEmptyHosts", + "Parameters": [ + { + "Name": "value", + "Type": "System.Boolean" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_IncludeFailureMessage", + "Parameters": [], + "ReturnType": "System.Boolean", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_IncludeFailureMessage", + "Parameters": [ + { + "Name": "value", + "Type": "System.Boolean" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Constructor", + "Name": ".ctor", + "Parameters": [], + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, + { + "Name": "Microsoft.AspNetCore.Builder.HostFilteringBuilderExtensions", + "Visibility": "Public", + "Kind": "Class", + "Abstract": true, + "Static": true, + "Sealed": true, + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "UseHostFiltering", + "Parameters": [ + { + "Name": "app", + "Type": "Microsoft.AspNetCore.Builder.IApplicationBuilder" + } + ], + "ReturnType": "Microsoft.AspNetCore.Builder.IApplicationBuilder", + "Static": true, + "Extension": true, + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, + { + "Name": "Microsoft.AspNetCore.Builder.HostFilteringServicesExtensions", + "Visibility": "Public", + "Kind": "Class", + "Abstract": true, + "Static": true, + "Sealed": true, + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "AddHostFiltering", + "Parameters": [ + { + "Name": "services", + "Type": "Microsoft.Extensions.DependencyInjection.IServiceCollection" + }, + { + "Name": "configureOptions", + "Type": "System.Action" + } + ], + "ReturnType": "Microsoft.Extensions.DependencyInjection.IServiceCollection", + "Static": true, + "Extension": true, + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + } + ] +} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.HttpOverrides/baseline.netcore.json b/src/Microsoft.AspNetCore.HttpOverrides/baseline.netcore.json index d5d1fac25e..7764941a52 100644 --- a/src/Microsoft.AspNetCore.HttpOverrides/baseline.netcore.json +++ b/src/Microsoft.AspNetCore.HttpOverrides/baseline.netcore.json @@ -1,5 +1,5 @@ { - "AssemblyIdentity": "Microsoft.AspNetCore.HttpOverrides, Version=2.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", + "AssemblyIdentity": "Microsoft.AspNetCore.HttpOverrides, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", "Types": [ { "Name": "Microsoft.AspNetCore.Builder.ForwardedHeadersExtensions", @@ -237,6 +237,27 @@ "Visibility": "Public", "GenericParameter": [] }, + { + "Kind": "Method", + "Name": "get_AllowedHosts", + "Parameters": [], + "ReturnType": "System.Collections.Generic.IList", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_AllowedHosts", + "Parameters": [ + { + "Name": "value", + "Type": "System.Collections.Generic.IList" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, { "Kind": "Method", "Name": "get_RequireHeaderSymmetry", @@ -608,37 +629,6 @@ } ], "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.HttpOverrides.Internal.IPEndPointParser", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "Static": true, - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "TryParse", - "Parameters": [ - { - "Name": "addressWithPort", - "Type": "System.String" - }, - { - "Name": "endpoint", - "Type": "System.Net.IPEndPoint", - "Direction": "Out" - } - ], - "ReturnType": "System.Boolean", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] } ] } \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.HttpsPolicy/baseline.netcore.json b/src/Microsoft.AspNetCore.HttpsPolicy/baseline.netcore.json new file mode 100644 index 0000000000..26f1f412f9 --- /dev/null +++ b/src/Microsoft.AspNetCore.HttpsPolicy/baseline.netcore.json @@ -0,0 +1,378 @@ +{ + "AssemblyIdentity": "Microsoft.AspNetCore.HttpsPolicy, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", + "Types": [ + { + "Name": "Microsoft.AspNetCore.HttpsPolicy.HstsMiddleware", + "Visibility": "Public", + "Kind": "Class", + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "Invoke", + "Parameters": [ + { + "Name": "context", + "Type": "Microsoft.AspNetCore.Http.HttpContext" + } + ], + "ReturnType": "System.Threading.Tasks.Task", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Constructor", + "Name": ".ctor", + "Parameters": [ + { + "Name": "next", + "Type": "Microsoft.AspNetCore.Http.RequestDelegate" + }, + { + "Name": "options", + "Type": "Microsoft.Extensions.Options.IOptions" + } + ], + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, + { + "Name": "Microsoft.AspNetCore.HttpsPolicy.HstsOptions", + "Visibility": "Public", + "Kind": "Class", + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "get_MaxAge", + "Parameters": [], + "ReturnType": "System.TimeSpan", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_MaxAge", + "Parameters": [ + { + "Name": "value", + "Type": "System.TimeSpan" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_IncludeSubDomains", + "Parameters": [], + "ReturnType": "System.Boolean", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_IncludeSubDomains", + "Parameters": [ + { + "Name": "value", + "Type": "System.Boolean" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_Preload", + "Parameters": [], + "ReturnType": "System.Boolean", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_Preload", + "Parameters": [ + { + "Name": "value", + "Type": "System.Boolean" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_ExcludedHosts", + "Parameters": [], + "ReturnType": "System.Collections.Generic.IList", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Constructor", + "Name": ".ctor", + "Parameters": [], + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, + { + "Name": "Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware", + "Visibility": "Public", + "Kind": "Class", + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "Invoke", + "Parameters": [ + { + "Name": "context", + "Type": "Microsoft.AspNetCore.Http.HttpContext" + } + ], + "ReturnType": "System.Threading.Tasks.Task", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Constructor", + "Name": ".ctor", + "Parameters": [ + { + "Name": "next", + "Type": "Microsoft.AspNetCore.Http.RequestDelegate" + }, + { + "Name": "options", + "Type": "Microsoft.Extensions.Options.IOptions" + }, + { + "Name": "config", + "Type": "Microsoft.Extensions.Configuration.IConfiguration" + }, + { + "Name": "loggerFactory", + "Type": "Microsoft.Extensions.Logging.ILoggerFactory" + } + ], + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Constructor", + "Name": ".ctor", + "Parameters": [ + { + "Name": "next", + "Type": "Microsoft.AspNetCore.Http.RequestDelegate" + }, + { + "Name": "options", + "Type": "Microsoft.Extensions.Options.IOptions" + }, + { + "Name": "config", + "Type": "Microsoft.Extensions.Configuration.IConfiguration" + }, + { + "Name": "loggerFactory", + "Type": "Microsoft.Extensions.Logging.ILoggerFactory" + }, + { + "Name": "serverAddressesFeature", + "Type": "Microsoft.AspNetCore.Hosting.Server.Features.IServerAddressesFeature" + } + ], + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, + { + "Name": "Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionOptions", + "Visibility": "Public", + "Kind": "Class", + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "get_RedirectStatusCode", + "Parameters": [], + "ReturnType": "System.Int32", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_RedirectStatusCode", + "Parameters": [ + { + "Name": "value", + "Type": "System.Int32" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_HttpsPort", + "Parameters": [], + "ReturnType": "System.Nullable", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_HttpsPort", + "Parameters": [ + { + "Name": "value", + "Type": "System.Nullable" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Constructor", + "Name": ".ctor", + "Parameters": [], + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, + { + "Name": "Microsoft.AspNetCore.Builder.HstsBuilderExtensions", + "Visibility": "Public", + "Kind": "Class", + "Abstract": true, + "Static": true, + "Sealed": true, + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "UseHsts", + "Parameters": [ + { + "Name": "app", + "Type": "Microsoft.AspNetCore.Builder.IApplicationBuilder" + } + ], + "ReturnType": "Microsoft.AspNetCore.Builder.IApplicationBuilder", + "Static": true, + "Extension": true, + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, + { + "Name": "Microsoft.AspNetCore.Builder.HstsServicesExtensions", + "Visibility": "Public", + "Kind": "Class", + "Abstract": true, + "Static": true, + "Sealed": true, + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "AddHsts", + "Parameters": [ + { + "Name": "services", + "Type": "Microsoft.Extensions.DependencyInjection.IServiceCollection" + }, + { + "Name": "configureOptions", + "Type": "System.Action" + } + ], + "ReturnType": "Microsoft.Extensions.DependencyInjection.IServiceCollection", + "Static": true, + "Extension": true, + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, + { + "Name": "Microsoft.AspNetCore.Builder.HttpsPolicyBuilderExtensions", + "Visibility": "Public", + "Kind": "Class", + "Abstract": true, + "Static": true, + "Sealed": true, + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "UseHttpsRedirection", + "Parameters": [ + { + "Name": "app", + "Type": "Microsoft.AspNetCore.Builder.IApplicationBuilder" + } + ], + "ReturnType": "Microsoft.AspNetCore.Builder.IApplicationBuilder", + "Static": true, + "Extension": true, + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, + { + "Name": "Microsoft.AspNetCore.Builder.HttpsRedirectionServicesExtensions", + "Visibility": "Public", + "Kind": "Class", + "Abstract": true, + "Static": true, + "Sealed": true, + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "AddHttpsRedirection", + "Parameters": [ + { + "Name": "services", + "Type": "Microsoft.Extensions.DependencyInjection.IServiceCollection" + }, + { + "Name": "configureOptions", + "Type": "System.Action" + } + ], + "ReturnType": "Microsoft.Extensions.DependencyInjection.IServiceCollection", + "Static": true, + "Extension": true, + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + } + ] +} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.HttpsPolicy/breakingchanges.netcore.json b/src/Microsoft.AspNetCore.HttpsPolicy/breakingchanges.netcore.json new file mode 100644 index 0000000000..bb14c1b93b --- /dev/null +++ b/src/Microsoft.AspNetCore.HttpsPolicy/breakingchanges.netcore.json @@ -0,0 +1,7 @@ +[ + { + "TypeId": "public class Microsoft.AspNetCore.HttpsPolicy.HstsMiddleware", + "MemberId": "public .ctor(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Options.IOptions options)", + "Kind": "Removal" + } +] diff --git a/src/Microsoft.AspNetCore.ResponseCompression/baseline.netcore.json b/src/Microsoft.AspNetCore.ResponseCompression/baseline.netcore.json index 4677b668c5..b778eaf322 100644 --- a/src/Microsoft.AspNetCore.ResponseCompression/baseline.netcore.json +++ b/src/Microsoft.AspNetCore.ResponseCompression/baseline.netcore.json @@ -1,5 +1,5 @@ { - "AssemblyIdentity": "Microsoft.AspNetCore.ResponseCompression, Version=2.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", + "AssemblyIdentity": "Microsoft.AspNetCore.ResponseCompression, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", "Types": [ { "Name": "Microsoft.AspNetCore.Builder.ResponseCompressionBuilderExtensions", diff --git a/src/Microsoft.AspNetCore.ResponseCompression/baseline.netframework.json b/src/Microsoft.AspNetCore.ResponseCompression/baseline.netframework.json index 4677b668c5..b778eaf322 100644 --- a/src/Microsoft.AspNetCore.ResponseCompression/baseline.netframework.json +++ b/src/Microsoft.AspNetCore.ResponseCompression/baseline.netframework.json @@ -1,5 +1,5 @@ { - "AssemblyIdentity": "Microsoft.AspNetCore.ResponseCompression, Version=2.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", + "AssemblyIdentity": "Microsoft.AspNetCore.ResponseCompression, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", "Types": [ { "Name": "Microsoft.AspNetCore.Builder.ResponseCompressionBuilderExtensions", diff --git a/src/Microsoft.AspNetCore.Rewrite/baseline.netcore.json b/src/Microsoft.AspNetCore.Rewrite/baseline.netcore.json index 64ce09c61d..d3f82fd1cd 100644 --- a/src/Microsoft.AspNetCore.Rewrite/baseline.netcore.json +++ b/src/Microsoft.AspNetCore.Rewrite/baseline.netcore.json @@ -1,5 +1,5 @@ { - "AssemblyIdentity": "Microsoft.AspNetCore.Rewrite, Version=2.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", + "AssemblyIdentity": "Microsoft.AspNetCore.Rewrite, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", "Types": [ { "Name": "Microsoft.AspNetCore.Builder.RewriteBuilderExtensions", @@ -563,6 +563,55 @@ "Extension": true, "Visibility": "Public", "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "AddRedirectToWwwPermanent", + "Parameters": [ + { + "Name": "options", + "Type": "Microsoft.AspNetCore.Rewrite.RewriteOptions" + } + ], + "ReturnType": "Microsoft.AspNetCore.Rewrite.RewriteOptions", + "Static": true, + "Extension": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "AddRedirectToWww", + "Parameters": [ + { + "Name": "options", + "Type": "Microsoft.AspNetCore.Rewrite.RewriteOptions" + } + ], + "ReturnType": "Microsoft.AspNetCore.Rewrite.RewriteOptions", + "Static": true, + "Extension": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "AddRedirectToWww", + "Parameters": [ + { + "Name": "options", + "Type": "Microsoft.AspNetCore.Rewrite.RewriteOptions" + }, + { + "Name": "statusCode", + "Type": "System.Int32" + } + ], + "ReturnType": "Microsoft.AspNetCore.Rewrite.RewriteOptions", + "Static": true, + "Extension": true, + "Visibility": "Public", + "GenericParameter": [] } ], "GenericParameters": [] @@ -597,5319 +646,6 @@ } ], "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Item", - "Parameters": [ - { - "Name": "index", - "Type": "System.Int32" - } - ], - "ReturnType": "System.String", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Add", - "Parameters": [ - { - "Name": "references", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "references", - "Type": "System.Text.RegularExpressions.GroupCollection" - } - ], - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "reference", - "Type": "System.String" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.DelegateRule", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [ - "Microsoft.AspNetCore.Rewrite.IRule" - ], - "Members": [ - { - "Kind": "Method", - "Name": "ApplyRule", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - } - ], - "ReturnType": "System.Void", - "Sealed": true, - "Virtual": true, - "ImplementedInterface": "Microsoft.AspNetCore.Rewrite.IRule", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "onApplyRule", - "Type": "System.Action" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.MatchResults", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Success", - "Parameters": [], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Success", - "Parameters": [ - { - "Name": "value", - "Type": "System.Boolean" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_BackReferences", - "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_BackReferences", - "Parameters": [ - { - "Name": "value", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Field", - "Name": "EmptySuccess", - "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.MatchResults", - "Static": true, - "ReadOnly": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Field", - "Name": "EmptyFailure", - "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.MatchResults", - "Static": true, - "ReadOnly": true, - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.ParserContext", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Index", - "Parameters": [], - "ReturnType": "System.Int32", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Index", - "Parameters": [ - { - "Name": "value", - "Type": "System.Int32" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Current", - "Parameters": [], - "ReturnType": "System.Char", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Back", - "Parameters": [], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Next", - "Parameters": [], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "HasNext", - "Parameters": [], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Mark", - "Parameters": [], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GetIndex", - "Parameters": [], - "ReturnType": "System.Int32", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Capture", - "Parameters": [], - "ReturnType": "System.String", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "condition", - "Type": "System.String" - } - ], - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Field", - "Name": "Template", - "Parameters": [], - "ReturnType": "System.String", - "ReadOnly": true, - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.Pattern", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_PatternSegments", - "Parameters": [], - "ReturnType": "System.Collections.Generic.IList", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "patternSegments", - "Type": "System.Collections.Generic.IList" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Abstract": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Protected", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.RedirectRule", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [ - "Microsoft.AspNetCore.Rewrite.IRule" - ], - "Members": [ - { - "Kind": "Method", - "Name": "get_InitialMatch", - "Parameters": [], - "ReturnType": "System.Text.RegularExpressions.Regex", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Replacement", - "Parameters": [], - "ReturnType": "System.String", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_StatusCode", - "Parameters": [], - "ReturnType": "System.Int32", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ApplyRule", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "ImplementedInterface": "Microsoft.AspNetCore.Rewrite.IRule", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "regex", - "Type": "System.String" - }, - { - "Name": "replacement", - "Type": "System.String" - }, - { - "Name": "statusCode", - "Type": "System.Int32" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.RedirectToHttpsRule", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [ - "Microsoft.AspNetCore.Rewrite.IRule" - ], - "Members": [ - { - "Kind": "Method", - "Name": "get_SSLPort", - "Parameters": [], - "ReturnType": "System.Nullable", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_SSLPort", - "Parameters": [ - { - "Name": "value", - "Type": "System.Nullable" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_StatusCode", - "Parameters": [], - "ReturnType": "System.Int32", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_StatusCode", - "Parameters": [ - { - "Name": "value", - "Type": "System.Int32" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ApplyRule", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "ImplementedInterface": "Microsoft.AspNetCore.Rewrite.IRule", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.RewriteRule", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [ - "Microsoft.AspNetCore.Rewrite.IRule" - ], - "Members": [ - { - "Kind": "Method", - "Name": "get_InitialMatch", - "Parameters": [], - "ReturnType": "System.Text.RegularExpressions.Regex", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Replacement", - "Parameters": [], - "ReturnType": "System.String", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_StopProcessing", - "Parameters": [], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ApplyRule", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "ImplementedInterface": "Microsoft.AspNetCore.Rewrite.IRule", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "regex", - "Type": "System.String" - }, - { - "Name": "replacement", - "Type": "System.String" - }, - { - "Name": "stopProcessing", - "Type": "System.Boolean" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.UrlAction", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Url", - "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.Pattern", - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Url", - "Parameters": [ - { - "Name": "value", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.Pattern" - } - ], - "ReturnType": "System.Void", - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ApplyAction", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Abstract": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Protected", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatch", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Negate", - "Parameters": [], - "ReturnType": "System.Boolean", - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Negate", - "Parameters": [ - { - "Name": "value", - "Type": "System.Boolean" - } - ], - "ReturnType": "System.Void", - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "input", - "Type": "System.String" - }, - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.MatchResults", - "Virtual": true, - "Abstract": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Protected", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatches.ExactMatch", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatch", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "pattern", - "Type": "System.String" - }, - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.MatchResults", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "ignoreCase", - "Type": "System.Boolean" - }, - { - "Name": "input", - "Type": "System.String" - }, - { - "Name": "negate", - "Type": "System.Boolean" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatches.FileSizeMatch", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatch", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "input", - "Type": "System.String" - }, - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.MatchResults", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "negate", - "Type": "System.Boolean" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatches.IntegerMatch", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatch", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "input", - "Type": "System.String" - }, - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.MatchResults", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "value", - "Type": "System.Int32" - }, - { - "Name": "operation", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatches.IntegerOperationType" - } - ], - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - }, - { - "Name": "operation", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatches.IntegerOperationType" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatches.IntegerOperationType", - "Visibility": "Public", - "Kind": "Enumeration", - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Field", - "Name": "Equal", - "Parameters": [], - "GenericParameter": [], - "Literal": "0" - }, - { - "Kind": "Field", - "Name": "Greater", - "Parameters": [], - "GenericParameter": [], - "Literal": "1" - }, - { - "Kind": "Field", - "Name": "GreaterEqual", - "Parameters": [], - "GenericParameter": [], - "Literal": "2" - }, - { - "Kind": "Field", - "Name": "Less", - "Parameters": [], - "GenericParameter": [], - "Literal": "3" - }, - { - "Kind": "Field", - "Name": "LessEqual", - "Parameters": [], - "GenericParameter": [], - "Literal": "4" - }, - { - "Kind": "Field", - "Name": "NotEqual", - "Parameters": [], - "GenericParameter": [], - "Literal": "5" - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatches.IsDirectoryMatch", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatch", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "pattern", - "Type": "System.String" - }, - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.MatchResults", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "negate", - "Type": "System.Boolean" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatches.IsFileMatch", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatch", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "pattern", - "Type": "System.String" - }, - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.MatchResults", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "negate", - "Type": "System.Boolean" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatches.RegexMatch", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatch", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "pattern", - "Type": "System.String" - }, - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.MatchResults", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "match", - "Type": "System.Text.RegularExpressions.Regex" - }, - { - "Name": "negate", - "Type": "System.Boolean" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatches.StringMatch", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatch", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "input", - "Type": "System.String" - }, - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.MatchResults", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - }, - { - "Name": "operation", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatches.StringOperationType" - }, - { - "Name": "ignoreCase", - "Type": "System.Boolean" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatches.StringOperationType", - "Visibility": "Public", - "Kind": "Enumeration", - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Field", - "Name": "Equal", - "Parameters": [], - "GenericParameter": [], - "Literal": "0" - }, - { - "Kind": "Field", - "Name": "Greater", - "Parameters": [], - "GenericParameter": [], - "Literal": "1" - }, - { - "Kind": "Field", - "Name": "GreaterEqual", - "Parameters": [], - "GenericParameter": [], - "Literal": "2" - }, - { - "Kind": "Field", - "Name": "Less", - "Parameters": [], - "GenericParameter": [], - "Literal": "3" - }, - { - "Kind": "Field", - "Name": "LessEqual", - "Parameters": [], - "GenericParameter": [], - "Literal": "4" - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.UrlActions.AbortAction", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.UrlAction", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "ApplyAction", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.UrlActions.ChangeCookieAction", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.UrlAction", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Name", - "Parameters": [], - "ReturnType": "System.String", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Value", - "Parameters": [], - "ReturnType": "System.String", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Value", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Domain", - "Parameters": [], - "ReturnType": "System.String", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Domain", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Lifetime", - "Parameters": [], - "ReturnType": "System.TimeSpan", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Lifetime", - "Parameters": [ - { - "Name": "value", - "Type": "System.TimeSpan" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Path", - "Parameters": [], - "ReturnType": "System.String", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Path", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Secure", - "Parameters": [], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Secure", - "Parameters": [ - { - "Name": "value", - "Type": "System.Boolean" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_HttpOnly", - "Parameters": [], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_HttpOnly", - "Parameters": [ - { - "Name": "value", - "Type": "System.Boolean" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ApplyAction", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "name", - "Type": "System.String" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.UrlActions.CustomResponseAction", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.UrlAction", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_StatusCode", - "Parameters": [], - "ReturnType": "System.Int32", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_StatusReason", - "Parameters": [], - "ReturnType": "System.String", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_StatusReason", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_StatusDescription", - "Parameters": [], - "ReturnType": "System.String", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_StatusDescription", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ApplyAction", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "statusCode", - "Type": "System.Int32" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.UrlActions.ForbiddenAction", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.UrlAction", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "ApplyAction", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.UrlActions.GoneAction", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.UrlAction", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "ApplyAction", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.UrlActions.NoneAction", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.UrlAction", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Result", - "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Rewrite.RuleResult", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ApplyAction", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "result", - "Type": "Microsoft.AspNetCore.Rewrite.RuleResult" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.UrlActions.RedirectAction", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.UrlAction", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_StatusCode", - "Parameters": [], - "ReturnType": "System.Int32", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_QueryStringAppend", - "Parameters": [], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_QueryStringDelete", - "Parameters": [], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_EscapeBackReferences", - "Parameters": [], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ApplyAction", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "statusCode", - "Type": "System.Int32" - }, - { - "Name": "pattern", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.Pattern" - }, - { - "Name": "queryStringAppend", - "Type": "System.Boolean" - }, - { - "Name": "queryStringDelete", - "Type": "System.Boolean" - }, - { - "Name": "escapeBackReferences", - "Type": "System.Boolean" - } - ], - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "statusCode", - "Type": "System.Int32" - }, - { - "Name": "pattern", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.Pattern" - }, - { - "Name": "queryStringAppend", - "Type": "System.Boolean" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.UrlActions.RewriteAction", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.UrlAction", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Result", - "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Rewrite.RuleResult", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_QueryStringAppend", - "Parameters": [], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_QueryStringDelete", - "Parameters": [], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_EscapeBackReferences", - "Parameters": [], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ApplyAction", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "result", - "Type": "Microsoft.AspNetCore.Rewrite.RuleResult" - }, - { - "Name": "pattern", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.Pattern" - }, - { - "Name": "queryStringAppend", - "Type": "System.Boolean" - }, - { - "Name": "queryStringDelete", - "Type": "System.Boolean" - }, - { - "Name": "escapeBackReferences", - "Type": "System.Boolean" - } - ], - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "result", - "Type": "Microsoft.AspNetCore.Rewrite.RuleResult" - }, - { - "Name": "pattern", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.Pattern" - }, - { - "Name": "queryStringAppend", - "Type": "System.Boolean" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.ConditionMatchSegment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "index", - "Type": "System.Int32" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.DateTimeSegment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReference", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "segment", - "Type": "System.String" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.HeaderSegment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "header", - "Type": "System.String" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.IsHttpsModSegment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.IsHttpsUrlSegment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.IsIPV6Segment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.LiteralSegment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "literal", - "Type": "System.String" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.LocalAddressSegment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.LocalPortSegment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.QueryStringSegment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackRefernces", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.RemoteAddressSegment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.RemotePortSegment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.RequestFileNameSegment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.RequestMethodSegment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.RewriteMapSegment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "rewriteMap", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.IISRewriteMap" - }, - { - "Name": "pattern", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.Pattern" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.RuleMatchSegment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "index", - "Type": "System.Int32" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.SchemeSegment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.ServerProtocolSegment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.ToLowerSegment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "pattern", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.Pattern" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.UrlEncodeSegment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "pattern", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.Pattern" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegments.UrlSegment", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "uriMatchPart", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.UriMatchPart" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.ActionType", - "Visibility": "Public", - "Kind": "Enumeration", - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Field", - "Name": "None", - "Parameters": [], - "GenericParameter": [], - "Literal": "0" - }, - { - "Kind": "Field", - "Name": "Rewrite", - "Parameters": [], - "GenericParameter": [], - "Literal": "1" - }, - { - "Kind": "Field", - "Name": "Redirect", - "Parameters": [], - "GenericParameter": [], - "Literal": "2" - }, - { - "Kind": "Field", - "Name": "CustomResponse", - "Parameters": [], - "GenericParameter": [], - "Literal": "3" - }, - { - "Kind": "Field", - "Name": "AbortRequest", - "Parameters": [], - "GenericParameter": [], - "Literal": "4" - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.Condition", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Input", - "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.Pattern", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Input", - "Parameters": [ - { - "Name": "value", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.Pattern" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Match", - "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatch", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Match", - "Parameters": [ - { - "Name": "value", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatch" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.MatchResults", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.ConditionCollection", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [ - "System.Collections.Generic.IEnumerable" - ], - "Members": [ - { - "Kind": "Method", - "Name": "get_Grouping", - "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.LogicalGrouping", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_TrackAllCaptures", - "Parameters": [], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Count", - "Parameters": [], - "ReturnType": "System.Int32", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Item", - "Parameters": [ - { - "Name": "index", - "Type": "System.Int32" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.Condition", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Add", - "Parameters": [ - { - "Name": "condition", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.Condition" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "AddConditions", - "Parameters": [ - { - "Name": "conditions", - "Type": "System.Collections.Generic.IEnumerable" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GetEnumerator", - "Parameters": [], - "ReturnType": "System.Collections.Generic.IEnumerator", - "Sealed": true, - "Virtual": true, - "ImplementedInterface": "System.Collections.Generic.IEnumerable", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "grouping", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.LogicalGrouping" - }, - { - "Name": "trackAllCaptures", - "Type": "System.Boolean" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.ConditionEvaluator", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "Static": true, - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "conditions", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.ConditionCollection" - }, - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "backReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.MatchResults", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.IISRewriteMap", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Name", - "Parameters": [], - "ReturnType": "System.String", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Item", - "Parameters": [ - { - "Name": "key", - "Type": "System.String" - } - ], - "ReturnType": "System.String", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Item", - "Parameters": [ - { - "Name": "key", - "Type": "System.String" - }, - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "name", - "Type": "System.String" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.IISRewriteMapCollection", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [ - "System.Collections.Generic.IEnumerable" - ], - "Members": [ - { - "Kind": "Method", - "Name": "Add", - "Parameters": [ - { - "Name": "rewriteMap", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.IISRewriteMap" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Count", - "Parameters": [], - "ReturnType": "System.Int32", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Item", - "Parameters": [ - { - "Name": "key", - "Type": "System.String" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.IISRewriteMap", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GetEnumerator", - "Parameters": [], - "ReturnType": "System.Collections.Generic.IEnumerator", - "Sealed": true, - "Virtual": true, - "ImplementedInterface": "System.Collections.Generic.IEnumerable", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.IISUrlRewriteRule", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [ - "Microsoft.AspNetCore.Rewrite.IRule" - ], - "Members": [ - { - "Kind": "Method", - "Name": "get_Name", - "Parameters": [], - "ReturnType": "System.String", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_InitialMatch", - "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatch", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Conditions", - "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.ConditionCollection", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Action", - "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.UrlAction", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Global", - "Parameters": [], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ApplyRule", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "ImplementedInterface": "Microsoft.AspNetCore.Rewrite.IRule", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "name", - "Type": "System.String" - }, - { - "Name": "initialMatch", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatch" - }, - { - "Name": "conditions", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.ConditionCollection" - }, - { - "Name": "action", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.UrlAction" - } - ], - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "name", - "Type": "System.String" - }, - { - "Name": "initialMatch", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatch" - }, - { - "Name": "conditions", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.ConditionCollection" - }, - { - "Name": "action", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.UrlAction" - }, - { - "Name": "global", - "Type": "System.Boolean" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.InputParser", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "ParseInputString", - "Parameters": [ - { - "Name": "testString", - "Type": "System.String" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.Pattern", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ParseInputString", - "Parameters": [ - { - "Name": "testString", - "Type": "System.String" - }, - { - "Name": "uriMatchPart", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.UriMatchPart" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.Pattern", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "rewriteMaps", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.IISRewriteMapCollection" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.InvalidUrlRewriteFormatException", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "System.FormatException", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_LineNumber", - "Parameters": [], - "ReturnType": "System.Int32", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_LinePosition", - "Parameters": [], - "ReturnType": "System.Int32", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "element", - "Type": "System.Xml.Linq.XElement" - }, - { - "Name": "message", - "Type": "System.String" - } - ], - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "element", - "Type": "System.Xml.Linq.XElement" - }, - { - "Name": "message", - "Type": "System.String" - }, - { - "Name": "innerException", - "Type": "System.Exception" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.LogicalGrouping", - "Visibility": "Public", - "Kind": "Enumeration", - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Field", - "Name": "MatchAll", - "Parameters": [], - "GenericParameter": [], - "Literal": "0" - }, - { - "Kind": "Field", - "Name": "MatchAny", - "Parameters": [], - "GenericParameter": [], - "Literal": "1" - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.MatchType", - "Visibility": "Public", - "Kind": "Enumeration", - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Field", - "Name": "Pattern", - "Parameters": [], - "GenericParameter": [], - "Literal": "0" - }, - { - "Kind": "Field", - "Name": "IsFile", - "Parameters": [], - "GenericParameter": [], - "Literal": "1" - }, - { - "Kind": "Field", - "Name": "IsDirectory", - "Parameters": [], - "GenericParameter": [], - "Literal": "2" - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.PatternSyntax", - "Visibility": "Public", - "Kind": "Enumeration", - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Field", - "Name": "ECMAScript", - "Parameters": [], - "GenericParameter": [], - "Literal": "0" - }, - { - "Kind": "Field", - "Name": "Wildcard", - "Parameters": [], - "GenericParameter": [], - "Literal": "1" - }, - { - "Kind": "Field", - "Name": "ExactMatch", - "Parameters": [], - "GenericParameter": [], - "Literal": "2" - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.RedirectType", - "Visibility": "Public", - "Kind": "Enumeration", - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Field", - "Name": "Permanent", - "Parameters": [], - "GenericParameter": [], - "Literal": "301" - }, - { - "Kind": "Field", - "Name": "Found", - "Parameters": [], - "GenericParameter": [], - "Literal": "302" - }, - { - "Kind": "Field", - "Name": "SeeOther", - "Parameters": [], - "GenericParameter": [], - "Literal": "303" - }, - { - "Kind": "Field", - "Name": "Temporary", - "Parameters": [], - "GenericParameter": [], - "Literal": "307" - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.RewriteMapParser", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "Static": true, - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Parse", - "Parameters": [ - { - "Name": "xmlRoot", - "Type": "System.Xml.Linq.XElement" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.IISRewriteMapCollection", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.RewriteTags", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "Static": true, - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Field", - "Name": "Action", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"action\"" - }, - { - "Kind": "Field", - "Name": "Add", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"add\"" - }, - { - "Kind": "Field", - "Name": "AppendQueryString", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"appendQueryString\"" - }, - { - "Kind": "Field", - "Name": "Conditions", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"conditions\"" - }, - { - "Kind": "Field", - "Name": "Enabled", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"enabled\"" - }, - { - "Kind": "Field", - "Name": "GlobalRules", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"globalRules\"" - }, - { - "Kind": "Field", - "Name": "IgnoreCase", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"ignoreCase\"" - }, - { - "Kind": "Field", - "Name": "Input", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"input\"" - }, - { - "Kind": "Field", - "Name": "Key", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"key\"" - }, - { - "Kind": "Field", - "Name": "LogicalGrouping", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"logicalGrouping\"" - }, - { - "Kind": "Field", - "Name": "LogRewrittenUrl", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"logRewrittenUrl\"" - }, - { - "Kind": "Field", - "Name": "Match", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"match\"" - }, - { - "Kind": "Field", - "Name": "MatchPattern", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"matchPattern\"" - }, - { - "Kind": "Field", - "Name": "MatchType", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"matchType\"" - }, - { - "Kind": "Field", - "Name": "Name", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"name\"" - }, - { - "Kind": "Field", - "Name": "Negate", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"negate\"" - }, - { - "Kind": "Field", - "Name": "Pattern", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"pattern\"" - }, - { - "Kind": "Field", - "Name": "PatternSyntax", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"patternSyntax\"" - }, - { - "Kind": "Field", - "Name": "RedirectType", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"redirectType\"" - }, - { - "Kind": "Field", - "Name": "Rewrite", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"rewrite\"" - }, - { - "Kind": "Field", - "Name": "RewriteMap", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"rewriteMap\"" - }, - { - "Kind": "Field", - "Name": "RewriteMaps", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"rewriteMaps\"" - }, - { - "Kind": "Field", - "Name": "Rule", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"rule\"" - }, - { - "Kind": "Field", - "Name": "Rules", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"rules\"" - }, - { - "Kind": "Field", - "Name": "StatusCode", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"statusCode\"" - }, - { - "Kind": "Field", - "Name": "SubStatusCode", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"subStatusCode\"" - }, - { - "Kind": "Field", - "Name": "StatusDescription", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"statusDescription\"" - }, - { - "Kind": "Field", - "Name": "StatusReason", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"statusReason\"" - }, - { - "Kind": "Field", - "Name": "StopProcessing", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"stopProcessing\"" - }, - { - "Kind": "Field", - "Name": "TrackAllCaptures", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"trackAllCaptures\"" - }, - { - "Kind": "Field", - "Name": "Type", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"type\"" - }, - { - "Kind": "Field", - "Name": "Url", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"url\"" - }, - { - "Kind": "Field", - "Name": "Value", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"value\"" - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.ServerVariables", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "Static": true, - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "FindServerVariable", - "Parameters": [ - { - "Name": "serverVariable", - "Type": "System.String" - }, - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.ParserContext" - }, - { - "Name": "uriMatchPart", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.UriMatchPart" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.UriMatchCondition", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.Condition", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "inputParser", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.InputParser" - }, - { - "Name": "input", - "Type": "System.String" - }, - { - "Name": "pattern", - "Type": "System.String" - }, - { - "Name": "uriMatchPart", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.UriMatchPart" - }, - { - "Name": "ignoreCase", - "Type": "System.Boolean" - }, - { - "Name": "negate", - "Type": "System.Boolean" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.UriMatchPart", - "Visibility": "Public", - "Kind": "Enumeration", - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Field", - "Name": "Full", - "Parameters": [], - "GenericParameter": [], - "Literal": "0" - }, - { - "Kind": "Field", - "Name": "Path", - "Parameters": [], - "GenericParameter": [], - "Literal": "1" - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.UrlRewriteFileParser", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Parse", - "Parameters": [ - { - "Name": "reader", - "Type": "System.IO.TextReader" - } - ], - "ReturnType": "System.Collections.Generic.IList", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.UrlRewriteRuleBuilder", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Name", - "Parameters": [], - "ReturnType": "System.String", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Name", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Enabled", - "Parameters": [], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Enabled", - "Parameters": [ - { - "Name": "value", - "Type": "System.Boolean" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Global", - "Parameters": [], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Global", - "Parameters": [ - { - "Name": "value", - "Type": "System.Boolean" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_UriMatchPart", - "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.UriMatchPart", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Build", - "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.IISUrlRewriteRule", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "AddUrlAction", - "Parameters": [ - { - "Name": "action", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.UrlAction" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "AddUrlMatch", - "Parameters": [ - { - "Name": "input", - "Type": "System.String" - }, - { - "Name": "ignoreCase", - "Type": "System.Boolean", - "DefaultValue": "True" - }, - { - "Name": "negate", - "Type": "System.Boolean", - "DefaultValue": "False" - }, - { - "Name": "patternSyntax", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.PatternSyntax", - "DefaultValue": "0" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ConfigureConditionBehavior", - "Parameters": [ - { - "Name": "logicalGrouping", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.LogicalGrouping" - }, - { - "Name": "trackAllCaptures", - "Type": "System.Boolean" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "AddUrlCondition", - "Parameters": [ - { - "Name": "condition", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite.Condition" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "AddUrlConditions", - "Parameters": [ - { - "Name": "conditions", - "Type": "System.Collections.Generic.IEnumerable" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ApacheModRewriteRule", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [ - "Microsoft.AspNetCore.Rewrite.IRule" - ], - "Members": [ - { - "Kind": "Method", - "Name": "get_InitialMatch", - "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatch", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Conditions", - "Parameters": [], - "ReturnType": "System.Collections.Generic.IList", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Actions", - "Parameters": [], - "ReturnType": "System.Collections.Generic.IList", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ApplyRule", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "ImplementedInterface": "Microsoft.AspNetCore.Rewrite.IRule", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "initialMatch", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatch" - }, - { - "Name": "conditions", - "Type": "System.Collections.Generic.IList" - }, - { - "Name": "urlActions", - "Type": "System.Collections.Generic.IList" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.Condition", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Input", - "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.Pattern", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Input", - "Parameters": [ - { - "Name": "value", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.Pattern" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Match", - "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatch", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Match", - "Parameters": [ - { - "Name": "value", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.UrlMatch" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_OrNext", - "Parameters": [], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_OrNext", - "Parameters": [ - { - "Name": "value", - "Type": "System.Boolean" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "ruleBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "conditionBackReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.MatchResults", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ConditionEvaluator", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "Static": true, - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "conditions", - "Type": "System.Collections.Generic.IEnumerable" - }, - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "backReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.MatchResults", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Evaluate", - "Parameters": [ - { - "Name": "conditions", - "Type": "System.Collections.Generic.IEnumerable" - }, - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.RewriteContext" - }, - { - "Name": "backReferences", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.BackReferenceCollection" - }, - { - "Name": "trackAllCaptures", - "Type": "System.Boolean" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.MatchResults", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ConditionPatternParser", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "ParseActionCondition", - "Parameters": [ - { - "Name": "condition", - "Type": "System.String" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ParsedModRewriteInput", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ConditionType", - "Visibility": "Public", - "Kind": "Enumeration", - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Field", - "Name": "Regex", - "Parameters": [], - "GenericParameter": [], - "Literal": "0" - }, - { - "Kind": "Field", - "Name": "PropertyTest", - "Parameters": [], - "GenericParameter": [], - "Literal": "1" - }, - { - "Kind": "Field", - "Name": "StringComp", - "Parameters": [], - "GenericParameter": [], - "Literal": "2" - }, - { - "Kind": "Field", - "Name": "IntComp", - "Parameters": [], - "GenericParameter": [], - "Literal": "3" - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.CookieActionFactory", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Create", - "Parameters": [ - { - "Name": "flagValue", - "Type": "System.String" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.UrlActions.ChangeCookieAction", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.FileParser", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Parse", - "Parameters": [ - { - "Name": "input", - "Type": "System.IO.TextReader" - } - ], - "ReturnType": "System.Collections.Generic.IList", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.FlagParser", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Parse", - "Parameters": [ - { - "Name": "flagString", - "Type": "System.String" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.Flags", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.Flags", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_FlagDictionary", - "Parameters": [], - "ReturnType": "System.Collections.Generic.IDictionary", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "SetFlag", - "Parameters": [ - { - "Name": "flag", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.FlagType" - }, - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GetValue", - "Parameters": [ - { - "Name": "flag", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.FlagType" - }, - { - "Name": "value", - "Type": "System.String", - "Direction": "Out" - } - ], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Item", - "Parameters": [ - { - "Name": "flag", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.FlagType" - } - ], - "ReturnType": "System.String", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Item", - "Parameters": [ - { - "Name": "flag", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.FlagType" - }, - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "HasFlag", - "Parameters": [ - { - "Name": "flag", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.FlagType" - } - ], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "flags", - "Type": "System.Collections.Generic.IDictionary" - } - ], - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.FlagType", - "Visibility": "Public", - "Kind": "Enumeration", - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Field", - "Name": "EscapeBackreference", - "Parameters": [], - "GenericParameter": [], - "Literal": "0" - }, - { - "Kind": "Field", - "Name": "Chain", - "Parameters": [], - "GenericParameter": [], - "Literal": "1" - }, - { - "Kind": "Field", - "Name": "Cookie", - "Parameters": [], - "GenericParameter": [], - "Literal": "2" - }, - { - "Kind": "Field", - "Name": "DiscardPath", - "Parameters": [], - "GenericParameter": [], - "Literal": "3" - }, - { - "Kind": "Field", - "Name": "Env", - "Parameters": [], - "GenericParameter": [], - "Literal": "4" - }, - { - "Kind": "Field", - "Name": "End", - "Parameters": [], - "GenericParameter": [], - "Literal": "5" - }, - { - "Kind": "Field", - "Name": "Forbidden", - "Parameters": [], - "GenericParameter": [], - "Literal": "6" - }, - { - "Kind": "Field", - "Name": "Gone", - "Parameters": [], - "GenericParameter": [], - "Literal": "7" - }, - { - "Kind": "Field", - "Name": "Handler", - "Parameters": [], - "GenericParameter": [], - "Literal": "8" - }, - { - "Kind": "Field", - "Name": "Last", - "Parameters": [], - "GenericParameter": [], - "Literal": "9" - }, - { - "Kind": "Field", - "Name": "Next", - "Parameters": [], - "GenericParameter": [], - "Literal": "10" - }, - { - "Kind": "Field", - "Name": "NoCase", - "Parameters": [], - "GenericParameter": [], - "Literal": "11" - }, - { - "Kind": "Field", - "Name": "NoEscape", - "Parameters": [], - "GenericParameter": [], - "Literal": "12" - }, - { - "Kind": "Field", - "Name": "NoSubReq", - "Parameters": [], - "GenericParameter": [], - "Literal": "13" - }, - { - "Kind": "Field", - "Name": "NoVary", - "Parameters": [], - "GenericParameter": [], - "Literal": "14" - }, - { - "Kind": "Field", - "Name": "Or", - "Parameters": [], - "GenericParameter": [], - "Literal": "15" - }, - { - "Kind": "Field", - "Name": "Proxy", - "Parameters": [], - "GenericParameter": [], - "Literal": "16" - }, - { - "Kind": "Field", - "Name": "PassThrough", - "Parameters": [], - "GenericParameter": [], - "Literal": "17" - }, - { - "Kind": "Field", - "Name": "QSAppend", - "Parameters": [], - "GenericParameter": [], - "Literal": "18" - }, - { - "Kind": "Field", - "Name": "QSDiscard", - "Parameters": [], - "GenericParameter": [], - "Literal": "19" - }, - { - "Kind": "Field", - "Name": "QSLast", - "Parameters": [], - "GenericParameter": [], - "Literal": "20" - }, - { - "Kind": "Field", - "Name": "Redirect", - "Parameters": [], - "GenericParameter": [], - "Literal": "21" - }, - { - "Kind": "Field", - "Name": "Skip", - "Parameters": [], - "GenericParameter": [], - "Literal": "22" - }, - { - "Kind": "Field", - "Name": "Type", - "Parameters": [], - "GenericParameter": [], - "Literal": "23" - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.OperationType", - "Visibility": "Public", - "Kind": "Enumeration", - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Field", - "Name": "None", - "Parameters": [], - "GenericParameter": [], - "Literal": "0" - }, - { - "Kind": "Field", - "Name": "Equal", - "Parameters": [], - "GenericParameter": [], - "Literal": "1" - }, - { - "Kind": "Field", - "Name": "Greater", - "Parameters": [], - "GenericParameter": [], - "Literal": "2" - }, - { - "Kind": "Field", - "Name": "GreaterEqual", - "Parameters": [], - "GenericParameter": [], - "Literal": "3" - }, - { - "Kind": "Field", - "Name": "Less", - "Parameters": [], - "GenericParameter": [], - "Literal": "4" - }, - { - "Kind": "Field", - "Name": "LessEqual", - "Parameters": [], - "GenericParameter": [], - "Literal": "5" - }, - { - "Kind": "Field", - "Name": "NotEqual", - "Parameters": [], - "GenericParameter": [], - "Literal": "6" - }, - { - "Kind": "Field", - "Name": "Directory", - "Parameters": [], - "GenericParameter": [], - "Literal": "7" - }, - { - "Kind": "Field", - "Name": "RegularFile", - "Parameters": [], - "GenericParameter": [], - "Literal": "8" - }, - { - "Kind": "Field", - "Name": "ExistingFile", - "Parameters": [], - "GenericParameter": [], - "Literal": "9" - }, - { - "Kind": "Field", - "Name": "SymbolicLink", - "Parameters": [], - "GenericParameter": [], - "Literal": "10" - }, - { - "Kind": "Field", - "Name": "Size", - "Parameters": [], - "GenericParameter": [], - "Literal": "11" - }, - { - "Kind": "Field", - "Name": "ExistingUrl", - "Parameters": [], - "GenericParameter": [], - "Literal": "12" - }, - { - "Kind": "Field", - "Name": "Executable", - "Parameters": [], - "GenericParameter": [], - "Literal": "13" - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ParsedModRewriteInput", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Invert", - "Parameters": [], - "ReturnType": "System.Boolean", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Invert", - "Parameters": [ - { - "Name": "value", - "Type": "System.Boolean" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_ConditionType", - "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ConditionType", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_ConditionType", - "Parameters": [ - { - "Name": "value", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ConditionType" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_OperationType", - "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.OperationType", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_OperationType", - "Parameters": [ - { - "Name": "value", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.OperationType" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Operand", - "Parameters": [], - "ReturnType": "System.String", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Operand", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "invert", - "Type": "System.Boolean" - }, - { - "Name": "conditionType", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ConditionType" - }, - { - "Name": "operationType", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.OperationType" - }, - { - "Name": "operand", - "Type": "System.String" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.RuleBuilder", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Build", - "Parameters": [], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ApacheModRewriteRule", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "AddRule", - "Parameters": [ - { - "Name": "rule", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "AddConditionFromParts", - "Parameters": [ - { - "Name": "pattern", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.Pattern" - }, - { - "Name": "input", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ParsedModRewriteInput" - }, - { - "Name": "flags", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.Flags" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "AddMatch", - "Parameters": [ - { - "Name": "input", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ParsedModRewriteInput" - }, - { - "Name": "flags", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.Flags" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "AddAction", - "Parameters": [ - { - "Name": "pattern", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.Pattern" - }, - { - "Name": "flags", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.Flags" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.RuleRegexParser", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "ParseRuleRegex", - "Parameters": [ - { - "Name": "regex", - "Type": "System.String" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ParsedModRewriteInput", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.SegmentType", - "Visibility": "Public", - "Kind": "Enumeration", - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Field", - "Name": "Literal", - "Parameters": [], - "GenericParameter": [], - "Literal": "0" - }, - { - "Kind": "Field", - "Name": "ServerParameter", - "Parameters": [], - "GenericParameter": [], - "Literal": "1" - }, - { - "Kind": "Field", - "Name": "ConditionParameter", - "Parameters": [], - "GenericParameter": [], - "Literal": "2" - }, - { - "Kind": "Field", - "Name": "RuleParameter", - "Parameters": [], - "GenericParameter": [], - "Literal": "3" - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.ServerVariables", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "Static": true, - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "FindServerVariable", - "Parameters": [ - { - "Name": "serverVariable", - "Type": "System.String" - }, - { - "Name": "context", - "Type": "Microsoft.AspNetCore.Rewrite.Internal.ParserContext" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.PatternSegment", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.TestStringParser", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Parse", - "Parameters": [ - { - "Name": "testString", - "Type": "System.String" - } - ], - "ReturnType": "Microsoft.AspNetCore.Rewrite.Internal.Pattern", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite.Tokenizer", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Tokenize", - "Parameters": [ - { - "Name": "rule", - "Type": "System.String" - } - ], - "ReturnType": "System.Collections.Generic.IList", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] } ] } \ No newline at end of file From baf5c7b3e245a9b0a15fb57b364bc110f89f5788 Mon Sep 17 00:00:00 2001 From: "Chris Ross (ASP.NET)" Date: Mon, 18 Jun 2018 12:16:23 -0700 Subject: [PATCH 17/45] Add back Hsts constructor #339 --- src/Microsoft.AspNetCore.HttpsPolicy/HstsMiddleware.cs | 9 +++++++++ .../breakingchanges.netcore.json | 7 ------- 2 files changed, 9 insertions(+), 7 deletions(-) delete mode 100644 src/Microsoft.AspNetCore.HttpsPolicy/breakingchanges.netcore.json diff --git a/src/Microsoft.AspNetCore.HttpsPolicy/HstsMiddleware.cs b/src/Microsoft.AspNetCore.HttpsPolicy/HstsMiddleware.cs index da5aa3af4b..d192785064 100644 --- a/src/Microsoft.AspNetCore.HttpsPolicy/HstsMiddleware.cs +++ b/src/Microsoft.AspNetCore.HttpsPolicy/HstsMiddleware.cs @@ -8,6 +8,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.HttpsPolicy.Internal; using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; using Microsoft.Extensions.Primitives; using Microsoft.Net.Http.Headers; @@ -53,6 +54,14 @@ namespace Microsoft.AspNetCore.HttpsPolicy _logger = loggerFactory.CreateLogger(); } + /// + /// Initialize the HSTS middleware. + /// + /// + /// + public HstsMiddleware(RequestDelegate next, IOptions options) + : this(next, options, NullLoggerFactory.Instance) { } + /// /// Invoke the middleware. /// diff --git a/src/Microsoft.AspNetCore.HttpsPolicy/breakingchanges.netcore.json b/src/Microsoft.AspNetCore.HttpsPolicy/breakingchanges.netcore.json deleted file mode 100644 index bb14c1b93b..0000000000 --- a/src/Microsoft.AspNetCore.HttpsPolicy/breakingchanges.netcore.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "TypeId": "public class Microsoft.AspNetCore.HttpsPolicy.HstsMiddleware", - "MemberId": "public .ctor(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Options.IOptions options)", - "Kind": "Removal" - } -] From 68a14eecf11b0a473ba87cec5bb60f32cf380556 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Mon, 25 Jun 2018 11:08:09 -0700 Subject: [PATCH 18/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 40 ++++++++++++++++++++-------------------- korebuild-lock.txt | 4 ++-- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index f1155dd699..27a38ff200 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,26 +3,26 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.2.0-preview1-17081 - 2.2.0-preview1-34411 - 2.2.0-preview1-34411 - 2.2.0-preview1-34411 - 2.2.0-preview1-34411 - 2.2.0-preview1-34411 - 2.2.0-preview1-34411 - 2.2.0-preview1-34411 - 2.2.0-preview1-34411 - 2.2.0-preview1-34411 - 2.2.0-preview1-34411 - 2.2.0-preview1-34411 - 2.2.0-preview1-34411 - 2.2.0-preview1-34411 - 2.2.0-preview1-34411 - 2.2.0-preview1-34411 - 2.2.0-preview1-34411 - 2.2.0-preview1-34411 - 2.2.0-preview1-26606-01 - 2.2.0-preview1-34411 + 2.2.0-preview1-17090 + 2.2.0-preview1-34530 + 2.2.0-preview1-34530 + 2.2.0-preview1-34530 + 2.2.0-preview1-34530 + 2.2.0-preview1-34530 + 2.2.0-preview1-34530 + 2.2.0-preview1-34530 + 2.2.0-preview1-34530 + 2.2.0-preview1-34530 + 2.2.0-preview1-34530 + 2.2.0-preview1-34530 + 2.2.0-preview1-34530 + 2.2.0-preview1-34530 + 2.2.0-preview1-34530 + 2.2.0-preview1-34530 + 2.2.0-preview1-34530 + 2.2.0-preview1-34530 + 2.2.0-preview1-26618-02 + 2.2.0-preview1-34530 15.6.1 4.7.49 2.0.3 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index deb7e546f0..a8109db529 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-17081 -commithash:73f09c256e2a54270951562ecc0ef4a953926c36 +version:2.2.0-preview1-17090 +commithash:b19e903e946579cd9482089bce7d917e8bacd765 From 0c84821f23bdba59401ae46bc5e983d34e602e3b Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Thu, 28 Jun 2018 16:18:43 -0700 Subject: [PATCH 19/45] Update infrastructure for the 2.2 release --- .vsts-pipelines/builds/ci-internal.yml | 4 ++-- .vsts-pipelines/builds/ci-public.yml | 6 +++--- build/repo.props | 1 + korebuild.json | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.vsts-pipelines/builds/ci-internal.yml b/.vsts-pipelines/builds/ci-internal.yml index d7ceb76378..dc7b8a3cb9 100644 --- a/.vsts-pipelines/builds/ci-internal.yml +++ b/.vsts-pipelines/builds/ci-internal.yml @@ -1,5 +1,5 @@ trigger: -- dev +- master - release/* resources: @@ -7,7 +7,7 @@ resources: - repository: buildtools type: git name: aspnet-BuildTools - ref: refs/heads/dev + ref: refs/heads/release/2.2 phases: - template: .vsts-pipelines/templates/project-ci.yml@buildtools diff --git a/.vsts-pipelines/builds/ci-public.yml b/.vsts-pipelines/builds/ci-public.yml index b7f25723f8..f5087d9c30 100644 --- a/.vsts-pipelines/builds/ci-public.yml +++ b/.vsts-pipelines/builds/ci-public.yml @@ -1,5 +1,5 @@ trigger: -- dev +- master - release/* # See https://github.com/aspnet/BuildTools @@ -9,7 +9,7 @@ resources: type: github endpoint: DotNet-Bot GitHub Connection name: aspnet/BuildTools - ref: refs/heads/dev - + ref: refs/heads/release/2.2 + phases: - template: .vsts-pipelines/templates/project-ci.yml@buildtools diff --git a/build/repo.props b/build/repo.props index 62bcfa994f..9d2caa7f56 100644 --- a/build/repo.props +++ b/build/repo.props @@ -4,6 +4,7 @@ Internal.AspNetCore.Universe.Lineup + 2.2.0-* https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json diff --git a/korebuild.json b/korebuild.json index bd5d51a51b..d217d06e3e 100644 --- a/korebuild.json +++ b/korebuild.json @@ -1,4 +1,4 @@ { - "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/dev/tools/korebuild.schema.json", - "channel": "dev" + "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/release/2.2/tools/korebuild.schema.json", + "channel": "release/2.2" } From e425b27c057e5d875d4e52ccb4e44365b468b1b4 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 8 Jul 2018 12:07:02 -0700 Subject: [PATCH 20/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 40 ++++++++++++++++++++-------------------- korebuild-lock.txt | 4 ++-- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 27a38ff200..3ab03afc13 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,32 +3,32 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.2.0-preview1-17090 - 2.2.0-preview1-34530 - 2.2.0-preview1-34530 - 2.2.0-preview1-34530 - 2.2.0-preview1-34530 - 2.2.0-preview1-34530 - 2.2.0-preview1-34530 - 2.2.0-preview1-34530 - 2.2.0-preview1-34530 - 2.2.0-preview1-34530 - 2.2.0-preview1-34530 - 2.2.0-preview1-34530 - 2.2.0-preview1-34530 - 2.2.0-preview1-34530 - 2.2.0-preview1-34530 - 2.2.0-preview1-34530 - 2.2.0-preview1-34530 - 2.2.0-preview1-34530 + 2.2.0-preview1-17099 + 2.2.0-preview1-34640 + 2.2.0-preview1-34640 + 2.2.0-preview1-34640 + 2.2.0-preview1-34640 + 2.2.0-preview1-34640 + 2.2.0-preview1-34640 + 2.2.0-preview1-34640 + 2.2.0-preview1-34640 + 2.2.0-preview1-34640 + 2.2.0-preview1-34640 + 2.2.0-preview1-34640 + 2.2.0-preview1-34640 + 2.2.0-preview1-34640 + 2.2.0-preview1-34640 + 2.2.0-preview1-34640 + 2.2.0-preview1-34640 + 2.2.0-preview1-34640 2.2.0-preview1-26618-02 - 2.2.0-preview1-34530 + 2.2.0-preview1-34640 15.6.1 4.7.49 2.0.3 0.8.0 2.3.1 - 2.4.0-beta.1.build3945 + 2.4.0-rc.1.build4038 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index a8109db529..27e2e80f9a 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-17090 -commithash:b19e903e946579cd9482089bce7d917e8bacd765 +version:2.2.0-preview1-17099 +commithash:263ed1db9866b6b419b1f5d5189a712aa218acb3 From 767b3efa04fc2bc32f0ae7fc8849b88b90c6beb2 Mon Sep 17 00:00:00 2001 From: Kristian Hellang Date: Tue, 10 Jul 2018 21:44:01 +0200 Subject: [PATCH 21/45] Add Brotli compression provider (#342) * Added failing test for Brotli compression * Added Brotli compression provider * Add Brotli to existing test cases * Add failing test for accept encoding order * Use compression provider order when selecting provider * Some test cleanup * PR feedback * Added benchmarks for GetCompressionProvider * Added Brotli configuration order test * PR feedback * Switch Brotli and Gzip priority --- BasicMiddleware.sln | 9 + .../AssemblyInfo.cs | 4 + ...Core.ResponseCompression.Benchmarks.csproj | 19 ++ .../ResponseCompressionProviderBenchmark.cs | 57 +++++ build/dependencies.props | 3 + .../BrotliCompressionProvider.cs | 51 ++++ .../BrotliCompressionProviderOptions.cs | 22 ++ .../GzipCompressionProvider.cs | 2 +- ...soft.AspNetCore.ResponseCompression.csproj | 2 +- .../ResponseCompressionOptions.cs | 3 +- .../ResponseCompressionProvider.cs | 122 ++++++++-- .../ResponseCompressionMiddlewareTest.cs | 222 +++++++++++++----- 12 files changed, 428 insertions(+), 88 deletions(-) create mode 100644 benchmarks/Microsoft.AspNetCore.ResponseCompression.Benchmarks/AssemblyInfo.cs create mode 100644 benchmarks/Microsoft.AspNetCore.ResponseCompression.Benchmarks/Microsoft.AspNetCore.ResponseCompression.Benchmarks.csproj create mode 100644 benchmarks/Microsoft.AspNetCore.ResponseCompression.Benchmarks/ResponseCompressionProviderBenchmark.cs create mode 100644 src/Microsoft.AspNetCore.ResponseCompression/BrotliCompressionProvider.cs create mode 100644 src/Microsoft.AspNetCore.ResponseCompression/BrotliCompressionProviderOptions.cs diff --git a/BasicMiddleware.sln b/BasicMiddleware.sln index 8810201f5a..4bfc2ad2c5 100644 --- a/BasicMiddleware.sln +++ b/BasicMiddleware.sln @@ -76,6 +76,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.HostFi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.HostFiltering", "src\Microsoft.AspNetCore.HostFiltering\Microsoft.AspNetCore.HostFiltering.csproj", "{762F7276-C916-4111-A6C0-41668ABB3823}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "benchmarks", "benchmarks", "{C6DA6317-30FC-42FE-891C-64E75D88FF12}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.ResponseCompression.Benchmarks", "benchmarks\Microsoft.AspNetCore.ResponseCompression.Benchmarks\Microsoft.AspNetCore.ResponseCompression.Benchmarks.csproj", "{5AF10E85-5076-40B9-84CF-9830B585ABE5}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -154,6 +158,10 @@ Global {762F7276-C916-4111-A6C0-41668ABB3823}.Debug|Any CPU.Build.0 = Debug|Any CPU {762F7276-C916-4111-A6C0-41668ABB3823}.Release|Any CPU.ActiveCfg = Release|Any CPU {762F7276-C916-4111-A6C0-41668ABB3823}.Release|Any CPU.Build.0 = Release|Any CPU + {5AF10E85-5076-40B9-84CF-9830B585ABE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5AF10E85-5076-40B9-84CF-9830B585ABE5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5AF10E85-5076-40B9-84CF-9830B585ABE5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5AF10E85-5076-40B9-84CF-9830B585ABE5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -178,6 +186,7 @@ Global {5CEA6F31-A829-4A02-8CD5-EC3DDD4CC1EA} = {59A9B64C-E9BE-409E-89A2-58D72E2918F5} {4BC947ED-13B8-4BE6-82A4-96A48D86980B} = {8437B0F3-3894-4828-A945-A9187F37631D} {762F7276-C916-4111-A6C0-41668ABB3823} = {A5076D28-FA7E-4606-9410-FEDD0D603527} + {5AF10E85-5076-40B9-84CF-9830B585ABE5} = {C6DA6317-30FC-42FE-891C-64E75D88FF12} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4518E9CE-3680-4E05-9259-B64EA7807158} diff --git a/benchmarks/Microsoft.AspNetCore.ResponseCompression.Benchmarks/AssemblyInfo.cs b/benchmarks/Microsoft.AspNetCore.ResponseCompression.Benchmarks/AssemblyInfo.cs new file mode 100644 index 0000000000..409fcf814a --- /dev/null +++ b/benchmarks/Microsoft.AspNetCore.ResponseCompression.Benchmarks/AssemblyInfo.cs @@ -0,0 +1,4 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +[assembly: BenchmarkDotNet.Attributes.AspNetCoreBenchmark] diff --git a/benchmarks/Microsoft.AspNetCore.ResponseCompression.Benchmarks/Microsoft.AspNetCore.ResponseCompression.Benchmarks.csproj b/benchmarks/Microsoft.AspNetCore.ResponseCompression.Benchmarks/Microsoft.AspNetCore.ResponseCompression.Benchmarks.csproj new file mode 100644 index 0000000000..5dbd63c35a --- /dev/null +++ b/benchmarks/Microsoft.AspNetCore.ResponseCompression.Benchmarks/Microsoft.AspNetCore.ResponseCompression.Benchmarks.csproj @@ -0,0 +1,19 @@ + + + + Exe + netcoreapp2.1 + + + + + + + + + + + + + + diff --git a/benchmarks/Microsoft.AspNetCore.ResponseCompression.Benchmarks/ResponseCompressionProviderBenchmark.cs b/benchmarks/Microsoft.AspNetCore.ResponseCompression.Benchmarks/ResponseCompressionProviderBenchmark.cs new file mode 100644 index 0000000000..4e4b78fcb7 --- /dev/null +++ b/benchmarks/Microsoft.AspNetCore.ResponseCompression.Benchmarks/ResponseCompressionProviderBenchmark.cs @@ -0,0 +1,57 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Collections.Generic; +using BenchmarkDotNet.Attributes; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; +using Microsoft.Net.Http.Headers; + +namespace Microsoft.AspNetCore.ResponseCompression.Benchmarks +{ + public class ResponseCompressionProviderBenchmark + { + [GlobalSetup] + public void GlobalSetup() + { + var services = new ServiceCollection() + .AddOptions() + .AddResponseCompression() + .BuildServiceProvider(); + + var options = new ResponseCompressionOptions(); + + Provider = new ResponseCompressionProvider(services, Options.Create(options)); + } + + [ParamsSource(nameof(EncodingStrings))] + public string AcceptEncoding { get; set; } + + public static IEnumerable EncodingStrings() + { + return new[] + { + "gzip;q=0.8, compress;q=0.6, br;q=0.4", + "gzip, compress, br", + "br, compress, gzip", + "gzip, compress", + "identity", + "*" + }; + } + + public ResponseCompressionProvider Provider { get; set; } + + [Benchmark] + public ICompressionProvider GetCompressionProvider() + { + var context = new DefaultHttpContext(); + + context.Request.Headers[HeaderNames.AcceptEncoding] = AcceptEncoding; + + return Provider.GetCompressionProvider(context); + } + } +} \ No newline at end of file diff --git a/build/dependencies.props b/build/dependencies.props index 3ab03afc13..7147597eac 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,7 +3,9 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + 0.10.14 2.2.0-preview1-17099 + 2.2.0-preview1-34640 2.2.0-preview1-34640 2.2.0-preview1-34640 2.2.0-preview1-34640 @@ -15,6 +17,7 @@ 2.2.0-preview1-34640 2.2.0-preview1-34640 2.2.0-preview1-34640 + 2.2.0-preview1-34640 2.2.0-preview1-34640 2.2.0-preview1-34640 2.2.0-preview1-34640 diff --git a/src/Microsoft.AspNetCore.ResponseCompression/BrotliCompressionProvider.cs b/src/Microsoft.AspNetCore.ResponseCompression/BrotliCompressionProvider.cs new file mode 100644 index 0000000000..20a88dd30a --- /dev/null +++ b/src/Microsoft.AspNetCore.ResponseCompression/BrotliCompressionProvider.cs @@ -0,0 +1,51 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.IO; +using System.IO.Compression; +using Microsoft.Extensions.Options; + +namespace Microsoft.AspNetCore.ResponseCompression +{ + /// + /// Brotli compression provider. + /// + public class BrotliCompressionProvider : ICompressionProvider + { + /// + /// Creates a new instance of with options. + /// + /// + public BrotliCompressionProvider(IOptions options) + { + if (options == null) + { + throw new ArgumentNullException(nameof(options)); + } + + Options = options.Value; + } + + private BrotliCompressionProviderOptions Options { get; } + + /// + public string EncodingName => "br"; + + /// + public bool SupportsFlush => true; + + /// + public Stream CreateStream(Stream outputStream) + { +#if NETCOREAPP2_1 + return new BrotliStream(outputStream, Options.Level, leaveOpen: true); +#elif NET461 || NETSTANDARD2_0 + // Brotli is only supported in .NET Core 2.1+ + throw new PlatformNotSupportedException(); +#else +#error Target frameworks need to be updated. +#endif + } + } +} diff --git a/src/Microsoft.AspNetCore.ResponseCompression/BrotliCompressionProviderOptions.cs b/src/Microsoft.AspNetCore.ResponseCompression/BrotliCompressionProviderOptions.cs new file mode 100644 index 0000000000..029f22b854 --- /dev/null +++ b/src/Microsoft.AspNetCore.ResponseCompression/BrotliCompressionProviderOptions.cs @@ -0,0 +1,22 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.IO.Compression; +using Microsoft.Extensions.Options; + +namespace Microsoft.AspNetCore.ResponseCompression +{ + /// + /// Options for the + /// + public class BrotliCompressionProviderOptions : IOptions + { + /// + /// What level of compression to use for the stream. The default is . + /// + public CompressionLevel Level { get; set; } = CompressionLevel.Fastest; + + /// + BrotliCompressionProviderOptions IOptions.Value => this; + } +} diff --git a/src/Microsoft.AspNetCore.ResponseCompression/GzipCompressionProvider.cs b/src/Microsoft.AspNetCore.ResponseCompression/GzipCompressionProvider.cs index e825b37976..474f255111 100644 --- a/src/Microsoft.AspNetCore.ResponseCompression/GzipCompressionProvider.cs +++ b/src/Microsoft.AspNetCore.ResponseCompression/GzipCompressionProvider.cs @@ -39,7 +39,7 @@ namespace Microsoft.AspNetCore.ResponseCompression { #if NET461 return false; -#elif NETSTANDARD2_0 +#elif NETSTANDARD2_0 || NETCOREAPP2_1 return true; #else #error target frameworks need to be updated diff --git a/src/Microsoft.AspNetCore.ResponseCompression/Microsoft.AspNetCore.ResponseCompression.csproj b/src/Microsoft.AspNetCore.ResponseCompression/Microsoft.AspNetCore.ResponseCompression.csproj index e652961322..d39f7db89a 100644 --- a/src/Microsoft.AspNetCore.ResponseCompression/Microsoft.AspNetCore.ResponseCompression.csproj +++ b/src/Microsoft.AspNetCore.ResponseCompression/Microsoft.AspNetCore.ResponseCompression.csproj @@ -2,7 +2,7 @@ ASP.NET Core middleware for HTTP Response compression. - net461;netstandard2.0 + net461;netstandard2.0;netcoreapp2.1 true aspnetcore diff --git a/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionOptions.cs b/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionOptions.cs index c6b33c9737..6ec4fb62b4 100644 --- a/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionOptions.cs +++ b/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionOptions.cs @@ -22,7 +22,8 @@ namespace Microsoft.AspNetCore.ResponseCompression public bool EnableForHttps { get; set; } = false; /// - /// The ICompressionProviders to use for responses. + /// The types to use for responses. + /// Providers are prioritized based on the order they are added. /// public CompressionProviderCollection Providers { get; } = new CompressionProviderCollection(); } diff --git a/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionProvider.cs b/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionProvider.cs index e5f577f00d..3ed2dd058a 100644 --- a/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionProvider.cs +++ b/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionProvider.cs @@ -38,7 +38,17 @@ namespace Microsoft.AspNetCore.ResponseCompression if (_providers.Length == 0) { // Use the factory so it can resolve IOptions from DI. - _providers = new ICompressionProvider[] { new CompressionProviderFactory(typeof(GzipCompressionProvider)) }; + _providers = new ICompressionProvider[] + { +#if NETCOREAPP2_1 + new CompressionProviderFactory(typeof(BrotliCompressionProvider)), +#elif NET461 || NETSTANDARD2_0 + // Brotli is only supported in .NET Core 2.1+ +#else +#error Target frameworks need to be updated. +#endif + new CompressionProviderFactory(typeof(GzipCompressionProvider)), + }; } for (var i = 0; i < _providers.Length; i++) { @@ -62,42 +72,76 @@ namespace Microsoft.AspNetCore.ResponseCompression /// public virtual ICompressionProvider GetCompressionProvider(HttpContext context) { - IList unsorted; - // e.g. Accept-Encoding: gzip, deflate, sdch var accept = context.Request.Headers[HeaderNames.AcceptEncoding]; - if (!StringValues.IsNullOrEmpty(accept) - && StringWithQualityHeaderValue.TryParseList(accept, out unsorted) - && unsorted != null && unsorted.Count > 0) - { - // TODO PERF: clients don't usually include quality values so this sort will not have any effect. Fast-path? - var sorted = unsorted - .Where(s => s.Quality.GetValueOrDefault(1) > 0) - .OrderByDescending(s => s.Quality.GetValueOrDefault(1)); - foreach (var encoding in sorted) + if (StringValues.IsNullOrEmpty(accept)) + { + return null; + } + + if (StringWithQualityHeaderValue.TryParseList(accept, out var encodings)) + { + if (encodings.Count == 0) { - // There will rarely be more than three providers, and there's only one by default - foreach (var provider in _providers) + return null; + } + + var candidates = new HashSet(); + + foreach (var encoding in encodings) + { + var encodingName = encoding.Value; + var quality = encoding.Quality.GetValueOrDefault(1); + + if (quality < double.Epsilon) { - if (StringSegment.Equals(provider.EncodingName, encoding.Value, StringComparison.OrdinalIgnoreCase)) + continue; + } + + for (int i = 0; i < _providers.Length; i++) + { + var provider = _providers[i]; + + if (StringSegment.Equals(provider.EncodingName, encodingName, StringComparison.OrdinalIgnoreCase)) { - return provider; + candidates.Add(new ProviderCandidate(provider.EncodingName, quality, i, provider)); } } // Uncommon but valid options - if (StringSegment.Equals("*", encoding.Value, StringComparison.Ordinal)) + if (StringSegment.Equals("*", encodingName, StringComparison.Ordinal)) { - // Any - return _providers[0]; + for (int i = 0; i < _providers.Length; i++) + { + var provider = _providers[i]; + + // Any provider is a candidate. + candidates.Add(new ProviderCandidate(provider.EncodingName, quality, i, provider)); + } + + break; } - if (StringSegment.Equals("identity", encoding.Value, StringComparison.OrdinalIgnoreCase)) + + if (StringSegment.Equals("identity", encodingName, StringComparison.OrdinalIgnoreCase)) { - // No compression - return null; + // We add 'identity' to the list of "candidates" with a very low priority and no provider. + // This will allow it to be ordered based on its quality (and priority) later in the method. + candidates.Add(new ProviderCandidate(encodingName.Value, quality, priority: int.MaxValue, provider: null)); } } + + if (candidates.Count <= 1) + { + return candidates.ElementAtOrDefault(0).Provider; + } + + var accepted = candidates + .OrderByDescending(x => x.Quality) + .ThenBy(x => x.Priority) + .First(); + + return accepted.Provider; } return null; @@ -139,5 +183,39 @@ namespace Microsoft.AspNetCore.ResponseCompression } return !string.IsNullOrEmpty(context.Request.Headers[HeaderNames.AcceptEncoding]); } + + private readonly struct ProviderCandidate : IEquatable + { + public ProviderCandidate(string encodingName, double quality, int priority, ICompressionProvider provider) + { + EncodingName = encodingName; + Quality = quality; + Priority = priority; + Provider = provider; + } + + public string EncodingName { get; } + + public double Quality { get; } + + public int Priority { get; } + + public ICompressionProvider Provider { get; } + + public bool Equals(ProviderCandidate other) + { + return string.Equals(EncodingName, other.EncodingName, StringComparison.OrdinalIgnoreCase); + } + + public override bool Equals(object obj) + { + return obj is ProviderCandidate candidate && Equals(candidate); + } + + public override int GetHashCode() + { + return StringComparer.OrdinalIgnoreCase.GetHashCode(EncodingName); + } + } } } diff --git a/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs b/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs index 52eb965cf0..5a2a17a53c 100644 --- a/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs +++ b/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.IO; using System.IO.Compression; +using System.Linq; using System.Net.Http; using System.Threading; using System.Threading.Tasks; @@ -23,6 +24,26 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests { private const string TextPlain = "text/plain"; + public static IEnumerable SupportedEncodings => + TestData.Select(x => new object[] { x.EncodingName }); + + public static IEnumerable SupportedEncodingsWithBodyLength => + TestData.Select(x => new object[] { x.EncodingName, x.ExpectedBodyLength }); + + private static IEnumerable TestData + { + get + { + yield return new EncodingTestData("gzip", expectedBodyLength: 24); +#if NETCOREAPP2_2 + yield return new EncodingTestData("br", expectedBodyLength: 20); +#elif NET461 +#else +#error Target frameworks need to be updated. +#endif + } + } + [Fact] public void Options_HttpsDisabledByDefault() { @@ -42,15 +63,66 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests [Fact] public async Task Request_AcceptGzipDeflate_CompressedGzip() { - var response = await InvokeMiddleware(100, requestAcceptEncodings: new string[] { "gzip", "deflate" }, responseType: TextPlain); + var response = await InvokeMiddleware(100, requestAcceptEncodings: new[] { "gzip", "deflate" }, responseType: TextPlain); - CheckResponseCompressed(response, expectedBodyLength: 24); + CheckResponseCompressed(response, expectedBodyLength: 24, expectedEncoding: "gzip"); } + [Fact] + public async Task Request_AcceptBrotli_CompressedBrotli() + { + var response = await InvokeMiddleware(100, requestAcceptEncodings: new[] { "br" }, responseType: TextPlain); + +#if NET461 + CheckResponseNotCompressed(response, expectedBodyLength: 100, sendVaryHeader: true); +#elif NETCOREAPP2_2 + CheckResponseCompressed(response, expectedBodyLength: 20, expectedEncoding: "br"); +#else +#error Target frameworks need to be updated. +#endif + } + + [Theory] + [InlineData("gzip", "br")] + [InlineData("br", "gzip")] + public async Task Request_AcceptMixed_CompressedBrotli(string encoding1, string encoding2) + { + var response = await InvokeMiddleware(100, new[] { encoding1, encoding2 }, responseType: TextPlain); + +#if NET461 + CheckResponseCompressed(response, expectedBodyLength: 24, expectedEncoding: "gzip"); +#elif NETCOREAPP2_2 + CheckResponseCompressed(response, expectedBodyLength: 20, expectedEncoding: "br"); +#else +#error Target frameworks need to be updated. +#endif + } + +#if NETCOREAPP2_2 + [Theory] + [InlineData("gzip", "br")] + [InlineData("br", "gzip")] + public async Task Request_AcceptMixed_ConfiguredOrder_CompressedGzip(string encoding1, string encoding2) + { + void Configure(ResponseCompressionOptions options) + { + options.Providers.Add(); + options.Providers.Add(); + } + + var response = await InvokeMiddleware(100, new[] { encoding1, encoding2 }, responseType: TextPlain, configure: Configure); + + CheckResponseCompressed(response, expectedBodyLength: 24, expectedEncoding: "gzip"); + } +#elif NET461 +#else +#error Target frameworks need to be updated. +#endif + [Fact] public async Task Request_AcceptUnknown_NotCompressed() { - var response = await InvokeMiddleware(100, requestAcceptEncodings: new string[] { "unknown" }, responseType: TextPlain); + var response = await InvokeMiddleware(100, requestAcceptEncodings: new[] { "unknown" }, responseType: TextPlain); CheckResponseNotCompressed(response, expectedBodyLength: 100, sendVaryHeader: true); } @@ -86,7 +158,7 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests var response = await client.SendAsync(request); - CheckResponseCompressed(response, expectedBodyLength: 24); + CheckResponseCompressed(response, expectedBodyLength: 24, expectedEncoding: "gzip"); } [Fact] @@ -117,7 +189,7 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests var response = await client.SendAsync(request); - CheckResponseCompressed(response, expectedBodyLength: 123); + CheckResponseCompressed(response, expectedBodyLength: 123, expectedEncoding: "gzip"); } [Theory] @@ -191,32 +263,38 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests [Fact] public async Task Request_AcceptStar_Compressed() { - var response = await InvokeMiddleware(100, requestAcceptEncodings: new string[] { "*" }, responseType: TextPlain); + var response = await InvokeMiddleware(100, requestAcceptEncodings: new[] { "*" }, responseType: TextPlain); - CheckResponseCompressed(response, expectedBodyLength: 24); +#if NET461 + CheckResponseCompressed(response, expectedBodyLength: 24, expectedEncoding: "gzip"); +#elif NETCOREAPP2_2 + CheckResponseCompressed(response, expectedBodyLength: 20, expectedEncoding: "br"); +#else +#error Target frameworks need to be updated. +#endif } [Fact] public async Task Request_AcceptIdentity_NotCompressed() { - var response = await InvokeMiddleware(100, requestAcceptEncodings: new string[] { "identity" }, responseType: TextPlain); + var response = await InvokeMiddleware(100, requestAcceptEncodings: new[] { "identity" }, responseType: TextPlain); CheckResponseNotCompressed(response, expectedBodyLength: 100, sendVaryHeader: true); } [Theory] - [InlineData(new string[] { "identity;q=0.5", "gzip;q=1" }, 24)] - [InlineData(new string[] { "identity;q=0", "gzip;q=0.8" }, 24)] - [InlineData(new string[] { "identity;q=0.5", "gzip" }, 24)] + [InlineData(new[] { "identity;q=0.5", "gzip;q=1" }, 24)] + [InlineData(new[] { "identity;q=0", "gzip;q=0.8" }, 24)] + [InlineData(new[] { "identity;q=0.5", "gzip" }, 24)] public async Task Request_AcceptWithHigherCompressionQuality_Compressed(string[] acceptEncodings, int expectedBodyLength) { var response = await InvokeMiddleware(100, requestAcceptEncodings: acceptEncodings, responseType: TextPlain); - CheckResponseCompressed(response, expectedBodyLength: expectedBodyLength); + CheckResponseCompressed(response, expectedBodyLength: expectedBodyLength, expectedEncoding: "gzip"); } [Theory] - [InlineData(new string[] { "gzip;q=0.5", "identity;q=0.8" }, 100)] + [InlineData(new[] { "gzip;q=0.5", "identity;q=0.8" }, 100)] public async Task Request_AcceptWithhigherIdentityQuality_NotCompressed(string[] acceptEncodings, int expectedBodyLength) { var response = await InvokeMiddleware(100, requestAcceptEncodings: acceptEncodings, responseType: TextPlain); @@ -227,7 +305,7 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests [Fact] public async Task Response_UnknownMimeType_NotCompressed() { - var response = await InvokeMiddleware(100, requestAcceptEncodings: new string[] { "gzip" }, responseType: "text/custom"); + var response = await InvokeMiddleware(100, requestAcceptEncodings: new[] { "gzip" }, responseType: "text/custom"); CheckResponseNotCompressed(response, expectedBodyLength: 100, sendVaryHeader: false); } @@ -235,7 +313,7 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests [Fact] public async Task Response_WithContentRange_NotCompressed() { - var response = await InvokeMiddleware(50, requestAcceptEncodings: new string[] { "gzip" }, responseType: TextPlain, addResponseAction: (r) => + var response = await InvokeMiddleware(50, requestAcceptEncodings: new[] { "gzip" }, responseType: TextPlain, addResponseAction: (r) => { r.Headers[HeaderNames.ContentRange] = "1-2/*"; }); @@ -248,7 +326,7 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests { var otherContentEncoding = "something"; - var response = await InvokeMiddleware(50, requestAcceptEncodings: new string[] { "gzip" }, responseType: TextPlain, addResponseAction: (r) => + var response = await InvokeMiddleware(50, requestAcceptEncodings: new[] { "gzip" }, responseType: TextPlain, addResponseAction: (r) => { r.Headers[HeaderNames.ContentEncoding] = otherContentEncoding; }); @@ -282,8 +360,11 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests }); }); - var server = new TestServer(builder); - server.BaseAddress = new Uri("https://localhost/"); + var server = new TestServer(builder) + { + BaseAddress = new Uri("https://localhost/") + }; + var client = server.CreateClient(); var request = new HttpRequestMessage(HttpMethod.Get, ""); @@ -294,8 +375,9 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests Assert.Equal(expectedLength, response.Content.ReadAsByteArrayAsync().Result.Length); } - [Fact] - public async Task FlushHeaders_SendsHeaders_Compresses() + [Theory] + [MemberData(nameof(SupportedEncodingsWithBodyLength))] + public async Task FlushHeaders_SendsHeaders_Compresses(string encoding, int expectedBodyLength) { var responseReceived = new ManualResetEvent(false); @@ -321,18 +403,19 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests var client = server.CreateClient(); var request = new HttpRequestMessage(HttpMethod.Get, ""); - request.Headers.AcceptEncoding.ParseAdd("gzip"); + request.Headers.AcceptEncoding.ParseAdd(encoding); var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); responseReceived.Set(); await response.Content.LoadIntoBufferAsync(); - CheckResponseCompressed(response, expectedBodyLength: 24); + CheckResponseCompressed(response, expectedBodyLength, encoding); } - [Fact] - public async Task FlushAsyncHeaders_SendsHeaders_Compresses() + [Theory] + [MemberData(nameof(SupportedEncodingsWithBodyLength))] + public async Task FlushAsyncHeaders_SendsHeaders_Compresses(string encoding, int expectedBodyLength) { var responseReceived = new ManualResetEvent(false); @@ -358,18 +441,19 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests var client = server.CreateClient(); var request = new HttpRequestMessage(HttpMethod.Get, ""); - request.Headers.AcceptEncoding.ParseAdd("gzip"); + request.Headers.AcceptEncoding.ParseAdd(encoding); var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); responseReceived.Set(); await response.Content.LoadIntoBufferAsync(); - CheckResponseCompressed(response, expectedBodyLength: 24); + CheckResponseCompressed(response, expectedBodyLength, encoding); } - [Fact] - public async Task FlushBody_CompressesAndFlushes() + [Theory] + [MemberData(nameof(SupportedEncodings))] + public async Task FlushBody_CompressesAndFlushes(string encoding) { var responseReceived = new ManualResetEvent(false); @@ -397,13 +481,12 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests var client = server.CreateClient(); var request = new HttpRequestMessage(HttpMethod.Get, ""); - request.Headers.AcceptEncoding.ParseAdd("gzip"); + request.Headers.AcceptEncoding.ParseAdd(encoding); var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); - IEnumerable contentMD5 = null; - Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5)); - Assert.Single(response.Content.Headers.ContentEncoding, "gzip"); + Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out _)); + Assert.Single(response.Content.Headers.ContentEncoding, encoding); var body = await response.Content.ReadAsStreamAsync(); var read = await body.ReadAsync(new byte[100], 0, 100); @@ -415,8 +498,9 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests Assert.True(read > 0); } - [Fact] - public async Task FlushAsyncBody_CompressesAndFlushes() + [Theory] + [MemberData(nameof(SupportedEncodings))] + public async Task FlushAsyncBody_CompressesAndFlushes(string encoding) { var responseReceived = new ManualResetEvent(false); @@ -443,13 +527,12 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests var client = server.CreateClient(); var request = new HttpRequestMessage(HttpMethod.Get, ""); - request.Headers.AcceptEncoding.ParseAdd("gzip"); + request.Headers.AcceptEncoding.ParseAdd(encoding); var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); - IEnumerable contentMD5 = null; - Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5)); - Assert.Single(response.Content.Headers.ContentEncoding, "gzip"); + Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out _)); + Assert.Single(response.Content.Headers.ContentEncoding, encoding); var body = await response.Content.ReadAsStreamAsync(); var read = await body.ReadAsync(new byte[100], 0, 100); @@ -461,8 +544,9 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests Assert.True(read > 0); } - [Fact] - public async Task TrickleWriteAndFlush_FlushesEachWrite() + [Theory] + [MemberData(nameof(SupportedEncodings))] + public async Task TrickleWriteAndFlush_FlushesEachWrite(string encoding) { var responseReceived = new[] { @@ -501,7 +585,7 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests var client = server.CreateClient(); var request = new HttpRequestMessage(HttpMethod.Get, ""); - request.Headers.AcceptEncoding.ParseAdd("gzip"); + request.Headers.AcceptEncoding.ParseAdd(encoding); var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); @@ -509,9 +593,8 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests Assert.NotNull(response.Content.Headers.GetValues(HeaderNames.ContentMD5)); Assert.Empty(response.Content.Headers.ContentEncoding); #elif NETCOREAPP2_2 // Flush supported, compression enabled - IEnumerable contentMD5 = null; - Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5)); - Assert.Single(response.Content.Headers.ContentEncoding, "gzip"); + Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out _)); + Assert.Single(response.Content.Headers.ContentEncoding, encoding); #else #error Target frameworks need to be updated. #endif @@ -527,8 +610,9 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests } } - [Fact] - public async Task TrickleWriteAndFlushAsync_FlushesEachWrite() + [Theory] + [MemberData(nameof(SupportedEncodings))] + public async Task TrickleWriteAndFlushAsync_FlushesEachWrite(string encoding) { var responseReceived = new[] { @@ -566,7 +650,7 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests var client = server.CreateClient(); var request = new HttpRequestMessage(HttpMethod.Get, ""); - request.Headers.AcceptEncoding.ParseAdd("gzip"); + request.Headers.AcceptEncoding.ParseAdd(encoding); var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); @@ -574,9 +658,8 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests Assert.NotNull(response.Content.Headers.GetValues(HeaderNames.ContentMD5)); Assert.Empty(response.Content.Headers.ContentEncoding); #elif NETCOREAPP2_2 // Flush supported, compression enabled - IEnumerable contentMD5 = null; - Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5)); - Assert.Single(response.Content.Headers.ContentEncoding, "gzip"); + Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out _)); + Assert.Single(response.Content.Headers.ContentEncoding, encoding); #else #error Target framework needs to be updated #endif @@ -705,7 +788,7 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests var response = await client.SendAsync(request); - CheckResponseCompressed(response, expectedBodyLength: 34); + CheckResponseCompressed(response, expectedBodyLength: 34, expectedEncoding: "gzip"); Assert.False(fakeSendFile.Invoked); } @@ -749,17 +832,22 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests var response = await client.SendAsync(request); - CheckResponseCompressed(response, expectedBodyLength: 40); + CheckResponseCompressed(response, expectedBodyLength: 40, expectedEncoding: "gzip"); Assert.False(fakeSendFile.Invoked); } - private Task InvokeMiddleware(int uncompressedBodyLength, string[] requestAcceptEncodings, string responseType, Action addResponseAction = null) + private Task InvokeMiddleware( + int uncompressedBodyLength, + string[] requestAcceptEncodings, + string responseType, + Action addResponseAction = null, + Action configure = null) { var builder = new WebHostBuilder() .ConfigureServices(services => { - services.AddResponseCompression(); + services.AddResponseCompression(configure ?? (_ => { })); }) .Configure(app => { @@ -769,10 +857,7 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests context.Response.Headers[HeaderNames.ContentMD5] = "MD5"; context.Response.ContentType = responseType; Assert.Null(context.Features.Get()); - if (addResponseAction != null) - { - addResponseAction(context.Response); - } + addResponseAction?.Invoke(context.Response); return context.Response.WriteAsync(new string('a', uncompressedBodyLength)); }); }); @@ -789,10 +874,8 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests return client.SendAsync(request); } - private void CheckResponseCompressed(HttpResponseMessage response, int expectedBodyLength) + private void CheckResponseCompressed(HttpResponseMessage response, int expectedBodyLength, string expectedEncoding) { - IEnumerable contentMD5 = null; - var containsVaryAcceptEncoding = false; foreach (var value in response.Headers.GetValues(HeaderNames.Vary)) { @@ -803,8 +886,8 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests } } Assert.True(containsVaryAcceptEncoding); - Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5)); - Assert.Single(response.Content.Headers.ContentEncoding, "gzip"); + Assert.False(response.Content.Headers.TryGetValues(HeaderNames.ContentMD5, out _)); + Assert.Single(response.Content.Headers.ContentEncoding, expectedEncoding); Assert.Equal(expectedBodyLength, response.Content.Headers.ContentLength); } @@ -858,5 +941,18 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests } } } + + private readonly struct EncodingTestData + { + public EncodingTestData(string encodingName, int expectedBodyLength) + { + EncodingName = encodingName; + ExpectedBodyLength = expectedBodyLength; + } + + public string EncodingName { get; } + + public int ExpectedBodyLength { get; } + } } } From 8e45212a893073cbe94ce460f2d79be359bfaef6 Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Wed, 11 Jul 2018 14:26:46 -0700 Subject: [PATCH 22/45] Reference netcoreapp 2.1 (#349) --- Directory.Build.targets | 1 + build/dependencies.props | 1 + 2 files changed, 2 insertions(+) diff --git a/Directory.Build.targets b/Directory.Build.targets index 2991ae3052..73b97f2807 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,5 +1,6 @@ + $(MicrosoftNETCoreApp21PackageVersion) $(MicrosoftNETCoreApp22PackageVersion) $(NETStandardLibrary20PackageVersion) diff --git a/build/dependencies.props b/build/dependencies.props index 7147597eac..09a1f95499 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -24,6 +24,7 @@ 2.2.0-preview1-34640 2.2.0-preview1-34640 2.2.0-preview1-34640 + 2.1.2 2.2.0-preview1-26618-02 2.2.0-preview1-34640 15.6.1 From 4c8f87c30a0596d76f3a92f6719131968af98ba2 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 15 Jul 2018 12:06:51 -0700 Subject: [PATCH 23/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 44 ++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 09a1f95499..703ac11702 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,34 +3,34 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 0.10.14 + 0.10.13 2.2.0-preview1-17099 - 2.2.0-preview1-34640 - 2.2.0-preview1-34640 - 2.2.0-preview1-34640 - 2.2.0-preview1-34640 - 2.2.0-preview1-34640 - 2.2.0-preview1-34640 - 2.2.0-preview1-34640 - 2.2.0-preview1-34640 - 2.2.0-preview1-34640 - 2.2.0-preview1-34640 - 2.2.0-preview1-34640 - 2.2.0-preview1-34640 - 2.2.0-preview1-34640 - 2.2.0-preview1-34640 - 2.2.0-preview1-34640 - 2.2.0-preview1-34640 - 2.2.0-preview1-34640 - 2.2.0-preview1-34640 - 2.2.0-preview1-34640 + 2.2.0-preview1-34694 + 2.2.0-preview1-34694 + 2.2.0-preview1-34694 + 2.2.0-preview1-34694 + 2.2.0-preview1-34694 + 2.2.0-preview1-34694 + 2.2.0-preview1-34694 + 2.2.0-preview1-34694 + 2.2.0-preview1-34694 + 2.2.0-preview1-34694 + 2.2.0-preview1-34694 + 2.2.0-preview1-34694 + 2.2.0-preview1-34694 + 2.2.0-preview1-34694 + 2.2.0-preview1-34694 + 2.2.0-preview1-34694 + 2.2.0-preview1-34694 + 2.2.0-preview1-34694 + 2.2.0-preview1-34694 2.1.2 2.2.0-preview1-26618-02 - 2.2.0-preview1-34640 + 2.2.0-preview1-34694 15.6.1 4.7.49 2.0.3 - 0.8.0 + 0.9.0 2.3.1 2.4.0-rc.1.build4038 From 1cd7ed510c7313fb630b8784120e707019809e22 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 22 Jul 2018 12:06:58 -0700 Subject: [PATCH 24/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 703ac11702..8dab50cdc5 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -5,28 +5,28 @@ 0.10.13 2.2.0-preview1-17099 - 2.2.0-preview1-34694 - 2.2.0-preview1-34694 - 2.2.0-preview1-34694 - 2.2.0-preview1-34694 - 2.2.0-preview1-34694 - 2.2.0-preview1-34694 - 2.2.0-preview1-34694 - 2.2.0-preview1-34694 - 2.2.0-preview1-34694 - 2.2.0-preview1-34694 - 2.2.0-preview1-34694 - 2.2.0-preview1-34694 - 2.2.0-preview1-34694 - 2.2.0-preview1-34694 - 2.2.0-preview1-34694 - 2.2.0-preview1-34694 - 2.2.0-preview1-34694 - 2.2.0-preview1-34694 - 2.2.0-preview1-34694 + 2.2.0-preview1-34755 + 2.2.0-preview1-34755 + 2.2.0-preview1-34755 + 2.2.0-preview1-34755 + 2.2.0-preview1-34755 + 2.2.0-preview1-34755 + 2.2.0-preview1-34755 + 2.2.0-preview1-34755 + 2.2.0-preview1-34755 + 2.2.0-preview1-34755 + 2.2.0-preview1-34755 + 2.2.0-preview1-34755 + 2.2.0-preview1-34755 + 2.2.0-preview1-34755 + 2.2.0-preview1-34755 + 2.2.0-preview1-34755 + 2.2.0-preview1-34755 + 2.2.0-preview1-34755 + 2.2.0-preview1-34755 2.1.2 2.2.0-preview1-26618-02 - 2.2.0-preview1-34694 + 2.2.0-preview1-34755 15.6.1 4.7.49 2.0.3 From d2b2535ca8940eccb9a05d49992ce7072a8f4fde Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 29 Jul 2018 12:06:40 -0700 Subject: [PATCH 25/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 47 ++++++++++++++++++++-------------------- korebuild-lock.txt | 4 ++-- 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 8dab50cdc5..e7e3ff0c49 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,35 +4,36 @@ 0.10.13 - 2.2.0-preview1-17099 - 2.2.0-preview1-34755 - 2.2.0-preview1-34755 - 2.2.0-preview1-34755 - 2.2.0-preview1-34755 - 2.2.0-preview1-34755 - 2.2.0-preview1-34755 - 2.2.0-preview1-34755 - 2.2.0-preview1-34755 - 2.2.0-preview1-34755 - 2.2.0-preview1-34755 - 2.2.0-preview1-34755 - 2.2.0-preview1-34755 - 2.2.0-preview1-34755 - 2.2.0-preview1-34755 - 2.2.0-preview1-34755 - 2.2.0-preview1-34755 - 2.2.0-preview1-34755 - 2.2.0-preview1-34755 - 2.2.0-preview1-34755 + 2.2.0-preview1-17102 + 2.2.0-preview1-34823 + 2.2.0-preview1-34823 + 2.2.0-preview1-34823 + 2.2.0-preview1-34823 + 2.2.0-preview1-34823 + 2.2.0-preview1-34823 + 2.2.0-preview1-34823 + 2.2.0-preview1-34823 + 2.2.0-preview1-34823 + 2.2.0-preview1-34823 + 2.2.0-preview1-34823 + 2.2.0-preview1-34823 + 2.2.0-preview1-34823 + 2.2.0-preview1-34823 + 2.2.0-preview1-34823 + 2.2.0-preview1-34823 + 2.2.0-preview1-34823 + 2.2.0-preview1-34823 + 2.2.0-preview1-34823 2.1.2 2.2.0-preview1-26618-02 - 2.2.0-preview1-34755 + 2.2.0-preview1-34823 15.6.1 4.7.49 2.0.3 - 0.9.0 + 0.10.0 2.3.1 - 2.4.0-rc.1.build4038 + 2.4.0 + diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 27e2e80f9a..6b8da29e6b 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-17099 -commithash:263ed1db9866b6b419b1f5d5189a712aa218acb3 +version:2.2.0-preview1-17102 +commithash:e7e2b5a97ca92cfc6acc4def534cb0901a6d1eb9 From 878a57fa566f9729fdd6e5e8d61ebe874e6a6a7f Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 5 Aug 2018 19:08:08 +0000 Subject: [PATCH 26/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 42 ++++++++++++++++++++-------------------- korebuild-lock.txt | 4 ++-- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index e7e3ff0c49..a286154933 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,29 +4,29 @@ 0.10.13 - 2.2.0-preview1-17102 - 2.2.0-preview1-34823 - 2.2.0-preview1-34823 - 2.2.0-preview1-34823 - 2.2.0-preview1-34823 - 2.2.0-preview1-34823 - 2.2.0-preview1-34823 - 2.2.0-preview1-34823 - 2.2.0-preview1-34823 - 2.2.0-preview1-34823 - 2.2.0-preview1-34823 - 2.2.0-preview1-34823 - 2.2.0-preview1-34823 - 2.2.0-preview1-34823 - 2.2.0-preview1-34823 - 2.2.0-preview1-34823 - 2.2.0-preview1-34823 - 2.2.0-preview1-34823 - 2.2.0-preview1-34823 - 2.2.0-preview1-34823 + 2.2.0-preview1-20180731.1 + 2.2.0-preview1-34882 + 2.2.0-preview1-34882 + 2.2.0-preview1-34882 + 2.2.0-preview1-34882 + 2.2.0-preview1-34882 + 2.2.0-preview1-34882 + 2.2.0-preview1-34882 + 2.2.0-preview1-34882 + 2.2.0-preview1-34882 + 2.2.0-preview1-34882 + 2.2.0-preview1-34882 + 2.2.0-preview1-34882 + 2.2.0-preview1-34882 + 2.2.0-preview1-34882 + 2.2.0-preview1-34882 + 2.2.0-preview1-34882 + 2.2.0-preview1-34882 + 2.2.0-preview1-34882 + 2.2.0-preview1-34882 2.1.2 2.2.0-preview1-26618-02 - 2.2.0-preview1-34823 + 2.2.0-preview1-34882 15.6.1 4.7.49 2.0.3 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 6b8da29e6b..c7af2292c7 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-17102 -commithash:e7e2b5a97ca92cfc6acc4def534cb0901a6d1eb9 +version:2.2.0-preview1-20180731.1 +commithash:29fde58465439f4bb9df40830635ed758e063daf From 30bf35659617c2f5dbfea3103bee323f3036e2db Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Mon, 6 Aug 2018 20:30:49 +0000 Subject: [PATCH 27/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index a286154933..1f42358664 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -5,28 +5,28 @@ 0.10.13 2.2.0-preview1-20180731.1 - 2.2.0-preview1-34882 - 2.2.0-preview1-34882 - 2.2.0-preview1-34882 - 2.2.0-preview1-34882 - 2.2.0-preview1-34882 - 2.2.0-preview1-34882 - 2.2.0-preview1-34882 - 2.2.0-preview1-34882 - 2.2.0-preview1-34882 - 2.2.0-preview1-34882 - 2.2.0-preview1-34882 - 2.2.0-preview1-34882 - 2.2.0-preview1-34882 - 2.2.0-preview1-34882 - 2.2.0-preview1-34882 - 2.2.0-preview1-34882 - 2.2.0-preview1-34882 - 2.2.0-preview1-34882 - 2.2.0-preview1-34882 + 2.2.0-preview1-34896 + 2.2.0-preview1-34896 + 2.2.0-preview1-34896 + 2.2.0-preview1-34896 + 2.2.0-preview1-34896 + 2.2.0-preview1-34896 + 2.2.0-preview1-34896 + 2.2.0-preview1-34896 + 2.2.0-preview1-34896 + 2.2.0-preview1-34896 + 2.2.0-preview1-34896 + 2.2.0-preview1-34896 + 2.2.0-preview1-34896 + 2.2.0-preview1-34896 + 2.2.0-preview1-34896 + 2.2.0-preview1-34896 + 2.2.0-preview1-34896 + 2.2.0-preview1-34896 + 2.2.0-preview1-34896 2.1.2 2.2.0-preview1-26618-02 - 2.2.0-preview1-34882 + 2.2.0-preview1-34896 15.6.1 4.7.49 2.0.3 From 9500726ab2f7008a8ebba16a76491c5174cef5b5 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 12 Aug 2018 19:07:05 +0000 Subject: [PATCH 28/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 42 ++++++++++++++++++++-------------------- korebuild-lock.txt | 4 ++-- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 1f42358664..d015879597 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,29 +4,29 @@ 0.10.13 - 2.2.0-preview1-20180731.1 - 2.2.0-preview1-34896 - 2.2.0-preview1-34896 - 2.2.0-preview1-34896 - 2.2.0-preview1-34896 - 2.2.0-preview1-34896 - 2.2.0-preview1-34896 - 2.2.0-preview1-34896 - 2.2.0-preview1-34896 - 2.2.0-preview1-34896 - 2.2.0-preview1-34896 - 2.2.0-preview1-34896 - 2.2.0-preview1-34896 - 2.2.0-preview1-34896 - 2.2.0-preview1-34896 - 2.2.0-preview1-34896 - 2.2.0-preview1-34896 - 2.2.0-preview1-34896 - 2.2.0-preview1-34896 - 2.2.0-preview1-34896 + 2.2.0-preview1-20180807.2 + 2.2.0-preview1-34967 + 2.2.0-preview1-34967 + 2.2.0-preview1-34967 + 2.2.0-preview1-34967 + 2.2.0-preview1-34967 + 2.2.0-preview1-34967 + 2.2.0-preview1-34967 + 2.2.0-preview1-34967 + 2.2.0-preview1-34967 + 2.2.0-preview1-34967 + 2.2.0-preview1-34967 + 2.2.0-preview1-34967 + 2.2.0-preview1-34967 + 2.2.0-preview1-34967 + 2.2.0-preview1-34967 + 2.2.0-preview1-34967 + 2.2.0-preview1-34967 + 2.2.0-preview1-34967 + 2.2.0-preview1-34967 2.1.2 2.2.0-preview1-26618-02 - 2.2.0-preview1-34896 + 2.2.0-preview1-34967 15.6.1 4.7.49 2.0.3 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index c7af2292c7..3fbcc80189 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-20180731.1 -commithash:29fde58465439f4bb9df40830635ed758e063daf +version:2.2.0-preview1-20180807.2 +commithash:11495dbd236104434e08cb1152fcb58cf2a20923 From 7f143446a058b8a377f118e100654945130b62cf Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Tue, 21 Aug 2018 13:33:48 -0700 Subject: [PATCH 29/45] Update package branding for 2.2.0-preview2 --- build/dependencies.props | 2 +- version.props | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index d015879597..c96792579e 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -34,6 +34,6 @@ 2.3.1 2.4.0 - + diff --git a/version.props b/version.props index 8e872d018e..f77be62107 100644 --- a/version.props +++ b/version.props @@ -1,7 +1,7 @@ 2.2.0 - preview1 + preview2 $(VersionPrefix) $(VersionPrefix)-$(VersionSuffix)-final t000 @@ -10,7 +10,7 @@ $(VersionSuffix)-$(BuildNumber) 0.5.0 - preview1 + preview2 $(ExperimentalVersionPrefix) $(ExperimentalVersionPrefix)-$(ExperimentalVersionSuffix)-final $(ExperimentalVersionSuffix)-$(BuildNumber) From 2aea3298ae2604656df4d8a55a5503a82fc816c0 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 2 Sep 2018 12:06:41 -0700 Subject: [PATCH 30/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 42 ++++++++++++++++++++-------------------- korebuild-lock.txt | 4 ++-- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index c96792579e..bac8b15b76 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,29 +4,29 @@ 0.10.13 - 2.2.0-preview1-20180807.2 - 2.2.0-preview1-34967 - 2.2.0-preview1-34967 - 2.2.0-preview1-34967 - 2.2.0-preview1-34967 - 2.2.0-preview1-34967 - 2.2.0-preview1-34967 - 2.2.0-preview1-34967 - 2.2.0-preview1-34967 - 2.2.0-preview1-34967 - 2.2.0-preview1-34967 - 2.2.0-preview1-34967 - 2.2.0-preview1-34967 - 2.2.0-preview1-34967 - 2.2.0-preview1-34967 - 2.2.0-preview1-34967 - 2.2.0-preview1-34967 - 2.2.0-preview1-34967 - 2.2.0-preview1-34967 - 2.2.0-preview1-34967 + 2.2.0-preview1-20180821.1 + 2.2.0-preview2-35143 + 2.2.0-preview2-35143 + 2.2.0-preview2-35143 + 2.2.0-preview2-35143 + 2.2.0-preview2-35143 + 2.2.0-preview2-35143 + 2.2.0-preview2-35143 + 2.2.0-preview2-35143 + 2.2.0-preview2-35143 + 2.2.0-preview2-35143 + 2.2.0-preview2-35143 + 2.2.0-preview2-35143 + 2.2.0-preview2-35143 + 2.2.0-preview2-35143 + 2.2.0-preview2-35143 + 2.2.0-preview2-35143 + 2.2.0-preview2-35143 + 2.2.0-preview2-35143 + 2.2.0-preview2-35143 2.1.2 2.2.0-preview1-26618-02 - 2.2.0-preview1-34967 + 2.2.0-preview2-35143 15.6.1 4.7.49 2.0.3 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 3fbcc80189..ad704918df 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-20180807.2 -commithash:11495dbd236104434e08cb1152fcb58cf2a20923 +version:2.2.0-preview1-20180821.1 +commithash:c8d0cc52cd1abb697be24e288ffd54f8fae8bf17 From b0d334af1c1aadab3cbebc5208f64622da5e85f0 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Wed, 5 Sep 2018 16:33:17 -0700 Subject: [PATCH 31/45] Update branding to 2.2.0-preview3 --- version.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.props b/version.props index f77be62107..761c13440a 100644 --- a/version.props +++ b/version.props @@ -1,7 +1,7 @@ 2.2.0 - preview2 + preview3 $(VersionPrefix) $(VersionPrefix)-$(VersionSuffix)-final t000 @@ -10,7 +10,7 @@ $(VersionSuffix)-$(BuildNumber) 0.5.0 - preview2 + preview3 $(ExperimentalVersionPrefix) $(ExperimentalVersionPrefix)-$(ExperimentalVersionSuffix)-final $(ExperimentalVersionSuffix)-$(BuildNumber) From d36dcca7134541e610d2ddaf2083a5495ffc0920 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 7 Sep 2018 17:02:31 -0400 Subject: [PATCH 32/45] Handle IPv4ToIPv6 Mapped Addresses when checking known proxies/networks (#359) * Un-Map IPv4-to-IPv6-Mapped ips before comparing to known proxies/networks. Addresses #358 * Checking both mapped and unmapped versions of IPv4toIPv6 ips. Addresses #358 * Confirm IPv4toIPv6 mapping/unmapping. Addresses #358 --- .../ForwardedHeadersMiddleware.cs | 8 ++++ .../ForwardedHeadersMiddlewareTest.cs | 43 +++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/src/Microsoft.AspNetCore.HttpOverrides/ForwardedHeadersMiddleware.cs b/src/Microsoft.AspNetCore.HttpOverrides/ForwardedHeadersMiddleware.cs index decda81d58..e6eeaa5e98 100644 --- a/src/Microsoft.AspNetCore.HttpOverrides/ForwardedHeadersMiddleware.cs +++ b/src/Microsoft.AspNetCore.HttpOverrides/ForwardedHeadersMiddleware.cs @@ -349,6 +349,14 @@ namespace Microsoft.AspNetCore.HttpOverrides private bool CheckKnownAddress(IPAddress address) { + if (address.IsIPv4MappedToIPv6) + { + var ipv4Address = address.MapToIPv4(); + if (CheckKnownAddress(ipv4Address)) + { + return true; + } + } if (_options.KnownProxies.Contains(address)) { return true; diff --git a/test/Microsoft.AspNetCore.HttpOverrides.Tests/ForwardedHeadersMiddlewareTest.cs b/test/Microsoft.AspNetCore.HttpOverrides.Tests/ForwardedHeadersMiddlewareTest.cs index f88243c9e7..5f18bf4574 100644 --- a/test/Microsoft.AspNetCore.HttpOverrides.Tests/ForwardedHeadersMiddlewareTest.cs +++ b/test/Microsoft.AspNetCore.HttpOverrides.Tests/ForwardedHeadersMiddlewareTest.cs @@ -822,5 +822,48 @@ namespace Microsoft.AspNetCore.HttpOverrides Assert.Equal("localhost", context.Request.Host.ToString()); Assert.Equal("Protocol", context.Request.Scheme); } + + [Theory] + [InlineData("22.33.44.55,::ffff:127.0.0.1", "", "", "22.33.44.55")] + [InlineData("22.33.44.55,::ffff:172.123.142.121", "172.123.142.121", "", "22.33.44.55")] + [InlineData("22.33.44.55,::ffff:172.123.142.121", "::ffff:172.123.142.121", "", "22.33.44.55")] + [InlineData("22.33.44.55,::ffff:172.123.142.121,172.32.24.23", "", "172.0.0.0/8", "22.33.44.55")] + [InlineData("2a00:1450:4009:802::200e,2a02:26f0:2d:183::356e,::ffff:172.123.142.121,172.32.24.23", "", "172.0.0.0/8,2a02:26f0:2d:183::1/64", "2a00:1450:4009:802::200e")] + [InlineData("22.33.44.55,2a02:26f0:2d:183::356e,::ffff:127.0.0.1", "2a02:26f0:2d:183::356e", "", "22.33.44.55")] + public async Task XForwardForIPv4ToIPv6Mapping(string forHeader, string knownProxies, string knownNetworks, string expectedRemoteIp) + { + var options = new ForwardedHeadersOptions + { + ForwardedHeaders = ForwardedHeaders.XForwardedFor, + ForwardLimit = null, + }; + + foreach (var knownProxy in knownProxies.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries)) + { + var proxy = IPAddress.Parse(knownProxy); + options.KnownProxies.Add(proxy); + } + foreach (var knownNetwork in knownNetworks.Split(new string[] { "," }, options:StringSplitOptions.RemoveEmptyEntries)) + { + var knownNetworkParts = knownNetwork.Split('/'); + var networkIp = IPAddress.Parse(knownNetworkParts[0]); + var prefixLength = int.Parse(knownNetworkParts[1]); + options.KnownNetworks.Add(new IPNetwork(networkIp, prefixLength)); + } + + var builder = new WebHostBuilder() + .Configure(app => + { + app.UseForwardedHeaders(options); + }); + var server = new TestServer(builder); + + var context = await server.SendAsync(c => + { + c.Request.Headers["X-Forwarded-For"] = forHeader; + }); + + Assert.Equal(expectedRemoteIp, context.Connection.RemoteIpAddress.ToString()); + } } } From b17924573a30b4a012cfbd3df9c939c69cd6b53e Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 9 Sep 2018 12:07:22 -0700 Subject: [PATCH 33/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 46 ++++++++++++++++++++-------------------- korebuild-lock.txt | 4 ++-- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index bac8b15b76..3ae476c231 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,29 +4,29 @@ 0.10.13 - 2.2.0-preview1-20180821.1 - 2.2.0-preview2-35143 - 2.2.0-preview2-35143 - 2.2.0-preview2-35143 - 2.2.0-preview2-35143 - 2.2.0-preview2-35143 - 2.2.0-preview2-35143 - 2.2.0-preview2-35143 - 2.2.0-preview2-35143 - 2.2.0-preview2-35143 - 2.2.0-preview2-35143 - 2.2.0-preview2-35143 - 2.2.0-preview2-35143 - 2.2.0-preview2-35143 - 2.2.0-preview2-35143 - 2.2.0-preview2-35143 - 2.2.0-preview2-35143 - 2.2.0-preview2-35143 - 2.2.0-preview2-35143 - 2.2.0-preview2-35143 - 2.1.2 - 2.2.0-preview1-26618-02 - 2.2.0-preview2-35143 + 2.2.0-preview1-20180907.8 + 2.2.0-preview3-35202 + 2.2.0-preview3-35202 + 2.2.0-preview3-35202 + 2.2.0-preview3-35202 + 2.2.0-preview3-35202 + 2.2.0-preview3-35202 + 2.2.0-preview3-35202 + 2.2.0-preview3-35202 + 2.2.0-preview3-35202 + 2.2.0-preview3-35202 + 2.2.0-preview3-35202 + 2.2.0-preview3-35202 + 2.2.0-preview3-35202 + 2.2.0-preview3-35202 + 2.2.0-preview3-35202 + 2.2.0-preview3-35202 + 2.2.0-preview3-35202 + 2.2.0-preview3-35202 + 2.2.0-preview3-35202 + 2.1.3 + 2.2.0-preview2-26905-02 + 2.2.0-preview3-35202 15.6.1 4.7.49 2.0.3 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index ad704918df..312f82f9a5 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-20180821.1 -commithash:c8d0cc52cd1abb697be24e288ffd54f8fae8bf17 +version:2.2.0-preview1-20180907.8 +commithash:078918eb5c1f176ee1da351c584fb4a4d7491aa0 From f171aa4a64b0201d2dbb90ac5b6d496582f93507 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 16 Sep 2018 12:06:18 -0700 Subject: [PATCH 34/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 42 ++++++++++++++++++++-------------------- korebuild-lock.txt | 4 ++-- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 3ae476c231..f6f1027b34 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,29 +4,29 @@ 0.10.13 - 2.2.0-preview1-20180907.8 - 2.2.0-preview3-35202 - 2.2.0-preview3-35202 - 2.2.0-preview3-35202 - 2.2.0-preview3-35202 - 2.2.0-preview3-35202 - 2.2.0-preview3-35202 - 2.2.0-preview3-35202 - 2.2.0-preview3-35202 - 2.2.0-preview3-35202 - 2.2.0-preview3-35202 - 2.2.0-preview3-35202 - 2.2.0-preview3-35202 - 2.2.0-preview3-35202 - 2.2.0-preview3-35202 - 2.2.0-preview3-35202 - 2.2.0-preview3-35202 - 2.2.0-preview3-35202 - 2.2.0-preview3-35202 - 2.2.0-preview3-35202 + 2.2.0-preview1-20180911.1 + 2.2.0-preview3-35252 + 2.2.0-preview3-35252 + 2.2.0-preview3-35252 + 2.2.0-preview3-35252 + 2.2.0-preview3-35252 + 2.2.0-preview3-35252 + 2.2.0-preview3-35252 + 2.2.0-preview3-35252 + 2.2.0-preview3-35252 + 2.2.0-preview3-35252 + 2.2.0-preview3-35252 + 2.2.0-preview3-35252 + 2.2.0-preview3-35252 + 2.2.0-preview3-35252 + 2.2.0-preview3-35252 + 2.2.0-preview3-35252 + 2.2.0-preview3-35252 + 2.2.0-preview3-35252 + 2.2.0-preview3-35252 2.1.3 2.2.0-preview2-26905-02 - 2.2.0-preview3-35202 + 2.2.0-preview3-35252 15.6.1 4.7.49 2.0.3 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 312f82f9a5..7124f37441 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-20180907.8 -commithash:078918eb5c1f176ee1da351c584fb4a4d7491aa0 +version:2.2.0-preview1-20180911.1 +commithash:ddfecdfc6e8e4859db5a0daea578070b862aac65 From 4a4dde182f178280be535e3328cb40cdf62aa244 Mon Sep 17 00:00:00 2001 From: "Daniel A. White" Date: Mon, 17 Sep 2018 18:33:17 -0400 Subject: [PATCH 35/45] replacing string interpolation with proper logging syntax (#363) --- .../HostFilteringMiddleware.cs | 19 ++++++++++--------- .../ForwardedHeadersMiddleware.cs | 6 +++--- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/Microsoft.AspNetCore.HostFiltering/HostFilteringMiddleware.cs b/src/Microsoft.AspNetCore.HostFiltering/HostFilteringMiddleware.cs index d355edd0fc..0404d38538 100644 --- a/src/Microsoft.AspNetCore.HostFiltering/HostFilteringMiddleware.cs +++ b/src/Microsoft.AspNetCore.HostFiltering/HostFilteringMiddleware.cs @@ -102,7 +102,11 @@ namespace Microsoft.AspNetCore.HostFiltering throw new InvalidOperationException("No allowed hosts were configured."); } - _logger.LogDebug("Allowed hosts: " + string.Join("; ", allowedHosts)); + if (_logger.IsEnabled(LogLevel.Debug)) + { + _logger.LogDebug("Allowed hosts: {Hosts}", string.Join("; ", allowedHosts)); + } + _allowedHosts = allowedHosts; return _allowedHosts; } @@ -148,29 +152,26 @@ namespace Microsoft.AspNetCore.HostFiltering // Http/1.1 requires the header but the value may be empty. if (!_options.AllowEmptyHosts) { - _logger.LogInformation($"{context.Request.Protocol} request rejected due to missing or empty host header."); + _logger.LogInformation("{Protocol} request rejected due to missing or empty host header.", context.Request.Protocol); return false; } - if (_logger.IsEnabled(LogLevel.Debug)) - { - _logger.LogDebug($"{context.Request.Protocol} request allowed with missing or empty host header."); - } + _logger.LogDebug("{Protocol} request allowed with missing or empty host header.", context.Request.Protocol); return true; } if (_allowAnyNonEmptyHost == true) { - _logger.LogTrace($"All hosts are allowed."); + _logger.LogTrace("All hosts are allowed."); return true; } if (HostString.MatchesAny(host, allowedHosts)) { - _logger.LogTrace($"The host '{host}' matches an allowed host."); + _logger.LogTrace("The host '{Host}' matches an allowed host.", host); return true; } - _logger.LogInformation($"The host '{host}' does not match an allowed host."); + _logger.LogInformation("The host '{Host}' does not match an allowed host.", host); return false; } } diff --git a/src/Microsoft.AspNetCore.HttpOverrides/ForwardedHeadersMiddleware.cs b/src/Microsoft.AspNetCore.HttpOverrides/ForwardedHeadersMiddleware.cs index e6eeaa5e98..8143e9adad 100644 --- a/src/Microsoft.AspNetCore.HttpOverrides/ForwardedHeadersMiddleware.cs +++ b/src/Microsoft.AspNetCore.HttpOverrides/ForwardedHeadersMiddleware.cs @@ -233,7 +233,7 @@ namespace Microsoft.AspNetCore.HttpOverrides if (currentValues.RemoteIpAndPort != null && checkKnownIps && !CheckKnownAddress(currentValues.RemoteIpAndPort.Address)) { // Stop at the first unknown remote IP, but still apply changes processed so far. - _logger.LogDebug(1, $"Unknown proxy: {currentValues.RemoteIpAndPort}"); + _logger.LogDebug(1, "Unknown proxy: {RemoteIpAndPort}", currentValues.RemoteIpAndPort); break; } @@ -248,12 +248,12 @@ namespace Microsoft.AspNetCore.HttpOverrides else if (!string.IsNullOrEmpty(set.IpAndPortText)) { // Stop at the first unparsable IP, but still apply changes processed so far. - _logger.LogDebug(1, $"Unparsable IP: {set.IpAndPortText}"); + _logger.LogDebug(1, "Unparsable IP: {IpAndPortText}", set.IpAndPortText); break; } else if (_options.RequireHeaderSymmetry) { - _logger.LogWarning(2, $"Missing forwarded IPAddress."); + _logger.LogWarning(2, "Missing forwarded IPAddress."); return; } } From 6699804fe944efbde3f535df4b1b8a22e4e6c932 Mon Sep 17 00:00:00 2001 From: melnikov77 Date: Thu, 20 Sep 2018 12:01:06 -0700 Subject: [PATCH 36/45] Do not compress response if it is already compressed (#305) (#365) --- .../ResponseCompressionProvider.cs | 5 +++++ .../ResponseCompressionMiddlewareTest.cs | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionProvider.cs b/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionProvider.cs index 3ed2dd058a..33b234091e 100644 --- a/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionProvider.cs +++ b/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionProvider.cs @@ -155,6 +155,11 @@ namespace Microsoft.AspNetCore.ResponseCompression return false; } + if (context.Response.Headers.ContainsKey(HeaderNames.ContentEncoding)) + { + return false; + } + var mimeType = context.Response.ContentType; if (string.IsNullOrEmpty(mimeType)) diff --git a/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs b/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs index 5a2a17a53c..7340aeeac7 100644 --- a/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs +++ b/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs @@ -321,8 +321,9 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests CheckResponseNotCompressed(response, expectedBodyLength: 50, sendVaryHeader: false); } + [Fact] - public async Task Response_WithContentEncodingAlreadySet_Stacked() + public async Task Response_WithContentEncodingAlreadySet_NotReCompressed() { var otherContentEncoding = "something"; @@ -332,8 +333,8 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests }); Assert.True(response.Content.Headers.ContentEncoding.Contains(otherContentEncoding)); - Assert.True(response.Content.Headers.ContentEncoding.Contains("gzip")); - Assert.Equal(24, response.Content.Headers.ContentLength); + Assert.False(response.Content.Headers.ContentEncoding.Contains("gzip")); + Assert.Equal(50, response.Content.Headers.ContentLength); } [Theory] From e0be511964deeb2612d4756d85820f04bb2996ca Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 23 Sep 2018 19:07:53 +0000 Subject: [PATCH 37/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 42 ++++++++++++++++++++-------------------- korebuild-lock.txt | 4 ++-- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index f6f1027b34..004a6aa320 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,29 +4,29 @@ 0.10.13 - 2.2.0-preview1-20180911.1 - 2.2.0-preview3-35252 - 2.2.0-preview3-35252 - 2.2.0-preview3-35252 - 2.2.0-preview3-35252 - 2.2.0-preview3-35252 - 2.2.0-preview3-35252 - 2.2.0-preview3-35252 - 2.2.0-preview3-35252 - 2.2.0-preview3-35252 - 2.2.0-preview3-35252 - 2.2.0-preview3-35252 - 2.2.0-preview3-35252 - 2.2.0-preview3-35252 - 2.2.0-preview3-35252 - 2.2.0-preview3-35252 - 2.2.0-preview3-35252 - 2.2.0-preview3-35252 - 2.2.0-preview3-35252 - 2.2.0-preview3-35252 + 2.2.0-preview1-20180918.1 + 2.2.0-preview3-35301 + 2.2.0-preview3-35301 + 2.2.0-preview3-35301 + 2.2.0-preview3-35301 + 2.2.0-preview3-35301 + 2.2.0-preview3-35301 + 2.2.0-preview3-35301 + 2.2.0-preview3-35301 + 2.2.0-preview3-35301 + 2.2.0-preview3-35301 + 2.2.0-preview3-35301 + 2.2.0-preview3-35301 + 2.2.0-preview3-35301 + 2.2.0-preview3-35301 + 2.2.0-preview3-35301 + 2.2.0-preview3-35301 + 2.2.0-preview3-35301 + 2.2.0-preview3-35301 + 2.2.0-preview3-35301 2.1.3 2.2.0-preview2-26905-02 - 2.2.0-preview3-35252 + 2.2.0-preview3-35301 15.6.1 4.7.49 2.0.3 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 7124f37441..649bf2ba0b 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-20180911.1 -commithash:ddfecdfc6e8e4859db5a0daea578070b862aac65 +version:2.2.0-preview1-20180918.1 +commithash:ad5e3fc53442741a0dd49bce437d2ac72f4b5800 From cc610955dbc9aea4b649588779c49a4bfbf72630 Mon Sep 17 00:00:00 2001 From: andrewslavin Date: Sat, 17 Mar 2018 23:59:54 +1100 Subject: [PATCH 38/45] Support mime-type wildcards #121 @andrewslavin --- samples/ResponseCompressionSample/Startup.cs | 5 + .../ResponseCompressionOptions.cs | 7 +- .../ResponseCompressionProvider.cs | 50 +++++- .../ResponseCompressionMiddlewareTest.cs | 147 ++++++++++++++++++ 4 files changed, 202 insertions(+), 7 deletions(-) diff --git a/samples/ResponseCompressionSample/Startup.cs b/samples/ResponseCompressionSample/Startup.cs index e10baad03c..8489864aea 100644 --- a/samples/ResponseCompressionSample/Startup.cs +++ b/samples/ResponseCompressionSample/Startup.cs @@ -26,6 +26,11 @@ namespace ResponseCompressionSample options.Providers.Add(); // .Append(TItem) is only available on Core. options.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(new[] { "image/svg+xml" }); + + ////Example of using excluded and wildcard MIME types: + ////Compress all MIME types except various media types, but do compress SVG images. + //options.MimeTypes = new[] { "*/*", "image/svg+xml" }; + //options.ExcludedMimeTypes = new[] { "image/*", "audio/*", "video/*" }; }); } diff --git a/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionOptions.cs b/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionOptions.cs index 6ec4fb62b4..45168d04d5 100644 --- a/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionOptions.cs +++ b/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionOptions.cs @@ -15,9 +15,14 @@ namespace Microsoft.AspNetCore.ResponseCompression /// public IEnumerable MimeTypes { get; set; } + /// + /// Response Content-Type MIME types to not compress. + /// + public IEnumerable ExcludedMimeTypes { get; set; } + /// /// Indicates if responses over HTTPS connections should be compressed. The default is 'false'. - /// Enable compression on HTTPS connections may expose security problems. + /// Enabling compression on HTTPS connections may expose security problems. /// public bool EnableForHttps { get; set; } = false; diff --git a/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionProvider.cs b/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionProvider.cs index 33b234091e..d459c13ff3 100644 --- a/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionProvider.cs +++ b/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionProvider.cs @@ -16,6 +16,7 @@ namespace Microsoft.AspNetCore.ResponseCompression { private readonly ICompressionProvider[] _providers; private readonly HashSet _mimeTypes; + private readonly HashSet _excludedMimeTypes; private readonly bool _enableForHttps; /// @@ -34,7 +35,9 @@ namespace Microsoft.AspNetCore.ResponseCompression throw new ArgumentNullException(nameof(options)); } - _providers = options.Value.Providers.ToArray(); + var responseCompressionOptions = options.Value; + + _providers = responseCompressionOptions.Providers.ToArray(); if (_providers.Length == 0) { // Use the factory so it can resolve IOptions from DI. @@ -59,14 +62,19 @@ namespace Microsoft.AspNetCore.ResponseCompression } } - var mimeTypes = options.Value.MimeTypes; + var mimeTypes = responseCompressionOptions.MimeTypes; if (mimeTypes == null || !mimeTypes.Any()) { mimeTypes = ResponseCompressionDefaults.MimeTypes; } _mimeTypes = new HashSet(mimeTypes, StringComparer.OrdinalIgnoreCase); - _enableForHttps = options.Value.EnableForHttps; + _excludedMimeTypes = new HashSet( + responseCompressionOptions.ExcludedMimeTypes ?? Enumerable.Empty(), + StringComparer.OrdinalIgnoreCase + ); + + _enableForHttps = responseCompressionOptions.EnableForHttps; } /// @@ -115,7 +123,7 @@ namespace Microsoft.AspNetCore.ResponseCompression for (int i = 0; i < _providers.Length; i++) { var provider = _providers[i]; - + // Any provider is a candidate. candidates.Add(new ProviderCandidate(provider.EncodingName, quality, i, provider)); } @@ -175,8 +183,9 @@ namespace Microsoft.AspNetCore.ResponseCompression mimeType = mimeType.Trim(); } - // TODO PERF: StringSegments? - return _mimeTypes.Contains(mimeType); + return ShouldCompressExact(mimeType) //check exact match type/subtype + ?? ShouldCompressPartial(mimeType) //check partial match type/* + ?? _mimeTypes.Contains("*/*"); //check wildcard */* } /// @@ -189,6 +198,35 @@ namespace Microsoft.AspNetCore.ResponseCompression return !string.IsNullOrEmpty(context.Request.Headers[HeaderNames.AcceptEncoding]); } + private bool? ShouldCompressExact(string mimeType) + { + //Check excluded MIME types first, then included + if (_excludedMimeTypes.Contains(mimeType)) + { + return false; + } + + if (_mimeTypes.Contains(mimeType)) + { + return true; + } + + return null; + } + + private bool? ShouldCompressPartial(string mimeType) + { + int? slashPos = mimeType?.IndexOf('/'); + + if (slashPos >= 0) + { + string partialMimeType = mimeType.Substring(0, slashPos.Value) + "/*"; + return ShouldCompressExact(partialMimeType); + } + + return null; + } + private readonly struct ProviderCandidate : IEquatable { public ProviderCandidate(string encodingName, double quality, int priority, ICompressionProvider provider) diff --git a/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs b/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs index 7340aeeac7..08fa0b283e 100644 --- a/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs +++ b/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs @@ -224,6 +224,153 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests CheckResponseNotCompressed(response, expectedBodyLength: 100, sendVaryHeader: false); } + [Theory] + [InlineData(null, null, "text/plain", true)] + [InlineData(null, new string[0], "text/plain", true)] + [InlineData(null, new[] { "TEXT/plain" }, "text/plain", false)] + [InlineData(null, new[] { "TEXT/*" }, "text/plain", true)] + [InlineData(null, new[] { "*/*" }, "text/plain", true)] + + [InlineData(new string[0], null, "text/plain", true)] + [InlineData(new string[0], new string[0], "text/plain", true)] + [InlineData(new string[0], new[] { "TEXT/plain" }, "text/plain", false)] + [InlineData(new string[0], new[] { "TEXT/*" }, "text/plain", true)] + [InlineData(new string[0], new[] { "*/*" }, "text/plain", true)] + + [InlineData(new[] { "TEXT/plain" }, null, "text/plain", true)] + [InlineData(new[] { "TEXT/plain" }, new string[0], "text/plain", true)] + [InlineData(new[] { "TEXT/plain" }, new[] { "TEXT/plain" }, "text/plain", false)] + [InlineData(new[] { "TEXT/plain" }, new[] { "TEXT/*" }, "text/plain", true)] + [InlineData(new[] { "TEXT/plain" }, new[] { "*/*" }, "text/plain", true)] + + [InlineData(new[] { "TEXT/*" }, null, "text/plain", true)] + [InlineData(new[] { "TEXT/*" }, new string[0], "text/plain", true)] + [InlineData(new[] { "TEXT/*" }, new[] { "TEXT/plain" }, "text/plain", false)] + [InlineData(new[] { "TEXT/*" }, new[] { "TEXT/*" }, "text/plain", false)] + [InlineData(new[] { "TEXT/*" }, new[] { "*/*" }, "text/plain", true)] + + [InlineData(new[] { "*/*" }, null, "text/plain", true)] + [InlineData(new[] { "*/*" }, new string[0], "text/plain", true)] + [InlineData(new[] { "*/*" }, new[] { "TEXT/plain" }, "text/plain", false)] + [InlineData(new[] { "*/*" }, new[] { "TEXT/*" }, "text/plain", false)] + [InlineData(new[] { "*/*" }, new[] { "*/*" }, "text/plain", true)] + + [InlineData(null, null, "text/plain2", false)] + [InlineData(null, new string[0], "text/plain2", false)] + [InlineData(null, new[] { "TEXT/plain" }, "text/plain2", false)] + [InlineData(null, new[] { "TEXT/*" }, "text/plain2", false)] + [InlineData(null, new[] { "*/*" }, "text/plain2", false)] + + [InlineData(new string[0], null, "text/plain2", false)] + [InlineData(new string[0], new string[0], "text/plain2", false)] + [InlineData(new string[0], new[] { "TEXT/plain" }, "text/plain2", false)] + [InlineData(new string[0], new[] { "TEXT/*" }, "text/plain2", false)] + [InlineData(new string[0], new[] { "*/*" }, "text/plain2", false)] + + [InlineData(new[] { "TEXT/plain" }, null, "text/plain2", false)] + [InlineData(new[] { "TEXT/plain" }, new string[0], "text/plain2", false)] + [InlineData(new[] { "TEXT/plain" }, new[] { "TEXT/plain" }, "text/plain2", false)] + [InlineData(new[] { "TEXT/plain" }, new[] { "TEXT/*" }, "text/plain2", false)] + [InlineData(new[] { "TEXT/plain" }, new[] { "*/*" }, "text/plain2", false)] + + [InlineData(new[] { "TEXT/*" }, null, "text/plain2", true)] + [InlineData(new[] { "TEXT/*" }, new string[0], "text/plain2", true)] + [InlineData(new[] { "TEXT/*" }, new[] { "TEXT/plain" }, "text/plain2", true)] + [InlineData(new[] { "TEXT/*" }, new[] { "TEXT/*" }, "text/plain2", false)] + [InlineData(new[] { "TEXT/*" }, new[] { "*/*" }, "text/plain2", true)] + + [InlineData(new[] { "*/*" }, null, "text/plain2", true)] + [InlineData(new[] { "*/*" }, new string[0], "text/plain2", true)] + [InlineData(new[] { "*/*" }, new[] { "TEXT/plain" }, "text/plain2", true)] + [InlineData(new[] { "*/*" }, new[] { "TEXT/*" }, "text/plain2", false)] + [InlineData(new[] { "*/*" }, new[] { "*/*" }, "text/plain2", true)] + public async Task MimeTypes_IncludedAndExcluded( + string[] mimeTypes, + string[] excludedMimeTypes, + string mimeType, + bool compress + ) + { + var builder = new WebHostBuilder() + .ConfigureServices( + services => + services.AddResponseCompression( + options => + { + options.MimeTypes = mimeTypes; + options.ExcludedMimeTypes = excludedMimeTypes; + } + ) + ) + .Configure( + app => + { + app.UseResponseCompression(); + app.Run( + context => + { + context.Response.Headers[HeaderNames.ContentMD5] = "MD5"; + context.Response.ContentType = mimeType; + return context.Response.WriteAsync(new string('a', 100)); + } + ); + } + ); + + var server = new TestServer(builder); + var client = server.CreateClient(); + + var request = new HttpRequestMessage(HttpMethod.Get, ""); + request.Headers.AcceptEncoding.ParseAdd("gzip"); + + var response = await client.SendAsync(request); + + if (compress) + { + CheckResponseCompressed(response, expectedBodyLength: 24, expectedEncoding: "gzip"); + } + else + { + CheckResponseNotCompressed(response, expectedBodyLength: 100, sendVaryHeader: false); + } + } + + [Fact] + public async Task NoIncludedMimeTypes_UseDefaults() + { + var builder = new WebHostBuilder() + .ConfigureServices( + services => + services.AddResponseCompression( + options => options.ExcludedMimeTypes = new[] { "text/*" } + ) + ) + .Configure( + app => + { + app.UseResponseCompression(); + app.Run( + context => + { + context.Response.Headers[HeaderNames.ContentMD5] = "MD5"; + context.Response.ContentType = TextPlain; + return context.Response.WriteAsync(new string('a', 100)); + } + ); + } + ); + + var server = new TestServer(builder); + var client = server.CreateClient(); + + var request = new HttpRequestMessage(HttpMethod.Get, ""); + request.Headers.AcceptEncoding.ParseAdd("gzip"); + + var response = await client.SendAsync(request); + + CheckResponseCompressed(response, expectedBodyLength: 24, expectedEncoding: "gzip"); + } + [Theory] [InlineData("")] [InlineData("text/plain")] From 09a7b3bef5b5ab54e4c6964ae97913984ff96983 Mon Sep 17 00:00:00 2001 From: "Chris Ross (ASP.NET)" Date: Fri, 28 Sep 2018 10:31:58 -0700 Subject: [PATCH 39/45] Add logging to the response compression middleware #222 --- ...soft.AspNetCore.ResponseCompression.csproj | 1 + .../ResponseCompressionProvider.cs | 131 ++++++---- .../ResponseCompressionLoggingExtensions.cs | 72 ++++++ ...spNetCore.ResponseCompression.Tests.csproj | 1 + .../ResponseCompressionMiddlewareTest.cs | 231 ++++++++---------- 5 files changed, 266 insertions(+), 170 deletions(-) create mode 100644 src/Microsoft.AspNetCore.ResponseCompression/internal/ResponseCompressionLoggingExtensions.cs diff --git a/src/Microsoft.AspNetCore.ResponseCompression/Microsoft.AspNetCore.ResponseCompression.csproj b/src/Microsoft.AspNetCore.ResponseCompression/Microsoft.AspNetCore.ResponseCompression.csproj index d39f7db89a..7f594f1c30 100644 --- a/src/Microsoft.AspNetCore.ResponseCompression/Microsoft.AspNetCore.ResponseCompression.csproj +++ b/src/Microsoft.AspNetCore.ResponseCompression/Microsoft.AspNetCore.ResponseCompression.csproj @@ -9,6 +9,7 @@ + diff --git a/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionProvider.cs b/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionProvider.cs index d459c13ff3..b63ff7380e 100644 --- a/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionProvider.cs +++ b/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionProvider.cs @@ -3,8 +3,12 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.ResponseCompression.Internal; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.Extensions.Primitives; using Microsoft.Net.Http.Headers; @@ -18,6 +22,7 @@ namespace Microsoft.AspNetCore.ResponseCompression private readonly HashSet _mimeTypes; private readonly HashSet _excludedMimeTypes; private readonly bool _enableForHttps; + private readonly ILogger _logger; /// /// If no compression providers are specified then GZip is used by default. @@ -67,6 +72,7 @@ namespace Microsoft.AspNetCore.ResponseCompression { mimeTypes = ResponseCompressionDefaults.MimeTypes; } + _mimeTypes = new HashSet(mimeTypes, StringComparer.OrdinalIgnoreCase); _excludedMimeTypes = new HashSet( @@ -75,6 +81,8 @@ namespace Microsoft.AspNetCore.ResponseCompression ); _enableForHttps = responseCompressionOptions.EnableForHttps; + + _logger = services.GetRequiredService>(); } /// @@ -83,76 +91,86 @@ namespace Microsoft.AspNetCore.ResponseCompression // e.g. Accept-Encoding: gzip, deflate, sdch var accept = context.Request.Headers[HeaderNames.AcceptEncoding]; + // Note this is already checked in CheckRequestAcceptsCompression which _should_ prevent any of these other methods from being called. if (StringValues.IsNullOrEmpty(accept)) { + Debug.Assert(false, "Duplicate check failed."); + _logger.NoAcceptEncoding(); return null; } - if (StringWithQualityHeaderValue.TryParseList(accept, out var encodings)) + if (!StringWithQualityHeaderValue.TryParseList(accept, out var encodings) || !encodings.Any()) { - if (encodings.Count == 0) + _logger.NoAcceptEncoding(); + return null; + } + + var candidates = new HashSet(); + + foreach (var encoding in encodings) + { + var encodingName = encoding.Value; + var quality = encoding.Quality.GetValueOrDefault(1); + + if (quality < double.Epsilon) { - return null; + continue; } - var candidates = new HashSet(); - - foreach (var encoding in encodings) + for (int i = 0; i < _providers.Length; i++) { - var encodingName = encoding.Value; - var quality = encoding.Quality.GetValueOrDefault(1); + var provider = _providers[i]; - if (quality < double.Epsilon) + if (StringSegment.Equals(provider.EncodingName, encodingName, StringComparison.OrdinalIgnoreCase)) { - continue; + candidates.Add(new ProviderCandidate(provider.EncodingName, quality, i, provider)); } + } + // Uncommon but valid options + if (StringSegment.Equals("*", encodingName, StringComparison.Ordinal)) + { for (int i = 0; i < _providers.Length; i++) { var provider = _providers[i]; - if (StringSegment.Equals(provider.EncodingName, encodingName, StringComparison.OrdinalIgnoreCase)) - { - candidates.Add(new ProviderCandidate(provider.EncodingName, quality, i, provider)); - } + // Any provider is a candidate. + candidates.Add(new ProviderCandidate(provider.EncodingName, quality, i, provider)); } - // Uncommon but valid options - if (StringSegment.Equals("*", encodingName, StringComparison.Ordinal)) - { - for (int i = 0; i < _providers.Length; i++) - { - var provider = _providers[i]; - - // Any provider is a candidate. - candidates.Add(new ProviderCandidate(provider.EncodingName, quality, i, provider)); - } - - break; - } - - if (StringSegment.Equals("identity", encodingName, StringComparison.OrdinalIgnoreCase)) - { - // We add 'identity' to the list of "candidates" with a very low priority and no provider. - // This will allow it to be ordered based on its quality (and priority) later in the method. - candidates.Add(new ProviderCandidate(encodingName.Value, quality, priority: int.MaxValue, provider: null)); - } + break; } - if (candidates.Count <= 1) + if (StringSegment.Equals("identity", encodingName, StringComparison.OrdinalIgnoreCase)) { - return candidates.ElementAtOrDefault(0).Provider; + // We add 'identity' to the list of "candidates" with a very low priority and no provider. + // This will allow it to be ordered based on its quality (and priority) later in the method. + candidates.Add(new ProviderCandidate(encodingName.Value, quality, priority: int.MaxValue, provider: null)); } - - var accepted = candidates - .OrderByDescending(x => x.Quality) - .ThenBy(x => x.Priority) - .First(); - - return accepted.Provider; } - return null; + ICompressionProvider selectedProvider = null; + if (candidates.Count <= 1) + { + selectedProvider = candidates.FirstOrDefault().Provider; + } + else + { + selectedProvider = candidates + .OrderByDescending(x => x.Quality) + .ThenBy(x => x.Priority) + .First().Provider; + } + + if (selectedProvider == null) + { + // "identity" would match as a candidate but not have a provider implementation + _logger.NoCompressionProvider(); + return null; + } + + _logger.CompressingWith(selectedProvider.EncodingName); + return selectedProvider; } /// @@ -160,11 +178,13 @@ namespace Microsoft.AspNetCore.ResponseCompression { if (context.Response.Headers.ContainsKey(HeaderNames.ContentRange)) { + _logger.NoCompressionDueToHeader(HeaderNames.ContentRange); return false; } if (context.Response.Headers.ContainsKey(HeaderNames.ContentEncoding)) { + _logger.NoCompressionDueToHeader(HeaderNames.ContentEncoding); return false; } @@ -172,6 +192,7 @@ namespace Microsoft.AspNetCore.ResponseCompression if (string.IsNullOrEmpty(mimeType)) { + _logger.NoCompressionForContentType(mimeType); return false; } @@ -183,9 +204,18 @@ namespace Microsoft.AspNetCore.ResponseCompression mimeType = mimeType.Trim(); } - return ShouldCompressExact(mimeType) //check exact match type/subtype + var shouldCompress = ShouldCompressExact(mimeType) //check exact match type/subtype ?? ShouldCompressPartial(mimeType) //check partial match type/* ?? _mimeTypes.Contains("*/*"); //check wildcard */* + + if (shouldCompress) + { + _logger.ShouldCompressResponse(); // Trace, there will be more logs + return true; + } + + _logger.NoCompressionForContentType(mimeType); + return false; } /// @@ -193,9 +223,18 @@ namespace Microsoft.AspNetCore.ResponseCompression { if (context.Request.IsHttps && !_enableForHttps) { + _logger.NoCompressionForHttps(); return false; } - return !string.IsNullOrEmpty(context.Request.Headers[HeaderNames.AcceptEncoding]); + + if (string.IsNullOrEmpty(context.Request.Headers[HeaderNames.AcceptEncoding])) + { + _logger.NoAcceptEncoding(); + return false; + } + + _logger.RequestAcceptsCompression(); // Trace, there will be more logs + return true; } private bool? ShouldCompressExact(string mimeType) diff --git a/src/Microsoft.AspNetCore.ResponseCompression/internal/ResponseCompressionLoggingExtensions.cs b/src/Microsoft.AspNetCore.ResponseCompression/internal/ResponseCompressionLoggingExtensions.cs new file mode 100644 index 0000000000..75f3d07fd3 --- /dev/null +++ b/src/Microsoft.AspNetCore.ResponseCompression/internal/ResponseCompressionLoggingExtensions.cs @@ -0,0 +1,72 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.Extensions.Logging; + +namespace Microsoft.AspNetCore.ResponseCompression.Internal +{ + internal static class ResponseCompressionLoggingExtensions + { + private static readonly Action _noAcceptEncoding; + private static readonly Action _noCompressionForHttps; + private static readonly Action _requestAcceptsCompression; + private static readonly Action _noCompressionDueToHeader; + private static readonly Action _noCompressionForContentType; + private static readonly Action _shouldCompressResponse; + private static readonly Action _noCompressionProvider; + private static readonly Action _compressWith; + + static ResponseCompressionLoggingExtensions() + { + _noAcceptEncoding = LoggerMessage.Define(LogLevel.Debug, 1, "No response compression available, the Accept-Encoding header is missing or invalid."); + _noCompressionForHttps = LoggerMessage.Define(LogLevel.Debug, 2, "No response compression available for HTTPS requests. See ResponseCompressionOptions.EnableForHttps."); + _requestAcceptsCompression = LoggerMessage.Define(LogLevel.Trace, 3, "This request accepts compression."); + _noCompressionDueToHeader = LoggerMessage.Define(LogLevel.Debug, 4, "Response compression disabled due to the {header} header."); + _noCompressionForContentType = LoggerMessage.Define(LogLevel.Debug, 5, "Response compression is not enabled for the Content-Type '{header}'."); + _shouldCompressResponse = LoggerMessage.Define(LogLevel.Trace, 6, "Response compression is available for this Content-Type."); + _noCompressionProvider = LoggerMessage.Define(LogLevel.Debug, 7, "No matching response compression provider found."); + _compressWith = LoggerMessage.Define(LogLevel.Debug, 8, "The response will be compressed with '{provider}'."); + } + + public static void NoAcceptEncoding(this ILogger logger) + { + _noAcceptEncoding(logger, null); + } + + public static void NoCompressionForHttps(this ILogger logger) + { + _noCompressionForHttps(logger, null); + } + + public static void RequestAcceptsCompression(this ILogger logger) + { + _requestAcceptsCompression(logger, null); + } + + public static void NoCompressionDueToHeader(this ILogger logger, string header) + { + _noCompressionDueToHeader(logger, header, null); + } + + public static void NoCompressionForContentType(this ILogger logger, string header) + { + _noCompressionForContentType(logger, header, null); + } + + public static void ShouldCompressResponse(this ILogger logger) + { + _shouldCompressResponse(logger, null); + } + + public static void NoCompressionProvider(this ILogger logger) + { + _noCompressionProvider(logger, null); + } + + public static void CompressingWith(this ILogger logger, string provider) + { + _compressWith(logger, provider, null); + } + } +} diff --git a/test/Microsoft.AspNetCore.ResponseCompression.Tests/Microsoft.AspNetCore.ResponseCompression.Tests.csproj b/test/Microsoft.AspNetCore.ResponseCompression.Tests/Microsoft.AspNetCore.ResponseCompression.Tests.csproj index 902449b486..b979c66a00 100644 --- a/test/Microsoft.AspNetCore.ResponseCompression.Tests/Microsoft.AspNetCore.ResponseCompression.Tests.csproj +++ b/test/Microsoft.AspNetCore.ResponseCompression.Tests/Microsoft.AspNetCore.ResponseCompression.Tests.csproj @@ -14,6 +14,7 @@ + diff --git a/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs b/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs index 08fa0b283e..8cf9d3bf1e 100644 --- a/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs +++ b/test/Microsoft.AspNetCore.ResponseCompression.Tests/ResponseCompressionMiddlewareTest.cs @@ -15,6 +15,8 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.TestHost; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Testing; using Microsoft.Net.Http.Headers; using Xunit; @@ -55,28 +57,31 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests [Fact] public async Task Request_NoAcceptEncoding_Uncompressed() { - var response = await InvokeMiddleware(100, requestAcceptEncodings: null, responseType: TextPlain); + var (response, logMessages) = await InvokeMiddleware(100, requestAcceptEncodings: null, responseType: TextPlain); CheckResponseNotCompressed(response, expectedBodyLength: 100, sendVaryHeader: false); + AssertLog(logMessages.Single(), LogLevel.Debug, "No response compression available, the Accept-Encoding header is missing or invalid."); } [Fact] public async Task Request_AcceptGzipDeflate_CompressedGzip() { - var response = await InvokeMiddleware(100, requestAcceptEncodings: new[] { "gzip", "deflate" }, responseType: TextPlain); + var (response, logMessages) = await InvokeMiddleware(100, requestAcceptEncodings: new[] { "gzip", "deflate" }, responseType: TextPlain); CheckResponseCompressed(response, expectedBodyLength: 24, expectedEncoding: "gzip"); + AssertCompressedWithLog(logMessages, "gzip"); } [Fact] public async Task Request_AcceptBrotli_CompressedBrotli() { - var response = await InvokeMiddleware(100, requestAcceptEncodings: new[] { "br" }, responseType: TextPlain); + var (response, logMessages) = await InvokeMiddleware(100, requestAcceptEncodings: new[] { "br" }, responseType: TextPlain); #if NET461 CheckResponseNotCompressed(response, expectedBodyLength: 100, sendVaryHeader: true); #elif NETCOREAPP2_2 CheckResponseCompressed(response, expectedBodyLength: 20, expectedEncoding: "br"); + AssertCompressedWithLog(logMessages, "br"); #else #error Target frameworks need to be updated. #endif @@ -87,12 +92,14 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests [InlineData("br", "gzip")] public async Task Request_AcceptMixed_CompressedBrotli(string encoding1, string encoding2) { - var response = await InvokeMiddleware(100, new[] { encoding1, encoding2 }, responseType: TextPlain); + var (response, logMessages) = await InvokeMiddleware(100, new[] { encoding1, encoding2 }, responseType: TextPlain); #if NET461 CheckResponseCompressed(response, expectedBodyLength: 24, expectedEncoding: "gzip"); + AssertCompressedWithLog(logMessages, "gzip"); #elif NETCOREAPP2_2 CheckResponseCompressed(response, expectedBodyLength: 20, expectedEncoding: "br"); + AssertCompressedWithLog(logMessages, "br"); #else #error Target frameworks need to be updated. #endif @@ -110,9 +117,10 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests options.Providers.Add(); } - var response = await InvokeMiddleware(100, new[] { encoding1, encoding2 }, responseType: TextPlain, configure: Configure); + var (response, logMessages) = await InvokeMiddleware(100, new[] { encoding1, encoding2 }, responseType: TextPlain, configure: Configure); CheckResponseCompressed(response, expectedBodyLength: 24, expectedEncoding: "gzip"); + AssertCompressedWithLog(logMessages, "gzip"); } #elif NET461 #else @@ -122,9 +130,13 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests [Fact] public async Task Request_AcceptUnknown_NotCompressed() { - var response = await InvokeMiddleware(100, requestAcceptEncodings: new[] { "unknown" }, responseType: TextPlain); + var (response, logMessages) = await InvokeMiddleware(100, requestAcceptEncodings: new[] { "unknown" }, responseType: TextPlain); CheckResponseNotCompressed(response, expectedBodyLength: 100, sendVaryHeader: true); + Assert.Equal(3, logMessages.Count); + AssertLog(logMessages.First(), LogLevel.Trace, "This request accepts compression."); + AssertLog(logMessages.Skip(1).First(), LogLevel.Trace, "Response compression is available for this Content-Type."); + AssertLog(logMessages.Skip(2).First(), LogLevel.Debug, "No matching response compression provider found."); } [Theory] @@ -134,31 +146,10 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests [InlineData("text/plain ; charset=ISO-8859-4")] public async Task ContentType_WithCharset_Compress(string contentType) { - var builder = new WebHostBuilder() - .ConfigureServices(services => - { - services.AddResponseCompression(); - }) - .Configure(app => - { - app.UseResponseCompression(); - app.Run(context => - { - context.Response.Headers[HeaderNames.ContentMD5] = "MD5"; - context.Response.ContentType = contentType; - return context.Response.WriteAsync(new string('a', 100)); - }); - }); - - var server = new TestServer(builder); - var client = server.CreateClient(); - - var request = new HttpRequestMessage(HttpMethod.Get, ""); - request.Headers.AcceptEncoding.ParseAdd("gzip"); - - var response = await client.SendAsync(request); + var (response, logMessages) = await InvokeMiddleware(uncompressedBodyLength: 100, requestAcceptEncodings: new[] { "gzip" }, contentType); CheckResponseCompressed(response, expectedBodyLength: 24, expectedEncoding: "gzip"); + AssertCompressedWithLog(logMessages, "gzip"); } [Fact] @@ -197,31 +188,13 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests [InlineData("text/plain2")] public async Task MimeTypes_OtherContentTypes_NoMatch(string contentType) { - var builder = new WebHostBuilder() - .ConfigureServices(services => - { - services.AddResponseCompression(); - }) - .Configure(app => - { - app.UseResponseCompression(); - app.Run(context => - { - context.Response.Headers[HeaderNames.ContentMD5] = "MD5"; - context.Response.ContentType = contentType; - return context.Response.WriteAsync(new string('a', 100)); - }); - }); - - var server = new TestServer(builder); - var client = server.CreateClient(); - - var request = new HttpRequestMessage(HttpMethod.Get, ""); - request.Headers.AcceptEncoding.ParseAdd("gzip"); - - var response = await client.SendAsync(request); + var (response, logMessages) = await InvokeMiddleware(uncompressedBodyLength: 100, requestAcceptEncodings: new[] { "gzip" }, contentType); CheckResponseNotCompressed(response, expectedBodyLength: 100, sendVaryHeader: false); + Assert.Equal(2, logMessages.Count); + AssertLog(logMessages.First(), LogLevel.Trace, "This request accepts compression."); + var expected = string.IsNullOrEmpty(contentType) ? "(null)" : contentType; + AssertLog(logMessages.Skip(1).First(), LogLevel.Debug, $"Response compression is not enabled for the Content-Type '{expected}'."); } [Theory] @@ -287,88 +260,42 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests public async Task MimeTypes_IncludedAndExcluded( string[] mimeTypes, string[] excludedMimeTypes, - string mimeType, + string contentType, bool compress ) { - var builder = new WebHostBuilder() - .ConfigureServices( - services => - services.AddResponseCompression( - options => - { - options.MimeTypes = mimeTypes; - options.ExcludedMimeTypes = excludedMimeTypes; - } - ) - ) - .Configure( - app => - { - app.UseResponseCompression(); - app.Run( - context => - { - context.Response.Headers[HeaderNames.ContentMD5] = "MD5"; - context.Response.ContentType = mimeType; - return context.Response.WriteAsync(new string('a', 100)); - } - ); - } - ); - - var server = new TestServer(builder); - var client = server.CreateClient(); - - var request = new HttpRequestMessage(HttpMethod.Get, ""); - request.Headers.AcceptEncoding.ParseAdd("gzip"); - - var response = await client.SendAsync(request); + var (response, logMessages) = await InvokeMiddleware(uncompressedBodyLength: 100, requestAcceptEncodings: new[] { "gzip" }, contentType, + configure: options => + { + options.MimeTypes = mimeTypes; + options.ExcludedMimeTypes = excludedMimeTypes; + }); if (compress) { CheckResponseCompressed(response, expectedBodyLength: 24, expectedEncoding: "gzip"); + AssertCompressedWithLog(logMessages, "gzip"); } else { CheckResponseNotCompressed(response, expectedBodyLength: 100, sendVaryHeader: false); + Assert.Equal(2, logMessages.Count); + AssertLog(logMessages.First(), LogLevel.Trace, "This request accepts compression."); + AssertLog(logMessages.Skip(1).First(), LogLevel.Debug, $"Response compression is not enabled for the Content-Type '{contentType}'."); } } [Fact] public async Task NoIncludedMimeTypes_UseDefaults() { - var builder = new WebHostBuilder() - .ConfigureServices( - services => - services.AddResponseCompression( - options => options.ExcludedMimeTypes = new[] { "text/*" } - ) - ) - .Configure( - app => - { - app.UseResponseCompression(); - app.Run( - context => - { - context.Response.Headers[HeaderNames.ContentMD5] = "MD5"; - context.Response.ContentType = TextPlain; - return context.Response.WriteAsync(new string('a', 100)); - } - ); - } - ); - - var server = new TestServer(builder); - var client = server.CreateClient(); - - var request = new HttpRequestMessage(HttpMethod.Get, ""); - request.Headers.AcceptEncoding.ParseAdd("gzip"); - - var response = await client.SendAsync(request); + var (response, logMessages) = await InvokeMiddleware(uncompressedBodyLength: 100, requestAcceptEncodings: new[] { "gzip" }, TextPlain, + configure: options => + { + options.ExcludedMimeTypes = new[] { "text/*" }; + }); CheckResponseCompressed(response, expectedBodyLength: 24, expectedEncoding: "gzip"); + AssertCompressedWithLog(logMessages, "gzip"); } [Theory] @@ -410,12 +337,14 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests [Fact] public async Task Request_AcceptStar_Compressed() { - var response = await InvokeMiddleware(100, requestAcceptEncodings: new[] { "*" }, responseType: TextPlain); + var (response, logMessages) = await InvokeMiddleware(100, requestAcceptEncodings: new[] { "*" }, responseType: TextPlain); #if NET461 CheckResponseCompressed(response, expectedBodyLength: 24, expectedEncoding: "gzip"); + AssertCompressedWithLog(logMessages, "gzip"); #elif NETCOREAPP2_2 CheckResponseCompressed(response, expectedBodyLength: 20, expectedEncoding: "br"); + AssertCompressedWithLog(logMessages, "br"); #else #error Target frameworks need to be updated. #endif @@ -424,9 +353,13 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests [Fact] public async Task Request_AcceptIdentity_NotCompressed() { - var response = await InvokeMiddleware(100, requestAcceptEncodings: new[] { "identity" }, responseType: TextPlain); + var (response, logMessages) = await InvokeMiddleware(100, requestAcceptEncodings: new[] { "identity" }, responseType: TextPlain); CheckResponseNotCompressed(response, expectedBodyLength: 100, sendVaryHeader: true); + Assert.Equal(3, logMessages.Count); + AssertLog(logMessages.First(), LogLevel.Trace, "This request accepts compression."); + AssertLog(logMessages.Skip(1).First(), LogLevel.Trace, "Response compression is available for this Content-Type."); + AssertLog(logMessages.Skip(2).First(), LogLevel.Debug, "No matching response compression provider found."); } [Theory] @@ -435,37 +368,48 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests [InlineData(new[] { "identity;q=0.5", "gzip" }, 24)] public async Task Request_AcceptWithHigherCompressionQuality_Compressed(string[] acceptEncodings, int expectedBodyLength) { - var response = await InvokeMiddleware(100, requestAcceptEncodings: acceptEncodings, responseType: TextPlain); + var (response, logMessages) = await InvokeMiddleware(100, requestAcceptEncodings: acceptEncodings, responseType: TextPlain); CheckResponseCompressed(response, expectedBodyLength: expectedBodyLength, expectedEncoding: "gzip"); + AssertCompressedWithLog(logMessages, "gzip"); } [Theory] [InlineData(new[] { "gzip;q=0.5", "identity;q=0.8" }, 100)] public async Task Request_AcceptWithhigherIdentityQuality_NotCompressed(string[] acceptEncodings, int expectedBodyLength) { - var response = await InvokeMiddleware(100, requestAcceptEncodings: acceptEncodings, responseType: TextPlain); + var (response, logMessages) = await InvokeMiddleware(100, requestAcceptEncodings: acceptEncodings, responseType: TextPlain); CheckResponseNotCompressed(response, expectedBodyLength: expectedBodyLength, sendVaryHeader: true); + Assert.Equal(3, logMessages.Count); + AssertLog(logMessages.First(), LogLevel.Trace, "This request accepts compression."); + AssertLog(logMessages.Skip(1).First(), LogLevel.Trace, "Response compression is available for this Content-Type."); + AssertLog(logMessages.Skip(2).First(), LogLevel.Debug, "No matching response compression provider found."); } [Fact] public async Task Response_UnknownMimeType_NotCompressed() { - var response = await InvokeMiddleware(100, requestAcceptEncodings: new[] { "gzip" }, responseType: "text/custom"); + var (response, logMessages) = await InvokeMiddleware(100, requestAcceptEncodings: new[] { "gzip" }, responseType: "text/custom"); CheckResponseNotCompressed(response, expectedBodyLength: 100, sendVaryHeader: false); + Assert.Equal(2, logMessages.Count); + AssertLog(logMessages.First(), LogLevel.Trace, "This request accepts compression."); + AssertLog(logMessages.Skip(1).First(), LogLevel.Debug, "Response compression is not enabled for the Content-Type 'text/custom'."); } [Fact] public async Task Response_WithContentRange_NotCompressed() { - var response = await InvokeMiddleware(50, requestAcceptEncodings: new[] { "gzip" }, responseType: TextPlain, addResponseAction: (r) => + var (response, logMessages) = await InvokeMiddleware(50, requestAcceptEncodings: new[] { "gzip" }, responseType: TextPlain, addResponseAction: (r) => { r.Headers[HeaderNames.ContentRange] = "1-2/*"; }); CheckResponseNotCompressed(response, expectedBodyLength: 50, sendVaryHeader: false); + Assert.Equal(2, logMessages.Count); + AssertLog(logMessages.First(), LogLevel.Trace, "This request accepts compression."); + AssertLog(logMessages.Skip(1).First(), LogLevel.Debug, "Response compression disabled due to the Content-Range header."); } @@ -474,7 +418,7 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests { var otherContentEncoding = "something"; - var response = await InvokeMiddleware(50, requestAcceptEncodings: new[] { "gzip" }, responseType: TextPlain, addResponseAction: (r) => + var (response, logMessages) = await InvokeMiddleware(50, requestAcceptEncodings: new[] { "gzip" }, responseType: TextPlain, addResponseAction: (r) => { r.Headers[HeaderNames.ContentEncoding] = otherContentEncoding; }); @@ -482,6 +426,9 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests Assert.True(response.Content.Headers.ContentEncoding.Contains(otherContentEncoding)); Assert.False(response.Content.Headers.ContentEncoding.Contains("gzip")); Assert.Equal(50, response.Content.Headers.ContentLength); + Assert.Equal(2, logMessages.Count); + AssertLog(logMessages.First(), LogLevel.Trace, "This request accepts compression."); + AssertLog(logMessages.Skip(1).First(), LogLevel.Debug, "Response compression disabled due to the Content-Encoding header."); } [Theory] @@ -489,9 +436,15 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests [InlineData(true, 24)] public async Task Request_Https_CompressedIfEnabled(bool enableHttps, int expectedLength) { + var sink = new TestSink( + TestSink.EnableWithTypeName, + TestSink.EnableWithTypeName); + var loggerFactory = new TestLoggerFactory(sink, enabled: true); + var builder = new WebHostBuilder() .ConfigureServices(services => { + services.AddSingleton(loggerFactory); services.AddResponseCompression(options => { options.EnableForHttps = enableHttps; @@ -521,6 +474,16 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests var response = await client.SendAsync(request); Assert.Equal(expectedLength, response.Content.ReadAsByteArrayAsync().Result.Length); + + var logMessages = sink.Writes.ToList(); + if (enableHttps) + { + AssertCompressedWithLog(logMessages, "gzip"); + } + else + { + AssertLog(logMessages.Single(), LogLevel.Debug, "No response compression available for HTTPS requests. See ResponseCompressionOptions.EnableForHttps."); + } } [Theory] @@ -985,17 +948,23 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests Assert.False(fakeSendFile.Invoked); } - private Task InvokeMiddleware( + private async Task<(HttpResponseMessage, List)> InvokeMiddleware( int uncompressedBodyLength, string[] requestAcceptEncodings, string responseType, Action addResponseAction = null, Action configure = null) { + var sink = new TestSink( + TestSink.EnableWithTypeName, + TestSink.EnableWithTypeName); + var loggerFactory = new TestLoggerFactory(sink, enabled: true); + var builder = new WebHostBuilder() .ConfigureServices(services => { services.AddResponseCompression(configure ?? (_ => { })); + services.AddSingleton(loggerFactory); }) .Configure(app => { @@ -1019,7 +988,7 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests request.Headers.AcceptEncoding.Add(System.Net.Http.Headers.StringWithQualityHeaderValue.Parse(requestAcceptEncodings[i])); } - return client.SendAsync(request); + return (await client.SendAsync(request), sink.Writes.ToList()); } private void CheckResponseCompressed(HttpResponseMessage response, int expectedBodyLength, string expectedEncoding) @@ -1063,6 +1032,20 @@ namespace Microsoft.AspNetCore.ResponseCompression.Tests Assert.Equal(expectedBodyLength, response.Content.Headers.ContentLength); } + private void AssertLog(WriteContext log, LogLevel level, string message) + { + Assert.Equal(level, log.LogLevel); + Assert.Equal(message, log.State.ToString()); + } + + private void AssertCompressedWithLog(List logMessages, string provider) + { + Assert.Equal(3, logMessages.Count); + AssertLog(logMessages.First(), LogLevel.Trace, "This request accepts compression."); + AssertLog(logMessages.Skip(1).First(), LogLevel.Trace, "Response compression is available for this Content-Type."); + AssertLog(logMessages.Skip(2).First(), LogLevel.Debug, $"The response will be compressed with '{provider}'."); + } + private class FakeSendFileFeature : IHttpSendFileFeature { private readonly Stream _innerBody; From b49931ed56458e429e92a837b9a5f3b690418c9f Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Fri, 28 Sep 2018 17:10:30 -0700 Subject: [PATCH 40/45] automated: bulk infrastructure updates. Update bootstrapper scripts and remove unnecessary signing properties --- Directory.Build.props | 3 --- run.ps1 | 6 +++--- run.sh | 10 +++++----- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index b196351340..cd2933d494 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -14,9 +14,6 @@ $(MSBuildThisFileDirectory) $(MSBuildThisFileDirectory)build\Key.snk true - Microsoft - MicrosoftNuGet - true true diff --git a/run.ps1 b/run.ps1 index 3b27382468..34604c7175 100644 --- a/run.ps1 +++ b/run.ps1 @@ -52,8 +52,8 @@ in the file are overridden by command line parameters. Example config file: ```json { - "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/dev/tools/korebuild.schema.json", - "channel": "dev", + "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json", + "channel": "master", "toolsSource": "https://aspnetcore.blob.core.windows.net/buildtools" } ``` @@ -192,7 +192,7 @@ if (!$DotNetHome) { else { Join-Path $PSScriptRoot '.dotnet'} } -if (!$Channel) { $Channel = 'dev' } +if (!$Channel) { $Channel = 'master' } if (!$ToolsSource) { $ToolsSource = 'https://aspnetcore.blob.core.windows.net/buildtools' } # Execute diff --git a/run.sh b/run.sh index 02aac15874..4c1fed5646 100755 --- a/run.sh +++ b/run.sh @@ -220,7 +220,7 @@ if [ -f "$config_file" ]; then config_channel="$(jq -r 'select(.channel!=null) | .channel' "$config_file")" config_tools_source="$(jq -r 'select(.toolsSource!=null) | .toolsSource' "$config_file")" else - _error "$config_file contains invalid JSON." + __error "$config_file contains invalid JSON." exit 1 fi elif __machine_has python ; then @@ -228,7 +228,7 @@ if [ -f "$config_file" ]; then config_channel="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['channel'] if 'channel' in obj else '')")" config_tools_source="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['toolsSource'] if 'toolsSource' in obj else '')")" else - _error "$config_file contains invalid JSON." + __error "$config_file contains invalid JSON." exit 1 fi elif __machine_has python3 ; then @@ -236,11 +236,11 @@ if [ -f "$config_file" ]; then config_channel="$(python3 -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['channel'] if 'channel' in obj else '')")" config_tools_source="$(python3 -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['toolsSource'] if 'toolsSource' in obj else '')")" else - _error "$config_file contains invalid JSON." + __error "$config_file contains invalid JSON." exit 1 fi else - _error 'Missing required command: jq or python. Could not parse the JSON file.' + __error 'Missing required command: jq or python. Could not parse the JSON file.' exit 1 fi @@ -248,7 +248,7 @@ if [ -f "$config_file" ]; then [ ! -z "${config_tools_source:-}" ] && tools_source="$config_tools_source" fi -[ -z "$channel" ] && channel='dev' +[ -z "$channel" ] && channel='master' [ -z "$tools_source" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools' get_korebuild From 3fd750c1fe0342652c084ad7e44d1e196a5b7d11 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 30 Sep 2018 12:08:08 -0700 Subject: [PATCH 41/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 44 ++++++++++++++++++++-------------------- korebuild-lock.txt | 4 ++-- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 004a6aa320..4f0f3d8fe7 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,29 +4,29 @@ 0.10.13 - 2.2.0-preview1-20180918.1 - 2.2.0-preview3-35301 - 2.2.0-preview3-35301 - 2.2.0-preview3-35301 - 2.2.0-preview3-35301 - 2.2.0-preview3-35301 - 2.2.0-preview3-35301 - 2.2.0-preview3-35301 - 2.2.0-preview3-35301 - 2.2.0-preview3-35301 - 2.2.0-preview3-35301 - 2.2.0-preview3-35301 - 2.2.0-preview3-35301 - 2.2.0-preview3-35301 - 2.2.0-preview3-35301 - 2.2.0-preview3-35301 - 2.2.0-preview3-35301 - 2.2.0-preview3-35301 - 2.2.0-preview3-35301 - 2.2.0-preview3-35301 + 2.2.0-preview1-20180928.5 + 2.2.0-preview3-35359 + 2.2.0-preview3-35359 + 2.2.0-preview3-35359 + 2.2.0-preview3-35359 + 2.2.0-preview3-35359 + 2.2.0-preview3-35359 + 2.2.0-preview3-35359 + 2.2.0-preview3-35359 + 2.2.0-preview3-35359 + 2.2.0-preview3-35359 + 2.2.0-preview3-35359 + 2.2.0-preview3-35359 + 2.2.0-preview3-35359 + 2.2.0-preview3-35359 + 2.2.0-preview3-35359 + 2.2.0-preview3-35359 + 2.2.0-preview3-35359 + 2.2.0-preview3-35359 + 2.2.0-preview3-35359 2.1.3 - 2.2.0-preview2-26905-02 - 2.2.0-preview3-35301 + 2.2.0-preview3-26927-02 + 2.2.0-preview3-35359 15.6.1 4.7.49 2.0.3 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 649bf2ba0b..26697a21fa 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-20180918.1 -commithash:ad5e3fc53442741a0dd49bce437d2ac72f4b5800 +version:2.2.0-preview1-20180928.5 +commithash:43faa29f679f47b88689d645b39e6be5e0055d70 From 1610c35d55f8d64abd401c9af83b3f2bcad192ad Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 7 Oct 2018 19:08:14 +0000 Subject: [PATCH 42/45] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 44 ++++++++++++++++++++-------------------- korebuild-lock.txt | 4 ++-- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 4f0f3d8fe7..6d80d98907 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,29 +4,29 @@ 0.10.13 - 2.2.0-preview1-20180928.5 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 + 2.2.0-preview2-20181004.6 + 2.2.0-preview3-35425 + 2.2.0-preview3-35425 + 2.2.0-preview3-35425 + 2.2.0-preview3-35425 + 2.2.0-preview3-35425 + 2.2.0-preview3-35425 + 2.2.0-preview3-35425 + 2.2.0-preview3-35425 + 2.2.0-preview3-35425 + 2.2.0-preview3-35425 + 2.2.0-preview3-35425 + 2.2.0-preview3-35425 + 2.2.0-preview3-35425 + 2.2.0-preview3-35425 + 2.2.0-preview3-35425 + 2.2.0-preview3-35425 + 2.2.0-preview3-35425 + 2.2.0-preview3-35425 + 2.2.0-preview3-35425 2.1.3 - 2.2.0-preview3-26927-02 - 2.2.0-preview3-35359 + 2.2.0-preview3-27001-02 + 2.2.0-preview3-35425 15.6.1 4.7.49 2.0.3 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 26697a21fa..96fe3217ef 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-20180928.5 -commithash:43faa29f679f47b88689d645b39e6be5e0055d70 +version:2.2.0-preview2-20181004.6 +commithash:c04c4b2f5018632647f96210ab01876661302dac From 0fa31955a26afe6d2c27475a3a932bb7e87d9256 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Tue, 16 Oct 2018 12:48:11 -0700 Subject: [PATCH 43/45] Update package branding for 2.2 RTM --- version.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.props b/version.props index 761c13440a..690d61d7e3 100644 --- a/version.props +++ b/version.props @@ -1,7 +1,7 @@ 2.2.0 - preview3 + rtm $(VersionPrefix) $(VersionPrefix)-$(VersionSuffix)-final t000 @@ -10,7 +10,7 @@ $(VersionSuffix)-$(BuildNumber) 0.5.0 - preview3 + rtm $(ExperimentalVersionPrefix) $(ExperimentalVersionPrefix)-$(ExperimentalVersionSuffix)-final $(ExperimentalVersionSuffix)-$(BuildNumber) From c21cee940aa2458c514fd94ccaa247f2f7853b78 Mon Sep 17 00:00:00 2001 From: "Chris Ross (ASP.NET)" Date: Wed, 17 Oct 2018 09:24:49 -0700 Subject: [PATCH 44/45] Specify culture to int.TryParse #356 --- .../Internal/IPEndPointParser.cs | 3 ++- .../Internal/ApacheModRewrite/ConditionPatternParser.cs | 3 ++- .../Internal/IISUrlRewrite/InputParser.cs | 3 ++- .../Internal/IISUrlRewrite/UrlRewriteFileParser.cs | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.AspNetCore.HttpOverrides/Internal/IPEndPointParser.cs b/src/Microsoft.AspNetCore.HttpOverrides/Internal/IPEndPointParser.cs index a797584b94..a550ee70e4 100644 --- a/src/Microsoft.AspNetCore.HttpOverrides/Internal/IPEndPointParser.cs +++ b/src/Microsoft.AspNetCore.HttpOverrides/Internal/IPEndPointParser.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System.Globalization; using System.Net; namespace Microsoft.AspNetCore.HttpOverrides.Internal @@ -62,7 +63,7 @@ namespace Microsoft.AspNetCore.HttpOverrides.Internal if (portPart != null) { int port; - if (int.TryParse(portPart, out port)) + if (int.TryParse(portPart, NumberStyles.None, CultureInfo.InvariantCulture, out port)) { endpoint = new IPEndPoint(address, port); return true; diff --git a/src/Microsoft.AspNetCore.Rewrite/Internal/ApacheModRewrite/ConditionPatternParser.cs b/src/Microsoft.AspNetCore.Rewrite/Internal/ApacheModRewrite/ConditionPatternParser.cs index 9523b897df..53d841b0c7 100644 --- a/src/Microsoft.AspNetCore.Rewrite/Internal/ApacheModRewrite/ConditionPatternParser.cs +++ b/src/Microsoft.AspNetCore.Rewrite/Internal/ApacheModRewrite/ConditionPatternParser.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using System.Globalization; namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite { @@ -216,7 +217,7 @@ namespace Microsoft.AspNetCore.Rewrite.Internal.ApacheModRewrite { // If the type is an integer, verify operand is actually an int int res; - if (!int.TryParse(results.Operand, out res)) + if (!int.TryParse(results.Operand, NumberStyles.None, CultureInfo.InvariantCulture, out res)) { return false; } diff --git a/src/Microsoft.AspNetCore.Rewrite/Internal/IISUrlRewrite/InputParser.cs b/src/Microsoft.AspNetCore.Rewrite/Internal/IISUrlRewrite/InputParser.cs index 7dc3f8d638..53c63dfb6d 100644 --- a/src/Microsoft.AspNetCore.Rewrite/Internal/IISUrlRewrite/InputParser.cs +++ b/src/Microsoft.AspNetCore.Rewrite/Internal/IISUrlRewrite/InputParser.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.Globalization; using Microsoft.AspNetCore.Rewrite.Internal.PatternSegments; namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite @@ -181,7 +182,7 @@ namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite var res = context.Capture(); int index; - if (!int.TryParse(res, out index)) + if (!int.TryParse(res, NumberStyles.None, CultureInfo.InvariantCulture, out index)) { throw new FormatException(Resources.FormatError_InputParserInvalidInteger(res, context.Index)); } diff --git a/src/Microsoft.AspNetCore.Rewrite/Internal/IISUrlRewrite/UrlRewriteFileParser.cs b/src/Microsoft.AspNetCore.Rewrite/Internal/IISUrlRewrite/UrlRewriteFileParser.cs index 2a5b0f24a9..6bb08f41f1 100644 --- a/src/Microsoft.AspNetCore.Rewrite/Internal/IISUrlRewrite/UrlRewriteFileParser.cs +++ b/src/Microsoft.AspNetCore.Rewrite/Internal/IISUrlRewrite/UrlRewriteFileParser.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.IO; using System.Linq; using System.Xml.Linq; @@ -219,7 +220,7 @@ namespace Microsoft.AspNetCore.Rewrite.Internal.IISUrlRewrite break; case ActionType.CustomResponse: int statusCode; - if (!int.TryParse(urlAction.Attribute(RewriteTags.StatusCode)?.Value, out statusCode)) + if (!int.TryParse(urlAction.Attribute(RewriteTags.StatusCode)?.Value, NumberStyles.None, CultureInfo.InvariantCulture, out statusCode)) { throw new InvalidUrlRewriteFormatException(urlAction, "A valid status code is required"); } From 2d3ad1cb0f9872da40c6d143ce4554563971ae04 Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Tue, 23 Oct 2018 14:39:47 -0700 Subject: [PATCH 45/45] Add application/wasm to the default compression list (#377) --- .../ResponseCompressionDefaults.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionDefaults.cs b/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionDefaults.cs index 510d18786e..95b7827bb0 100644 --- a/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionDefaults.cs +++ b/src/Microsoft.AspNetCore.ResponseCompression/ResponseCompressionDefaults.cs @@ -27,6 +27,8 @@ namespace Microsoft.AspNetCore.ResponseCompression "text/xml", "application/json", "text/json", + // WebAssembly + "application/wasm", }; } }