From e42808dc63dd04b648f92f2443d22d4b68f3245e Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Mon, 16 Apr 2018 16:57:43 -0700 Subject: [PATCH 01/41] 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 24f2b00a0a..44985cedb3 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 d879127c075616dc6d4584ecf566b1f184a2996d Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Mon, 23 Apr 2018 12:09:16 -0700 Subject: [PATCH 02/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 28 ++++++++++++++-------------- korebuild-lock.txt | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index a69c09b8d9..1824a868a9 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,24 +3,24 @@ $(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.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.0.0 - 2.1.0-rc1-26419-02 + 2.1.0-preview3-26413-05 15.6.1 4.7.49 2.0.1 - 4.5.0-rc1-26419-03 - 4.5.0-rc1-26419-03 + 4.5.0-preview3-26413-02 + 4.5.0-preview3-26413-02 0.8.0 2.3.1 2.4.0-beta.1.build3945 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 cf771bcc62d5c0b40b8636886260499812a05fdd Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 29 Apr 2018 12:16:46 -0700 Subject: [PATCH 03/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 30 +++++++++++++++--------------- korebuild-lock.txt | 4 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 1824a868a9..67e004f9d7 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,24 +3,24 @@ $(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-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.0.0 - 2.1.0-preview3-26413-05 + 2.2.0-preview1-26424-04 15.6.1 4.7.49 - 2.0.1 - 4.5.0-preview3-26413-02 - 4.5.0-preview3-26413-02 + 2.0.3 + 4.5.0-preview3-26423-04 + 4.5.0-preview3-26423-04 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 816516f193afcb7ce6b564facc2a36d7e86604ea Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 6 May 2018 12:16:00 -0700 Subject: [PATCH 04/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 22 +++++++++++----------- korebuild-lock.txt | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 67e004f9d7..a36bbf2253 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,17 +3,17 @@ $(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-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.0.0 2.2.0-preview1-26424-04 15.6.1 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 1ad03de00cea80ac5ad66d8b39532d3d164f9016 Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Mon, 7 May 2018 15:11:31 -0700 Subject: [PATCH 05/41] Upgrade to netcoreapp22 --- Directory.Build.targets | 5 ++++- build/dependencies.props | 25 +++++++++++++------------ build/repo.props | 3 ++- korebuild-lock.txt | 4 ++-- samples/SampleApp/SampleApp.csproj | 4 ++-- test/Directory.Build.props | 4 ++-- 6 files changed, 25 insertions(+), 20 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index 53b3f6e1da..78626b773e 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,7 +1,10 @@ - + $(MicrosoftNETCoreApp20PackageVersion) $(MicrosoftNETCoreApp21PackageVersion) + $(MicrosoftNETCoreApp22PackageVersion) $(NETStandardLibrary20PackageVersion) + + 99.9 diff --git a/build/dependencies.props b/build/dependencies.props index a36bbf2253..3f8fad0854 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,21 +1,22 @@ - + $(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-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.0.0 2.2.0-preview1-26424-04 + 2.2.0-preview1-26502-01 15.6.1 4.7.49 2.0.3 diff --git a/build/repo.props b/build/repo.props index 78b0ce5879..17a98ac7e7 100644 --- a/build/repo.props +++ b/build/repo.props @@ -1,4 +1,4 @@ - + @@ -10,5 +10,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/SampleApp/SampleApp.csproj b/samples/SampleApp/SampleApp.csproj index 0447897f43..62c7fc6f9f 100644 --- a/samples/SampleApp/SampleApp.csproj +++ b/samples/SampleApp/SampleApp.csproj @@ -1,7 +1,7 @@ - + - netcoreapp2.1;net461 + netcoreapp2.2;net461 Exe diff --git a/test/Directory.Build.props b/test/Directory.Build.props index 63e288811c..fd74265bac 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 From a06355a7137df34f3d6403707ee4cbdd4b2b8690 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 13 May 2018 14:09:09 -0700 Subject: [PATCH 06/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 32 ++++++++++++++++---------------- korebuild-lock.txt | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 3f8fad0854..3ea3dc8392 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,27 +1,27 @@ - + $(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-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.0.0 - 2.2.0-preview1-26424-04 - 2.2.0-preview1-26502-01 + 2.1.0-rc1 + 2.2.0-preview1-26509-06 15.6.1 4.7.49 2.0.3 - 4.5.0-preview3-26423-04 - 4.5.0-preview3-26423-04 + 4.6.0-preview1-26508-04 + 4.6.0-preview1-26508-04 0.8.0 2.3.1 2.4.0-beta.1.build3945 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 bcb7bcbb7a6461204f4cefd9848e2a782ebb0a6b Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 20 May 2018 19:32:19 +0000 Subject: [PATCH 07/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 22 +++++++++++----------- korebuild-lock.txt | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 3ea3dc8392..d5657fae2d 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,17 +3,17 @@ $(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-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.0.0 2.1.0-rc1 2.2.0-preview1-26509-06 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 00ba0a424072debbee10d150aaaeff9684b8d95a Mon Sep 17 00:00:00 2001 From: "Nate McMaster (automated)" Date: Fri, 25 May 2018 16:14:22 -0700 Subject: [PATCH 08/41] 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 98b5dfab0a15309989d5d8f2a7b669b53d2ceb88 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 27 May 2018 19:15:01 +0000 Subject: [PATCH 09/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 28 ++++++++++++++-------------- korebuild-lock.txt | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index d5657fae2d..c2a6e5555f 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,25 +3,25 @@ $(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-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.0.0 2.1.0-rc1 - 2.2.0-preview1-26509-06 + 2.2.0-preview1-26526-03 15.6.1 4.7.49 2.0.3 - 4.6.0-preview1-26508-04 - 4.6.0-preview1-26508-04 + 4.6.0-preview1-26525-01 + 4.6.0-preview1-26525-01 0.8.0 2.3.1 2.4.0-beta.1.build3945 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 b3fc9aa4a5c19a99379c39f4b64aa0fffbd21644 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 3 Jun 2018 19:14:53 +0000 Subject: [PATCH 10/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 30 +++++++++++++++--------------- korebuild-lock.txt | 4 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index c2a6e5555f..0e583f1431 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,25 +3,25 @@ $(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-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.0.0 - 2.1.0-rc1 - 2.2.0-preview1-26526-03 + 2.1.0 + 2.2.0-preview1-26531-03 15.6.1 4.7.49 2.0.3 - 4.6.0-preview1-26525-01 - 4.6.0-preview1-26525-01 + 4.6.0-preview1-26531-03 + 4.6.0-preview1-26531-03 0.8.0 2.3.1 2.4.0-beta.1.build3945 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 33daa1058318e8f431182db00f3a1472f34593f5 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 5 Jun 2018 22:32:18 -0700 Subject: [PATCH 11/41] 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 e2aa6a105b..0f13dc2004 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 5c365618f37ddb259ddfaa9dad95b5d11942a02a Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Thu, 7 Jun 2018 19:35:39 +0000 Subject: [PATCH 12/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 28 ++++++++++++++-------------- korebuild-lock.txt | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 0e583f1431..37d428a3e6 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,25 +3,25 @@ $(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-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.0.0 2.1.0 - 2.2.0-preview1-26531-03 + 2.2.0-preview1-26606-01 15.6.1 4.7.49 2.0.3 - 4.6.0-preview1-26531-03 - 4.6.0-preview1-26531-03 + 4.6.0-preview1-26605-01 + 4.6.0-preview1-26605-01 0.8.0 2.3.1 2.4.0-beta.1.build3945 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 00f6ec2b87b00fa65c5bbe2d3346eda47760f541 Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Thu, 7 Jun 2018 15:45:14 -0700 Subject: [PATCH 13/41] 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 80a361c24cf37ec1269f9e548c36990d62de1c56 Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Wed, 13 Jun 2018 10:55:33 -0700 Subject: [PATCH 14/41] Set 2.1 baselines --- .../baseline.netcore.json | 66 ++- .../baseline.netcore.json | 23 +- .../baseline.netcore.json | 118 +++- .../baseline.netcore.json | 544 +++++++++++------- .../baseline.netcore.json | 62 +- .../baseline.netcore.json | 386 ++++++++++++- .../baseline.netcore.json | 284 ++++++++- 7 files changed, 1228 insertions(+), 255 deletions(-) diff --git a/src/Microsoft.AspNetCore.Http.Abstractions/baseline.netcore.json b/src/Microsoft.AspNetCore.Http.Abstractions/baseline.netcore.json index d7ef172836..f407fb08e6 100644 --- a/src/Microsoft.AspNetCore.Http.Abstractions/baseline.netcore.json +++ b/src/Microsoft.AspNetCore.Http.Abstractions/baseline.netcore.json @@ -1,5 +1,5 @@ { - "AssemblyIdentity": "Microsoft.AspNetCore.Http.Abstractions, Version=2.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", + "AssemblyIdentity": "Microsoft.AspNetCore.Http.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", "Types": [ { "Name": "Microsoft.AspNetCore.Builder.MapExtensions", @@ -910,6 +910,52 @@ "Visibility": "Public", "GenericParameter": [] }, + { + "Kind": "Method", + "Name": "get_MaxAge", + "Parameters": [], + "ReturnType": "System.Nullable", + "Virtual": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_MaxAge", + "Parameters": [ + { + "Name": "value", + "Type": "System.Nullable" + } + ], + "ReturnType": "System.Void", + "Virtual": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_IsEssential", + "Parameters": [], + "ReturnType": "System.Boolean", + "Virtual": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_IsEssential", + "Parameters": [ + { + "Name": "value", + "Type": "System.Boolean" + } + ], + "ReturnType": "System.Void", + "Virtual": true, + "Visibility": "Public", + "GenericParameter": [] + }, { "Kind": "Method", "Name": "Build", @@ -1408,6 +1454,24 @@ "Visibility": "Public", "GenericParameter": [] }, + { + "Kind": "Method", + "Name": "MatchesAny", + "Parameters": [ + { + "Name": "value", + "Type": "Microsoft.Extensions.Primitives.StringSegment" + }, + { + "Name": "patterns", + "Type": "System.Collections.Generic.IList" + } + ], + "ReturnType": "System.Boolean", + "Static": true, + "Visibility": "Public", + "GenericParameter": [] + }, { "Kind": "Method", "Name": "Equals", diff --git a/src/Microsoft.AspNetCore.Http.Extensions/baseline.netcore.json b/src/Microsoft.AspNetCore.Http.Extensions/baseline.netcore.json index 92a4a49478..286133ea54 100644 --- a/src/Microsoft.AspNetCore.Http.Extensions/baseline.netcore.json +++ b/src/Microsoft.AspNetCore.Http.Extensions/baseline.netcore.json @@ -1,5 +1,5 @@ { - "AssemblyIdentity": "Microsoft.AspNetCore.Http.Extensions, Version=2.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", + "AssemblyIdentity": "Microsoft.AspNetCore.Http.Extensions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", "Types": [ { "Name": "Microsoft.AspNetCore.Http.HeaderDictionaryTypeExtensions", @@ -772,6 +772,27 @@ "Visibility": "Public", "GenericParameter": [] }, + { + "Kind": "Method", + "Name": "get_Referer", + "Parameters": [], + "ReturnType": "System.Uri", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_Referer", + "Parameters": [ + { + "Name": "value", + "Type": "System.Uri" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, { "Kind": "Method", "Name": "Get", diff --git a/src/Microsoft.AspNetCore.Http.Features/baseline.netcore.json b/src/Microsoft.AspNetCore.Http.Features/baseline.netcore.json index 9fa1b94894..6af2ceccf9 100644 --- a/src/Microsoft.AspNetCore.Http.Features/baseline.netcore.json +++ b/src/Microsoft.AspNetCore.Http.Features/baseline.netcore.json @@ -1,5 +1,5 @@ { - "AssemblyIdentity": "Microsoft.AspNetCore.Http.Features, Version=2.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", + "AssemblyIdentity": "Microsoft.AspNetCore.Http.Features, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", "Types": [ { "Name": "Microsoft.AspNetCore.Http.CookieOptions", @@ -133,6 +133,48 @@ "Visibility": "Public", "GenericParameter": [] }, + { + "Kind": "Method", + "Name": "get_MaxAge", + "Parameters": [], + "ReturnType": "System.Nullable", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_MaxAge", + "Parameters": [ + { + "Name": "value", + "Type": "System.Nullable" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_IsEssential", + "Parameters": [], + "ReturnType": "System.Boolean", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_IsEssential", + "Parameters": [ + { + "Name": "value", + "Type": "System.Boolean" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, { "Kind": "Constructor", "Name": ".ctor", @@ -807,6 +849,17 @@ "Microsoft.AspNetCore.Http.Features.IFeatureCollection" ], "Members": [ + { + "Kind": "Method", + "Name": "GetEnumerator", + "Parameters": [], + "ReturnType": "System.Collections.Generic.IEnumerator>", + "Sealed": true, + "Virtual": true, + "ImplementedInterface": "System.Collections.Generic.IEnumerable>", + "Visibility": "Public", + "GenericParameter": [] + }, { "Kind": "Method", "Name": "get_Revision", @@ -864,17 +917,6 @@ "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": "Method", "Name": "Get", @@ -2122,6 +2164,58 @@ ], "GenericParameters": [] }, + { + "Name": "Microsoft.AspNetCore.Http.Features.ITrackingConsentFeature", + "Visibility": "Public", + "Kind": "Interface", + "Abstract": true, + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "get_IsConsentNeeded", + "Parameters": [], + "ReturnType": "System.Boolean", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_HasConsent", + "Parameters": [], + "ReturnType": "System.Boolean", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_CanTrack", + "Parameters": [], + "ReturnType": "System.Boolean", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "GrantConsent", + "Parameters": [], + "ReturnType": "System.Void", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "WithdrawConsent", + "Parameters": [], + "ReturnType": "System.Void", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "CreateConsentCookie", + "Parameters": [], + "ReturnType": "System.String", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, { "Name": "Microsoft.AspNetCore.Http.Features.Authentication.AuthenticateContext", "Visibility": "Public", diff --git a/src/Microsoft.AspNetCore.Http/baseline.netcore.json b/src/Microsoft.AspNetCore.Http/baseline.netcore.json index 0f2f607f6f..932bd2b6e4 100644 --- a/src/Microsoft.AspNetCore.Http/baseline.netcore.json +++ b/src/Microsoft.AspNetCore.Http/baseline.netcore.json @@ -1,5 +1,5 @@ { - "AssemblyIdentity": "Microsoft.AspNetCore.Http, Version=2.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", + "AssemblyIdentity": "Microsoft.AspNetCore.Http, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", "Types": [ { "Name": "Microsoft.AspNetCore.Http.DefaultHttpContext", @@ -388,6 +388,94 @@ ], "GenericParameters": [] }, + { + "Name": "Microsoft.AspNetCore.Http.HttpRequestRewindExtensions", + "Visibility": "Public", + "Kind": "Class", + "Abstract": true, + "Static": true, + "Sealed": true, + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "EnableBuffering", + "Parameters": [ + { + "Name": "request", + "Type": "Microsoft.AspNetCore.Http.HttpRequest" + } + ], + "ReturnType": "System.Void", + "Static": true, + "Extension": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "EnableBuffering", + "Parameters": [ + { + "Name": "request", + "Type": "Microsoft.AspNetCore.Http.HttpRequest" + }, + { + "Name": "bufferThreshold", + "Type": "System.Int32" + } + ], + "ReturnType": "System.Void", + "Static": true, + "Extension": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "EnableBuffering", + "Parameters": [ + { + "Name": "request", + "Type": "Microsoft.AspNetCore.Http.HttpRequest" + }, + { + "Name": "bufferLimit", + "Type": "System.Int64" + } + ], + "ReturnType": "System.Void", + "Static": true, + "Extension": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "EnableBuffering", + "Parameters": [ + { + "Name": "request", + "Type": "Microsoft.AspNetCore.Http.HttpRequest" + }, + { + "Name": "bufferThreshold", + "Type": "System.Int32" + }, + { + "Name": "bufferLimit", + "Type": "System.Int64" + } + ], + "ReturnType": "System.Void", + "Static": true, + "Extension": true, + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, { "Name": "Microsoft.AspNetCore.Http.FormCollection", "Visibility": "Public", @@ -528,6 +616,202 @@ "Microsoft.AspNetCore.Http.IHeaderDictionary" ], "Members": [ + { + "Kind": "Method", + "Name": "get_Keys", + "Parameters": [], + "ReturnType": "System.Collections.Generic.ICollection", + "Sealed": true, + "Virtual": true, + "ImplementedInterface": "System.Collections.Generic.IDictionary", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_Values", + "Parameters": [], + "ReturnType": "System.Collections.Generic.ICollection", + "Sealed": true, + "Virtual": true, + "ImplementedInterface": "System.Collections.Generic.IDictionary", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "ContainsKey", + "Parameters": [ + { + "Name": "key", + "Type": "System.String" + } + ], + "ReturnType": "System.Boolean", + "Sealed": true, + "Virtual": true, + "ImplementedInterface": "System.Collections.Generic.IDictionary", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "Add", + "Parameters": [ + { + "Name": "key", + "Type": "System.String" + }, + { + "Name": "value", + "Type": "Microsoft.Extensions.Primitives.StringValues" + } + ], + "ReturnType": "System.Void", + "Sealed": true, + "Virtual": true, + "ImplementedInterface": "System.Collections.Generic.IDictionary", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "Remove", + "Parameters": [ + { + "Name": "key", + "Type": "System.String" + } + ], + "ReturnType": "System.Boolean", + "Sealed": true, + "Virtual": true, + "ImplementedInterface": "System.Collections.Generic.IDictionary", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "TryGetValue", + "Parameters": [ + { + "Name": "key", + "Type": "System.String" + }, + { + "Name": "value", + "Type": "Microsoft.Extensions.Primitives.StringValues", + "Direction": "Out" + } + ], + "ReturnType": "System.Boolean", + "Sealed": true, + "Virtual": true, + "ImplementedInterface": "System.Collections.Generic.IDictionary", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_Count", + "Parameters": [], + "ReturnType": "System.Int32", + "Sealed": true, + "Virtual": true, + "ImplementedInterface": "System.Collections.Generic.ICollection>", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_IsReadOnly", + "Parameters": [], + "ReturnType": "System.Boolean", + "Sealed": true, + "Virtual": true, + "ImplementedInterface": "System.Collections.Generic.ICollection>", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "Add", + "Parameters": [ + { + "Name": "item", + "Type": "System.Collections.Generic.KeyValuePair" + } + ], + "ReturnType": "System.Void", + "Sealed": true, + "Virtual": true, + "ImplementedInterface": "System.Collections.Generic.ICollection>", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "Clear", + "Parameters": [], + "ReturnType": "System.Void", + "Sealed": true, + "Virtual": true, + "ImplementedInterface": "System.Collections.Generic.ICollection>", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "Contains", + "Parameters": [ + { + "Name": "item", + "Type": "System.Collections.Generic.KeyValuePair" + } + ], + "ReturnType": "System.Boolean", + "Sealed": true, + "Virtual": true, + "ImplementedInterface": "System.Collections.Generic.ICollection>", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "CopyTo", + "Parameters": [ + { + "Name": "array", + "Type": "System.Collections.Generic.KeyValuePair[]" + }, + { + "Name": "arrayIndex", + "Type": "System.Int32" + } + ], + "ReturnType": "System.Void", + "Sealed": true, + "Virtual": true, + "ImplementedInterface": "System.Collections.Generic.ICollection>", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "Remove", + "Parameters": [ + { + "Name": "item", + "Type": "System.Collections.Generic.KeyValuePair" + } + ], + "ReturnType": "System.Boolean", + "Sealed": true, + "Virtual": true, + "ImplementedInterface": "System.Collections.Generic.ICollection>", + "Visibility": "Public", + "GenericParameter": [] + }, { "Kind": "Method", "Name": "get_Item", @@ -593,197 +877,14 @@ }, { "Kind": "Method", - "Name": "get_Count", - "Parameters": [], - "ReturnType": "System.Int32", - "Sealed": true, - "Virtual": true, - "ImplementedInterface": "System.Collections.Generic.ICollection>", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_IsReadOnly", - "Parameters": [], - "ReturnType": "System.Boolean", - "Sealed": true, - "Virtual": true, - "ImplementedInterface": "System.Collections.Generic.ICollection>", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Keys", - "Parameters": [], - "ReturnType": "System.Collections.Generic.ICollection", - "Sealed": true, - "Virtual": true, - "ImplementedInterface": "System.Collections.Generic.IDictionary", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Values", - "Parameters": [], - "ReturnType": "System.Collections.Generic.ICollection", - "Sealed": true, - "Virtual": true, - "ImplementedInterface": "System.Collections.Generic.IDictionary", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Add", + "Name": "set_IsReadOnly", "Parameters": [ - { - "Name": "item", - "Type": "System.Collections.Generic.KeyValuePair" - } - ], - "ReturnType": "System.Void", - "Sealed": true, - "Virtual": true, - "ImplementedInterface": "System.Collections.Generic.ICollection>", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Add", - "Parameters": [ - { - "Name": "key", - "Type": "System.String" - }, { "Name": "value", - "Type": "Microsoft.Extensions.Primitives.StringValues" + "Type": "System.Boolean" } ], "ReturnType": "System.Void", - "Sealed": true, - "Virtual": true, - "ImplementedInterface": "System.Collections.Generic.IDictionary", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Clear", - "Parameters": [], - "ReturnType": "System.Void", - "Sealed": true, - "Virtual": true, - "ImplementedInterface": "System.Collections.Generic.ICollection>", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Contains", - "Parameters": [ - { - "Name": "item", - "Type": "System.Collections.Generic.KeyValuePair" - } - ], - "ReturnType": "System.Boolean", - "Sealed": true, - "Virtual": true, - "ImplementedInterface": "System.Collections.Generic.ICollection>", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ContainsKey", - "Parameters": [ - { - "Name": "key", - "Type": "System.String" - } - ], - "ReturnType": "System.Boolean", - "Sealed": true, - "Virtual": true, - "ImplementedInterface": "System.Collections.Generic.IDictionary", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "CopyTo", - "Parameters": [ - { - "Name": "array", - "Type": "System.Collections.Generic.KeyValuePair[]" - }, - { - "Name": "arrayIndex", - "Type": "System.Int32" - } - ], - "ReturnType": "System.Void", - "Sealed": true, - "Virtual": true, - "ImplementedInterface": "System.Collections.Generic.ICollection>", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Remove", - "Parameters": [ - { - "Name": "item", - "Type": "System.Collections.Generic.KeyValuePair" - } - ], - "ReturnType": "System.Boolean", - "Sealed": true, - "Virtual": true, - "ImplementedInterface": "System.Collections.Generic.ICollection>", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Remove", - "Parameters": [ - { - "Name": "key", - "Type": "System.String" - } - ], - "ReturnType": "System.Boolean", - "Sealed": true, - "Virtual": true, - "ImplementedInterface": "System.Collections.Generic.IDictionary", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "TryGetValue", - "Parameters": [ - { - "Name": "key", - "Type": "System.String" - }, - { - "Name": "value", - "Type": "Microsoft.Extensions.Primitives.StringValues", - "Direction": "Out" - } - ], - "ReturnType": "System.Boolean", - "Sealed": true, - "Virtual": true, - "ImplementedInterface": "System.Collections.Generic.IDictionary", "Visibility": "Public", "GenericParameter": [] }, @@ -2561,6 +2662,33 @@ ], "GenericParameters": [] }, + { + "Name": "Microsoft.Extensions.DependencyInjection.HttpServiceCollectionExtensions", + "Visibility": "Public", + "Kind": "Class", + "Abstract": true, + "Static": true, + "Sealed": true, + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "AddHttpContextAccessor", + "Parameters": [ + { + "Name": "services", + "Type": "Microsoft.Extensions.DependencyInjection.IServiceCollection" + } + ], + "ReturnType": "Microsoft.Extensions.DependencyInjection.IServiceCollection", + "Static": true, + "Extension": true, + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, { "Name": "Microsoft.AspNetCore.Http.FormCollection+Enumerator", "Visibility": "Public", @@ -2570,6 +2698,17 @@ "System.Collections.Generic.IEnumerator>" ], "Members": [ + { + "Kind": "Method", + "Name": "Dispose", + "Parameters": [], + "ReturnType": "System.Void", + "Sealed": true, + "Virtual": true, + "ImplementedInterface": "System.IDisposable", + "Visibility": "Public", + "GenericParameter": [] + }, { "Kind": "Method", "Name": "MoveNext", @@ -2591,17 +2730,6 @@ "ImplementedInterface": "System.Collections.Generic.IEnumerator>", "Visibility": "Public", "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Dispose", - "Parameters": [], - "ReturnType": "System.Void", - "Sealed": true, - "Virtual": true, - "ImplementedInterface": "System.IDisposable", - "Visibility": "Public", - "GenericParameter": [] } ], "GenericParameters": [] @@ -2615,6 +2743,17 @@ "System.Collections.Generic.IEnumerator>" ], "Members": [ + { + "Kind": "Method", + "Name": "Dispose", + "Parameters": [], + "ReturnType": "System.Void", + "Sealed": true, + "Virtual": true, + "ImplementedInterface": "System.IDisposable", + "Visibility": "Public", + "GenericParameter": [] + }, { "Kind": "Method", "Name": "MoveNext", @@ -2636,17 +2775,6 @@ "ImplementedInterface": "System.Collections.Generic.IEnumerator>", "Visibility": "Public", "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Dispose", - "Parameters": [], - "ReturnType": "System.Void", - "Sealed": true, - "Virtual": true, - "ImplementedInterface": "System.IDisposable", - "Visibility": "Public", - "GenericParameter": [] } ], "GenericParameters": [] diff --git a/src/Microsoft.AspNetCore.Owin/baseline.netcore.json b/src/Microsoft.AspNetCore.Owin/baseline.netcore.json index 50b5847f9e..8211307418 100644 --- a/src/Microsoft.AspNetCore.Owin/baseline.netcore.json +++ b/src/Microsoft.AspNetCore.Owin/baseline.netcore.json @@ -1,5 +1,5 @@ { - "AssemblyIdentity": "Microsoft.AspNetCore.Owin, Version=2.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", + "AssemblyIdentity": "Microsoft.AspNetCore.Owin, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", "Types": [ { "Name": "Microsoft.AspNetCore.Builder.OwinExtensions", @@ -160,14 +160,6 @@ "System.Collections.Generic.IDictionary" ], "Members": [ - { - "Kind": "Method", - "Name": "get_FeatureMaps", - "Parameters": [], - "ReturnType": "System.Collections.Generic.IDictionary", - "Visibility": "Public", - "GenericParameter": [] - }, { "Kind": "Method", "Name": "GetEnumerator", @@ -179,6 +171,14 @@ "Visibility": "Public", "GenericParameter": [] }, + { + "Kind": "Method", + "Name": "get_FeatureMaps", + "Parameters": [], + "ReturnType": "System.Collections.Generic.IDictionary", + "Visibility": "Public", + "GenericParameter": [] + }, { "Kind": "Constructor", "Name": ".ctor", @@ -257,6 +257,17 @@ "Microsoft.AspNetCore.Owin.IOwinEnvironmentFeature" ], "Members": [ + { + "Kind": "Method", + "Name": "GetEnumerator", + "Parameters": [], + "ReturnType": "System.Collections.Generic.IEnumerator>", + "Sealed": true, + "Virtual": true, + "ImplementedInterface": "System.Collections.Generic.IEnumerable>", + "Visibility": "Public", + "GenericParameter": [] + }, { "Kind": "Method", "Name": "get_Environment", @@ -432,17 +443,6 @@ } ] }, - { - "Kind": "Method", - "Name": "GetEnumerator", - "Parameters": [], - "ReturnType": "System.Collections.Generic.IEnumerator>", - "Sealed": true, - "Virtual": true, - "ImplementedInterface": "System.Collections.Generic.IEnumerable>", - "Visibility": "Public", - "GenericParameter": [] - }, { "Kind": "Method", "Name": "Dispose", @@ -558,6 +558,17 @@ "BaseType": "System.Net.WebSockets.WebSocket", "ImplementedInterfaces": [], "Members": [ + { + "Kind": "Method", + "Name": "Dispose", + "Parameters": [], + "ReturnType": "System.Void", + "Virtual": true, + "Override": true, + "ImplementedInterface": "System.IDisposable", + "Visibility": "Public", + "GenericParameter": [] + }, { "Kind": "Method", "Name": "get_CloseStatus", @@ -700,17 +711,6 @@ "Visibility": "Public", "GenericParameter": [] }, - { - "Kind": "Method", - "Name": "Dispose", - "Parameters": [], - "ReturnType": "System.Void", - "Virtual": true, - "Override": true, - "ImplementedInterface": "System.IDisposable", - "Visibility": "Public", - "GenericParameter": [] - }, { "Kind": "Constructor", "Name": ".ctor", diff --git a/src/Microsoft.AspNetCore.WebUtilities/baseline.netcore.json b/src/Microsoft.AspNetCore.WebUtilities/baseline.netcore.json index e8334021d6..896fe0fcb3 100644 --- a/src/Microsoft.AspNetCore.WebUtilities/baseline.netcore.json +++ b/src/Microsoft.AspNetCore.WebUtilities/baseline.netcore.json @@ -1,5 +1,5 @@ { - "AssemblyIdentity": "Microsoft.AspNetCore.WebUtilities, Version=2.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", + "AssemblyIdentity": "Microsoft.AspNetCore.WebUtilities, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", "Types": [ { "Name": "Microsoft.AspNetCore.WebUtilities.WebEncoders", @@ -213,6 +213,390 @@ ], "GenericParameters": [] }, + { + "Name": "Microsoft.AspNetCore.WebUtilities.BufferedReadStream", + "Visibility": "Public", + "Kind": "Class", + "BaseType": "System.IO.Stream", + "ImplementedInterfaces": [], + "Members": [ + { + "Kind": "Method", + "Name": "get_BufferedData", + "Parameters": [], + "ReturnType": "System.ArraySegment", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_CanRead", + "Parameters": [], + "ReturnType": "System.Boolean", + "Virtual": true, + "Override": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_CanSeek", + "Parameters": [], + "ReturnType": "System.Boolean", + "Virtual": true, + "Override": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_CanTimeout", + "Parameters": [], + "ReturnType": "System.Boolean", + "Virtual": true, + "Override": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_CanWrite", + "Parameters": [], + "ReturnType": "System.Boolean", + "Virtual": true, + "Override": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_Length", + "Parameters": [], + "ReturnType": "System.Int64", + "Virtual": true, + "Override": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_Position", + "Parameters": [], + "ReturnType": "System.Int64", + "Virtual": true, + "Override": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "set_Position", + "Parameters": [ + { + "Name": "value", + "Type": "System.Int64" + } + ], + "ReturnType": "System.Void", + "Virtual": true, + "Override": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "Seek", + "Parameters": [ + { + "Name": "offset", + "Type": "System.Int64" + }, + { + "Name": "origin", + "Type": "System.IO.SeekOrigin" + } + ], + "ReturnType": "System.Int64", + "Virtual": true, + "Override": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "SetLength", + "Parameters": [ + { + "Name": "value", + "Type": "System.Int64" + } + ], + "ReturnType": "System.Void", + "Virtual": true, + "Override": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "Dispose", + "Parameters": [ + { + "Name": "disposing", + "Type": "System.Boolean" + } + ], + "ReturnType": "System.Void", + "Virtual": true, + "Override": true, + "Visibility": "Protected", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "Flush", + "Parameters": [], + "ReturnType": "System.Void", + "Virtual": true, + "Override": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "FlushAsync", + "Parameters": [ + { + "Name": "cancellationToken", + "Type": "System.Threading.CancellationToken" + } + ], + "ReturnType": "System.Threading.Tasks.Task", + "Virtual": true, + "Override": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "Write", + "Parameters": [ + { + "Name": "buffer", + "Type": "System.Byte[]" + }, + { + "Name": "offset", + "Type": "System.Int32" + }, + { + "Name": "count", + "Type": "System.Int32" + } + ], + "ReturnType": "System.Void", + "Virtual": true, + "Override": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "WriteAsync", + "Parameters": [ + { + "Name": "buffer", + "Type": "System.Byte[]" + }, + { + "Name": "offset", + "Type": "System.Int32" + }, + { + "Name": "count", + "Type": "System.Int32" + }, + { + "Name": "cancellationToken", + "Type": "System.Threading.CancellationToken" + } + ], + "ReturnType": "System.Threading.Tasks.Task", + "Virtual": true, + "Override": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "Read", + "Parameters": [ + { + "Name": "buffer", + "Type": "System.Byte[]" + }, + { + "Name": "offset", + "Type": "System.Int32" + }, + { + "Name": "count", + "Type": "System.Int32" + } + ], + "ReturnType": "System.Int32", + "Virtual": true, + "Override": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "ReadAsync", + "Parameters": [ + { + "Name": "buffer", + "Type": "System.Byte[]" + }, + { + "Name": "offset", + "Type": "System.Int32" + }, + { + "Name": "count", + "Type": "System.Int32" + }, + { + "Name": "cancellationToken", + "Type": "System.Threading.CancellationToken" + } + ], + "ReturnType": "System.Threading.Tasks.Task", + "Virtual": true, + "Override": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "EnsureBuffered", + "Parameters": [], + "ReturnType": "System.Boolean", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "EnsureBufferedAsync", + "Parameters": [ + { + "Name": "cancellationToken", + "Type": "System.Threading.CancellationToken" + } + ], + "ReturnType": "System.Threading.Tasks.Task", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "EnsureBuffered", + "Parameters": [ + { + "Name": "minCount", + "Type": "System.Int32" + } + ], + "ReturnType": "System.Boolean", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "EnsureBufferedAsync", + "Parameters": [ + { + "Name": "minCount", + "Type": "System.Int32" + }, + { + "Name": "cancellationToken", + "Type": "System.Threading.CancellationToken" + } + ], + "ReturnType": "System.Threading.Tasks.Task", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "ReadLine", + "Parameters": [ + { + "Name": "lengthLimit", + "Type": "System.Int32" + } + ], + "ReturnType": "System.String", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "ReadLineAsync", + "Parameters": [ + { + "Name": "lengthLimit", + "Type": "System.Int32" + }, + { + "Name": "cancellationToken", + "Type": "System.Threading.CancellationToken" + } + ], + "ReturnType": "System.Threading.Tasks.Task", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Constructor", + "Name": ".ctor", + "Parameters": [ + { + "Name": "inner", + "Type": "System.IO.Stream" + }, + { + "Name": "bufferSize", + "Type": "System.Int32" + } + ], + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Constructor", + "Name": ".ctor", + "Parameters": [ + { + "Name": "inner", + "Type": "System.IO.Stream" + }, + { + "Name": "bufferSize", + "Type": "System.Int32" + }, + { + "Name": "bytePool", + "Type": "System.Buffers.ArrayPool" + } + ], + "Visibility": "Public", + "GenericParameter": [] + } + ], + "GenericParameters": [] + }, { "Name": "Microsoft.AspNetCore.WebUtilities.FileBufferingReadStream", "Visibility": "Public", diff --git a/src/Microsoft.Net.Http.Headers/baseline.netcore.json b/src/Microsoft.Net.Http.Headers/baseline.netcore.json index b29b4825ee..476f8150a7 100644 --- a/src/Microsoft.Net.Http.Headers/baseline.netcore.json +++ b/src/Microsoft.Net.Http.Headers/baseline.netcore.json @@ -1,5 +1,5 @@ { - "AssemblyIdentity": "Microsoft.Net.Http.Headers, Version=2.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", + "AssemblyIdentity": "Microsoft.Net.Http.Headers, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", "Types": [ { "Name": "Microsoft.Net.Http.Headers.CacheControlHeaderValue", @@ -1511,6 +1511,94 @@ "Constant": true, "Literal": "\"Accept-Ranges\"" }, + { + "Kind": "Field", + "Name": "AccessControlAllowCredentials", + "Parameters": [], + "ReturnType": "System.String", + "Static": true, + "Visibility": "Public", + "GenericParameter": [], + "Constant": true, + "Literal": "\"Access-Control-Allow-Credentials\"" + }, + { + "Kind": "Field", + "Name": "AccessControlAllowHeaders", + "Parameters": [], + "ReturnType": "System.String", + "Static": true, + "Visibility": "Public", + "GenericParameter": [], + "Constant": true, + "Literal": "\"Access-Control-Allow-Headers\"" + }, + { + "Kind": "Field", + "Name": "AccessControlAllowMethods", + "Parameters": [], + "ReturnType": "System.String", + "Static": true, + "Visibility": "Public", + "GenericParameter": [], + "Constant": true, + "Literal": "\"Access-Control-Allow-Methods\"" + }, + { + "Kind": "Field", + "Name": "AccessControlAllowOrigin", + "Parameters": [], + "ReturnType": "System.String", + "Static": true, + "Visibility": "Public", + "GenericParameter": [], + "Constant": true, + "Literal": "\"Access-Control-Allow-Origin\"" + }, + { + "Kind": "Field", + "Name": "AccessControlExposeHeaders", + "Parameters": [], + "ReturnType": "System.String", + "Static": true, + "Visibility": "Public", + "GenericParameter": [], + "Constant": true, + "Literal": "\"Access-Control-Expose-Headers\"" + }, + { + "Kind": "Field", + "Name": "AccessControlMaxAge", + "Parameters": [], + "ReturnType": "System.String", + "Static": true, + "Visibility": "Public", + "GenericParameter": [], + "Constant": true, + "Literal": "\"Access-Control-Max-Age\"" + }, + { + "Kind": "Field", + "Name": "AccessControlRequestHeaders", + "Parameters": [], + "ReturnType": "System.String", + "Static": true, + "Visibility": "Public", + "GenericParameter": [], + "Constant": true, + "Literal": "\"Access-Control-Request-Headers\"" + }, + { + "Kind": "Field", + "Name": "AccessControlRequestMethod", + "Parameters": [], + "ReturnType": "System.String", + "Static": true, + "Visibility": "Public", + "GenericParameter": [], + "Constant": true, + "Literal": "\"Access-Control-Request-Method\"" + }, { "Kind": "Field", "Name": "Age", @@ -1533,6 +1621,17 @@ "Constant": true, "Literal": "\"Allow\"" }, + { + "Kind": "Field", + "Name": "Authority", + "Parameters": [], + "ReturnType": "System.String", + "Static": true, + "Visibility": "Public", + "GenericParameter": [], + "Constant": true, + "Literal": "\":authority\"" + }, { "Kind": "Field", "Name": "Authorization", @@ -1643,6 +1742,28 @@ "Constant": true, "Literal": "\"Content-Range\"" }, + { + "Kind": "Field", + "Name": "ContentSecurityPolicy", + "Parameters": [], + "ReturnType": "System.String", + "Static": true, + "Visibility": "Public", + "GenericParameter": [], + "Constant": true, + "Literal": "\"Content-Security-Policy\"" + }, + { + "Kind": "Field", + "Name": "ContentSecurityPolicyReportOnly", + "Parameters": [], + "ReturnType": "System.String", + "Static": true, + "Visibility": "Public", + "GenericParameter": [], + "Constant": true, + "Literal": "\"Content-Security-Policy-Report-Only\"" + }, { "Kind": "Field", "Name": "ContentType", @@ -1819,6 +1940,39 @@ "Constant": true, "Literal": "\"Max-Forwards\"" }, + { + "Kind": "Field", + "Name": "Method", + "Parameters": [], + "ReturnType": "System.String", + "Static": true, + "Visibility": "Public", + "GenericParameter": [], + "Constant": true, + "Literal": "\":method\"" + }, + { + "Kind": "Field", + "Name": "Origin", + "Parameters": [], + "ReturnType": "System.String", + "Static": true, + "Visibility": "Public", + "GenericParameter": [], + "Constant": true, + "Literal": "\"Origin\"" + }, + { + "Kind": "Field", + "Name": "Path", + "Parameters": [], + "ReturnType": "System.String", + "Static": true, + "Visibility": "Public", + "GenericParameter": [], + "Constant": true, + "Literal": "\":path\"" + }, { "Kind": "Field", "Name": "Pragma", @@ -1885,6 +2039,17 @@ "Constant": true, "Literal": "\"Retry-After\"" }, + { + "Kind": "Field", + "Name": "Scheme", + "Parameters": [], + "ReturnType": "System.String", + "Static": true, + "Visibility": "Public", + "GenericParameter": [], + "Constant": true, + "Literal": "\":scheme\"" + }, { "Kind": "Field", "Name": "Server", @@ -1907,6 +2072,28 @@ "Constant": true, "Literal": "\"Set-Cookie\"" }, + { + "Kind": "Field", + "Name": "Status", + "Parameters": [], + "ReturnType": "System.String", + "Static": true, + "Visibility": "Public", + "GenericParameter": [], + "Constant": true, + "Literal": "\":status\"" + }, + { + "Kind": "Field", + "Name": "StrictTransportSecurity", + "Parameters": [], + "ReturnType": "System.String", + "Static": true, + "Visibility": "Public", + "GenericParameter": [], + "Constant": true, + "Literal": "\"Strict-Transport-Security\"" + }, { "Kind": "Field", "Name": "TE", @@ -2220,6 +2407,48 @@ "Static": true, "Visibility": "Public", "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "IsQuoted", + "Parameters": [ + { + "Name": "input", + "Type": "Microsoft.Extensions.Primitives.StringSegment" + } + ], + "ReturnType": "System.Boolean", + "Static": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "UnescapeAsQuotedString", + "Parameters": [ + { + "Name": "input", + "Type": "Microsoft.Extensions.Primitives.StringSegment" + } + ], + "ReturnType": "Microsoft.Extensions.Primitives.StringSegment", + "Static": true, + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "EscapeAsQuotedString", + "Parameters": [ + { + "Name": "input", + "Type": "Microsoft.Extensions.Primitives.StringSegment" + } + ], + "ReturnType": "Microsoft.Extensions.Primitives.StringSegment", + "Static": true, + "Visibility": "Public", + "GenericParameter": [] } ], "GenericParameters": [] @@ -2359,6 +2588,30 @@ "Visibility": "Public", "GenericParameter": [] }, + { + "Kind": "Method", + "Name": "get_SubTypeWithoutSuffix", + "Parameters": [], + "ReturnType": "Microsoft.Extensions.Primitives.StringSegment", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_Suffix", + "Parameters": [], + "ReturnType": "Microsoft.Extensions.Primitives.StringSegment", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "get_Facets", + "Parameters": [], + "ReturnType": "System.Collections.Generic.IEnumerable", + "Visibility": "Public", + "GenericParameter": [] + }, { "Kind": "Method", "Name": "get_MatchesAllTypes", @@ -2375,6 +2628,14 @@ "Visibility": "Public", "GenericParameter": [] }, + { + "Kind": "Method", + "Name": "get_MatchesAllSubTypesWithoutSuffix", + "Parameters": [], + "ReturnType": "System.Boolean", + "Visibility": "Public", + "GenericParameter": [] + }, { "Kind": "Method", "Name": "get_IsReadOnly", @@ -2701,6 +2962,27 @@ "Visibility": "Public", "GenericParameter": [] }, + { + "Kind": "Method", + "Name": "GetUnescapedValue", + "Parameters": [], + "ReturnType": "Microsoft.Extensions.Primitives.StringSegment", + "Visibility": "Public", + "GenericParameter": [] + }, + { + "Kind": "Method", + "Name": "SetAndEscapeValue", + "Parameters": [ + { + "Name": "value", + "Type": "Microsoft.Extensions.Primitives.StringSegment" + } + ], + "ReturnType": "System.Void", + "Visibility": "Public", + "GenericParameter": [] + }, { "Kind": "Method", "Name": "Parse", From 6d6b7785d27264b377b385b00ea5fc80b7f21e3a Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Mon, 25 Jun 2018 11:15:38 -0700 Subject: [PATCH 15/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 28 ++++++++++++++-------------- korebuild-lock.txt | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 37d428a3e6..127314b44e 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,25 +3,25 @@ $(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-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.0.0 2.1.0 - 2.2.0-preview1-26606-01 + 2.2.0-preview1-26618-02 15.6.1 4.7.49 2.0.3 - 4.6.0-preview1-26605-01 - 4.6.0-preview1-26605-01 + 4.6.0-preview1-26617-01 + 4.6.0-preview1-26617-01 0.8.0 2.3.1 2.4.0-beta.1.build3945 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 0f4f1950f15323e7cda7665b7e277efdd6034531 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Tue, 26 Jun 2018 11:49:12 -0700 Subject: [PATCH 16/41] Attempt to make it easier to detect when the request is done (#1021) - Today the async local reference to the HttpContext flows when the execution context is captured. When the http request has ended, the HttpContext property will return the reference to an invalid HttpContext instead of returning null. This change stores both the request id and the HttpContext and makes sure both match before returning anything valid. - This is still racy but should catch more cases of people doing bad things. - There will still be issue if people store the context in a local and use that reference instead of accessing it through the property getter but we can live with that. - Set the TraceIdentifier to null in the default HttpContextFactory - Added tests --- .../HttpContextAccessor.cs | 9 +- .../HttpContextFactory.cs | 4 + .../HttpContextAccessorTests.cs | 197 ++++++++++++++++++ .../HttpContextFactoryTests.cs | 22 +- 4 files changed, 228 insertions(+), 4 deletions(-) create mode 100644 test/Microsoft.AspNetCore.Http.Tests/HttpContextAccessorTests.cs diff --git a/src/Microsoft.AspNetCore.Http/HttpContextAccessor.cs b/src/Microsoft.AspNetCore.Http/HttpContextAccessor.cs index 5a4676234c..897c27f734 100644 --- a/src/Microsoft.AspNetCore.Http/HttpContextAccessor.cs +++ b/src/Microsoft.AspNetCore.Http/HttpContextAccessor.cs @@ -7,17 +7,20 @@ namespace Microsoft.AspNetCore.Http { public class HttpContextAccessor : IHttpContextAccessor { - private static AsyncLocal _httpContextCurrent = new AsyncLocal(); + private static AsyncLocal<(string traceIdentifier, HttpContext context)> _httpContextCurrent = new AsyncLocal<(string traceIdentifier, HttpContext context)>(); public HttpContext HttpContext { get { - return _httpContextCurrent.Value; + var value = _httpContextCurrent.Value; + // Only return the context if the stored request id matches the stored trace identifier + // context.TraceIdentifier is cleared by HttpContextFactory.Dispose. + return value.traceIdentifier == value.context?.TraceIdentifier ? value.context : null; } set { - _httpContextCurrent.Value = value; + _httpContextCurrent.Value = (value?.TraceIdentifier, value); } } } diff --git a/src/Microsoft.AspNetCore.Http/HttpContextFactory.cs b/src/Microsoft.AspNetCore.Http/HttpContextFactory.cs index 8236a388a5..c793ba402e 100644 --- a/src/Microsoft.AspNetCore.Http/HttpContextFactory.cs +++ b/src/Microsoft.AspNetCore.Http/HttpContextFactory.cs @@ -53,6 +53,10 @@ namespace Microsoft.AspNetCore.Http { _httpContextAccessor.HttpContext = null; } + + // Null out the TraceIdentifier here as a sign that this request is done, + // the HttpContextAcessor implementation relies on this to detect that the request is over + httpContext.TraceIdentifier = null; } } } \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Http.Tests/HttpContextAccessorTests.cs b/test/Microsoft.AspNetCore.Http.Tests/HttpContextAccessorTests.cs new file mode 100644 index 0000000000..c1521b1bc3 --- /dev/null +++ b/test/Microsoft.AspNetCore.Http.Tests/HttpContextAccessorTests.cs @@ -0,0 +1,197 @@ +// 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.Collections.Generic; +using System.Linq; +using System.Net.WebSockets; +using System.Reflection; +using System.Security.Claims; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Http.Features; +using Xunit; + +namespace Microsoft.AspNetCore.Http +{ + public class HttpContextAccessorTests + { + [Fact] + public async Task HttpContextAccessor_GettingHttpContextReturnsHttpContext() + { + var accessor = new HttpContextAccessor(); + + var context = new DefaultHttpContext(); + context.TraceIdentifier = "1"; + accessor.HttpContext = context; + + await Task.Delay(100); + + Assert.Same(context, accessor.HttpContext); + } + + [Fact] + public void HttpContextAccessor_GettingHttpContextWithOutSettingReturnsNull() + { + var accessor = new HttpContextAccessor(); + + Assert.Null(accessor.HttpContext); + } + + [Fact] + public async Task HttpContextAccessor_GettingHttpContextReturnsNullHttpContextIfSetToNull() + { + var accessor = new HttpContextAccessor(); + + var context = new DefaultHttpContext(); + context.TraceIdentifier = "1"; + accessor.HttpContext = context; + + var checkAsyncFlowTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var waitForNullTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var afterNullCheckTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + + ThreadPool.QueueUserWorkItem(async _ => + { + // The HttpContext flows with the execution context + Assert.Same(context, accessor.HttpContext); + + checkAsyncFlowTcs.SetResult(null); + + await waitForNullTcs.Task; + + try + { + Assert.Null(accessor.HttpContext); + + afterNullCheckTcs.SetResult(null); + } + catch (Exception ex) + { + afterNullCheckTcs.SetException(ex); + } + }); + + await checkAsyncFlowTcs.Task; + + // Null out the accessor + accessor.HttpContext = null; + context.TraceIdentifier = null; + + waitForNullTcs.SetResult(null); + + Assert.Null(accessor.HttpContext); + + await afterNullCheckTcs.Task; + } + + [Fact] + public async Task HttpContextAccessor_GettingHttpContextReturnsNullHttpContextIfDifferentTraceIdentifier() + { + var accessor = new HttpContextAccessor(); + + var context = new DefaultHttpContext(); + context.TraceIdentifier = "1"; + accessor.HttpContext = context; + + var checkAsyncFlowTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var waitForNullTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + var afterNullCheckTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + + ThreadPool.QueueUserWorkItem(async _ => + { + // The HttpContext flows with the execution context + Assert.Same(context, accessor.HttpContext); + + checkAsyncFlowTcs.SetResult(null); + + await waitForNullTcs.Task; + + try + { + Assert.Null(accessor.HttpContext); + + afterNullCheckTcs.SetResult(null); + } + catch (Exception ex) + { + afterNullCheckTcs.SetException(ex); + } + }); + + await checkAsyncFlowTcs.Task; + + // Reset the trace identifier on the first request + context.TraceIdentifier = null; + + // Set a new http context + var context2 = new DefaultHttpContext(); + context2.TraceIdentifier = "2"; + accessor.HttpContext = context2; + + waitForNullTcs.SetResult(null); + + Assert.Same(context2, accessor.HttpContext); + + await afterNullCheckTcs.Task; + } + + [Fact] + public async Task HttpContextAccessor_GettingHttpContextDoesNotFlowIfAccessorSetToNull() + { + var accessor = new HttpContextAccessor(); + + var context = new DefaultHttpContext(); + context.TraceIdentifier = "1"; + accessor.HttpContext = context; + + var checkAsyncFlowTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + + accessor.HttpContext = null; + + ThreadPool.QueueUserWorkItem(_ => + { + try + { + // The HttpContext flows with the execution context + Assert.Null(accessor.HttpContext); + checkAsyncFlowTcs.SetResult(null); + } + catch (Exception ex) + { + checkAsyncFlowTcs.SetException(ex); + } + }); + + await checkAsyncFlowTcs.Task; + } + + [Fact] + public async Task HttpContextAccessor_GettingHttpContextDoesNotFlowIfExecutionContextDoesNotFlow() + { + var accessor = new HttpContextAccessor(); + + var context = new DefaultHttpContext(); + context.TraceIdentifier = "1"; + accessor.HttpContext = context; + + var checkAsyncFlowTcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + + ThreadPool.UnsafeQueueUserWorkItem(_ => + { + try + { + // The HttpContext flows with the execution context + Assert.Null(accessor.HttpContext); + checkAsyncFlowTcs.SetResult(null); + } + catch (Exception ex) + { + checkAsyncFlowTcs.SetException(ex); + } + }, null); + + await checkAsyncFlowTcs.Task; + } + } +} \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Http.Tests/HttpContextFactoryTests.cs b/test/Microsoft.AspNetCore.Http.Tests/HttpContextFactoryTests.cs index ba983198e7..80e421273a 100644 --- a/test/Microsoft.AspNetCore.Http.Tests/HttpContextFactoryTests.cs +++ b/test/Microsoft.AspNetCore.Http.Tests/HttpContextFactoryTests.cs @@ -22,7 +22,27 @@ namespace Microsoft.AspNetCore.Http var context = contextFactory.Create(new FeatureCollection()); // Assert - Assert.True(ReferenceEquals(context, accessor.HttpContext)); + Assert.Same(context, accessor.HttpContext); + } + + [Fact] + public void DisposeHttpContextSetsHttpContextAccessorToNull() + { + // Arrange + var accessor = new HttpContextAccessor(); + var contextFactory = new HttpContextFactory(Options.Create(new FormOptions()), accessor); + + // Act + var context = contextFactory.Create(new FeatureCollection()); + var traceIdentifier = context.TraceIdentifier; + + // Assert + Assert.Same(context, accessor.HttpContext); + + contextFactory.Dispose(context); + + Assert.Null(accessor.HttpContext); + Assert.NotEqual(traceIdentifier, context.TraceIdentifier); } [Fact] From a6929fe02b5635784bc3ff787205639772527838 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Thu, 28 Jun 2018 16:20:00 -0700 Subject: [PATCH 17/41] 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 17a98ac7e7..f1fe24dd27 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 d0a32cc354adf9ad45e0773ba07dfd4207dd11a9 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 8 Jul 2018 12:14:27 -0700 Subject: [PATCH 18/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 28 ++++++++++++++-------------- korebuild-lock.txt | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 127314b44e..301ae09fe6 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,19 +3,19 @@ $(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.0.0 - 2.1.0 + 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.0.7 + 2.1.1 2.2.0-preview1-26618-02 15.6.1 4.7.49 @@ -24,7 +24,7 @@ 4.6.0-preview1-26617-01 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 8ed18d396e7e0b1e5f47cb9dd49da13df3e2b094 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 15 Jul 2018 12:14:12 -0700 Subject: [PATCH 19/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 301ae09fe6..679be8195a 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,25 +4,25 @@ 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.0.7 - 2.1.1 + 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.0.9 + 2.1.2 2.2.0-preview1-26618-02 15.6.1 4.7.49 2.0.3 - 4.6.0-preview1-26617-01 - 4.6.0-preview1-26617-01 - 0.8.0 + 4.5.0 + 4.5.0 + 0.9.0 2.3.1 2.4.0-rc.1.build4038 From 1230eac60c9261c0c4a55702485a7c70db3bede2 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 22 Jul 2018 12:13:46 -0700 Subject: [PATCH 20/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 679be8195a..07e49062c9 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,16 +4,16 @@ 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-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.0.9 2.1.2 2.2.0-preview1-26618-02 From f5adc2bc31b032091641ec671ff5d7af8d95c053 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 29 Jul 2018 12:13:18 -0700 Subject: [PATCH 21/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 27 ++++++++++++++------------- korebuild-lock.txt | 4 ++-- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 07e49062c9..3e4d95486a 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,17 +3,17 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 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-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.0.9 2.1.2 2.2.0-preview1-26618-02 @@ -22,9 +22,10 @@ 2.0.3 4.5.0 4.5.0 - 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 80b6ae4eb4c8abc71be66f3fa91884667c7263fc Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Mon, 30 Jul 2018 12:05:35 -0700 Subject: [PATCH 22/41] Handle subtype with suffix being a subtype without a suffix (#1027) --- .../MediaTypeHeaderValue.cs | 12 +++++++++++- .../MediaTypeHeaderValueTest.cs | 3 +++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.Net.Http.Headers/MediaTypeHeaderValue.cs b/src/Microsoft.Net.Http.Headers/MediaTypeHeaderValue.cs index 32074b44cc..e069210843 100644 --- a/src/Microsoft.Net.Http.Headers/MediaTypeHeaderValue.cs +++ b/src/Microsoft.Net.Http.Headers/MediaTypeHeaderValue.cs @@ -650,6 +650,7 @@ namespace Microsoft.Net.Http.Headers { return true; } + if (set.Suffix.HasValue) { if (Suffix.HasValue) @@ -663,7 +664,10 @@ namespace Microsoft.Net.Http.Headers } else { - return set.SubType.Equals(SubType, StringComparison.OrdinalIgnoreCase); + // If this subtype or suffix matches the subtype of the set, + // it is considered a subtype. + // Ex: application/json > application/val+json + return MatchesEitherSubtypeOrSuffix(set); } } @@ -673,6 +677,12 @@ namespace Microsoft.Net.Http.Headers set.SubTypeWithoutSuffix.Equals(SubTypeWithoutSuffix, StringComparison.OrdinalIgnoreCase); } + private bool MatchesEitherSubtypeOrSuffix(MediaTypeHeaderValue set) + { + return set.SubType.Equals(SubType, StringComparison.OrdinalIgnoreCase) || + set.SubType.Equals(Suffix, StringComparison.OrdinalIgnoreCase); + } + private bool MatchesParameters(MediaTypeHeaderValue set) { if (set._parameters != null && set._parameters.Count != 0) diff --git a/test/Microsoft.Net.Http.Headers.Tests/MediaTypeHeaderValueTest.cs b/test/Microsoft.Net.Http.Headers.Tests/MediaTypeHeaderValueTest.cs index 75cccabc9c..e6c45f3584 100644 --- a/test/Microsoft.Net.Http.Headers.Tests/MediaTypeHeaderValueTest.cs +++ b/test/Microsoft.Net.Http.Headers.Tests/MediaTypeHeaderValueTest.cs @@ -750,6 +750,8 @@ namespace Microsoft.Net.Http.Headers [InlineData("application/entity+json", "application/entity+json")] [InlineData("application/*+json", "application/entity+json")] [InlineData("application/*+json", "application/*+json")] + [InlineData("application/json", "application/problem+json")] + [InlineData("application/json", "application/vnd.restful+json")] [InlineData("application/*", "application/*+JSON")] [InlineData("application/vnd.github+json", "application/vnd.github+json")] [InlineData("application/*", "application/entity+JSON")] @@ -774,6 +776,7 @@ namespace Microsoft.Net.Http.Headers [InlineData("application/*+*", "application/json")] [InlineData("application/entity+*", "application/entity+json")] // We don't allow suffixes to be wildcards [InlineData("application/*+*", "application/entity+json")] // We don't allow suffixes to be wildcards + [InlineData("application/entity+json", "application/entity")] public void IsSubSetOfWithSuffixes_NegativeCases(string set, string subset) { // Arrange From c12ee8fe75f0dfb2e1531a9e2fcdd8b5bd932080 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 5 Aug 2018 19:14:51 +0000 Subject: [PATCH 23/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 22 +++++++++++----------- korebuild-lock.txt | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 3e4d95486a..3ba20291d9 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,17 +3,17 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 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-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.0.9 2.1.2 2.2.0-preview1-26618-02 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 a4d63748618697a58b84998c0f37707b94e77a78 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Mon, 6 Aug 2018 20:37:09 +0000 Subject: [PATCH 24/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 3ba20291d9..e7517a6ade 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,16 +4,16 @@ 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-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.0.9 2.1.2 2.2.0-preview1-26618-02 From 26b9bc06b2e3d293e055932a53f5a69b1e47208a Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 12 Aug 2018 19:14:03 +0000 Subject: [PATCH 25/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 22 +++++++++++----------- korebuild-lock.txt | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index e7517a6ade..332e67d551 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,17 +3,17 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 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-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.0.9 2.1.2 2.2.0-preview1-26618-02 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 f3dc2d069c0c1ee756fbf416be35eae5ae904cda Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Tue, 21 Aug 2018 13:33:50 -0700 Subject: [PATCH 26/41] Update package branding for 2.2.0-preview2 --- build/dependencies.props | 2 +- version.props | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 332e67d551..69f2e20e0e 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -26,6 +26,6 @@ 2.3.1 2.4.0 - + diff --git a/version.props b/version.props index 44985cedb3..15637ba785 100644 --- a/version.props +++ b/version.props @@ -1,7 +1,7 @@ 2.2.0 - preview1 + preview2 $(VersionPrefix) $(VersionPrefix)-$(VersionSuffix)-final t000 From 14076d94c38960787772ea7999c7aa159afbba2b Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 2 Sep 2018 12:13:15 -0700 Subject: [PATCH 27/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 22 +++++++++++----------- korebuild-lock.txt | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 69f2e20e0e..89aeb80853 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,17 +3,17 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 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-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.0.9 2.1.2 2.2.0-preview1-26618-02 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 b43bc0cb8ac9a6a55e92b65eb31408d3a2b41b5c Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Wed, 5 Sep 2018 16:34:33 -0700 Subject: [PATCH 28/41] Update branding to 2.2.0-preview3 --- version.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.props b/version.props index 15637ba785..704cac087b 100644 --- a/version.props +++ b/version.props @@ -1,7 +1,7 @@ 2.2.0 - preview2 + preview3 $(VersionPrefix) $(VersionPrefix)-$(VersionSuffix)-final t000 From cfb0d732b0a00b6925d136e816e7e7b134600b3f Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Fri, 7 Sep 2018 01:46:34 +1000 Subject: [PATCH 29/41] fix some spelling (#1035) --- .../TokenExtensions.cs | 4 +-- .../AuthenticationSchemeProvider.cs | 2 +- .../Extensions/MapMiddleware.cs | 4 +-- .../Extensions/MapWhenMiddleware.cs | 2 +- .../Extensions/UseMiddlewareExtensions.cs | 26 +++++++++---------- .../Extensions/UsePathBaseMiddleware.cs | 2 +- .../PathString.cs | 4 +-- .../FeatureReferences.cs | 2 +- .../Features/FormFeature.cs | 2 +- .../HttpContextFactory.cs | 2 +- .../OwinExtensions.cs | 4 +-- .../WebSockets/OwinWebSocketAcceptAdapter.cs | 4 +-- .../FormReader.cs | 16 ++++++------ .../QueryHelpers.cs | 2 +- .../ContentDispositionHeaderValue.cs | 6 ++--- .../HeaderUtilities.cs | 2 +- .../HttpRuleParser.cs | 2 +- .../RangeItemHeaderValue.cs | 2 +- .../MapPredicateMiddlewareTests.cs | 2 +- .../QueryStringTests.cs | 4 +-- .../UseMiddlewareTest.cs | 8 +++--- .../DefaultHttpContextTests.cs | 6 ++--- .../HeaderDictionaryTests.cs | 2 +- .../ResponseCookiesTest.cs | 24 ++++++++--------- .../OwinEnvironmentTests.cs | 2 +- .../MultipartReaderTests.cs | 24 ++++++++--------- .../ContentDispositionHeaderValueTest.cs | 2 +- .../CookieHeaderValueTest.cs | 2 +- .../EntityTagHeaderValueTest.cs | 8 +++--- .../MediaTypeHeaderValueTest.cs | 8 +++--- .../NameValueHeaderValueTest.cs | 12 ++++----- .../RangeConditionHeaderValueTest.cs | 4 +-- .../SetCookieHeaderValueTest.cs | 2 +- .../StringWithQualityHeaderValueTest.cs | 8 +++--- 34 files changed, 103 insertions(+), 103 deletions(-) diff --git a/src/Microsoft.AspNetCore.Authentication.Abstractions/TokenExtensions.cs b/src/Microsoft.AspNetCore.Authentication.Abstractions/TokenExtensions.cs index 497acabc23..128b0651d1 100644 --- a/src/Microsoft.AspNetCore.Authentication.Abstractions/TokenExtensions.cs +++ b/src/Microsoft.AspNetCore.Authentication.Abstractions/TokenExtensions.cs @@ -100,7 +100,7 @@ namespace Microsoft.AspNetCore.Authentication /// Returns all of the AuthenticationTokens contained in the properties. /// /// The properties. - /// The authentication toekns. + /// The authentication tokens. public static IEnumerable GetTokens(this AuthenticationProperties properties) { if (properties == null) @@ -132,7 +132,7 @@ namespace Microsoft.AspNetCore.Authentication /// The context. /// The name of the token. /// The value of the token. - public static Task GetTokenAsync(this IAuthenticationService auth, HttpContext context, string tokenName) + public static Task GetTokenAsync(this IAuthenticationService auth, HttpContext context, string tokenName) => auth.GetTokenAsync(context, scheme: null, tokenName: tokenName); /// diff --git a/src/Microsoft.AspNetCore.Authentication.Core/AuthenticationSchemeProvider.cs b/src/Microsoft.AspNetCore.Authentication.Core/AuthenticationSchemeProvider.cs index 050118d3c4..c14608511b 100644 --- a/src/Microsoft.AspNetCore.Authentication.Core/AuthenticationSchemeProvider.cs +++ b/src/Microsoft.AspNetCore.Authentication.Core/AuthenticationSchemeProvider.cs @@ -102,7 +102,7 @@ namespace Microsoft.AspNetCore.Authentication /// /// Returns the scheme that will be used by default for . /// This is typically specified via . - /// Otherwise this will fallback to if that supoorts sign out. + /// Otherwise this will fallback to if that supports sign out. /// /// The scheme that will be used by default for . public virtual Task GetDefaultSignOutSchemeAsync() diff --git a/src/Microsoft.AspNetCore.Http.Abstractions/Extensions/MapMiddleware.cs b/src/Microsoft.AspNetCore.Http.Abstractions/Extensions/MapMiddleware.cs index a4f67ce4a2..4215b82697 100644 --- a/src/Microsoft.AspNetCore.Http.Abstractions/Extensions/MapMiddleware.cs +++ b/src/Microsoft.AspNetCore.Http.Abstractions/Extensions/MapMiddleware.cs @@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Http; namespace Microsoft.AspNetCore.Builder.Extensions { /// - /// Respresents a middleware that maps a request path to a sub-request pipeline. + /// Represents a middleware that maps a request path to a sub-request pipeline. /// public class MapMiddleware { @@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.Builder.Extensions private readonly MapOptions _options; /// - /// Creates a new instace of . + /// Creates a new instance of . /// /// The delegate representing the next middleware in the request pipeline. /// The middleware options. diff --git a/src/Microsoft.AspNetCore.Http.Abstractions/Extensions/MapWhenMiddleware.cs b/src/Microsoft.AspNetCore.Http.Abstractions/Extensions/MapWhenMiddleware.cs index b012626ba9..1441da4d99 100644 --- a/src/Microsoft.AspNetCore.Http.Abstractions/Extensions/MapWhenMiddleware.cs +++ b/src/Microsoft.AspNetCore.Http.Abstractions/Extensions/MapWhenMiddleware.cs @@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Http; namespace Microsoft.AspNetCore.Builder.Extensions { /// - /// Respresents a middleware that runs a sub-request pipeline when a given predicate is matched. + /// Represents a middleware that runs a sub-request pipeline when a given predicate is matched. /// public class MapWhenMiddleware { diff --git a/src/Microsoft.AspNetCore.Http.Abstractions/Extensions/UseMiddlewareExtensions.cs b/src/Microsoft.AspNetCore.Http.Abstractions/Extensions/UseMiddlewareExtensions.cs index c07fe1e9f1..3342b4e08d 100644 --- a/src/Microsoft.AspNetCore.Http.Abstractions/Extensions/UseMiddlewareExtensions.cs +++ b/src/Microsoft.AspNetCore.Http.Abstractions/Extensions/UseMiddlewareExtensions.cs @@ -74,13 +74,13 @@ namespace Microsoft.AspNetCore.Builder throw new InvalidOperationException(Resources.FormatException_UseMiddlewareNoInvokeMethod(InvokeMethodName, InvokeAsyncMethodName, middleware)); } - var methodinfo = invokeMethods[0]; - if (!typeof(Task).IsAssignableFrom(methodinfo.ReturnType)) + var methodInfo = invokeMethods[0]; + if (!typeof(Task).IsAssignableFrom(methodInfo.ReturnType)) { throw new InvalidOperationException(Resources.FormatException_UseMiddlewareNonTaskReturnType(InvokeMethodName, InvokeAsyncMethodName, nameof(Task))); } - var parameters = methodinfo.GetParameters(); + var parameters = methodInfo.GetParameters(); if (parameters.Length == 0 || parameters[0].ParameterType != typeof(HttpContext)) { throw new InvalidOperationException(Resources.FormatException_UseMiddlewareNoParameters(InvokeMethodName, InvokeAsyncMethodName, nameof(HttpContext))); @@ -92,10 +92,10 @@ namespace Microsoft.AspNetCore.Builder var instance = ActivatorUtilities.CreateInstance(app.ApplicationServices, middleware, ctorArgs); if (parameters.Length == 1) { - return (RequestDelegate)methodinfo.CreateDelegate(typeof(RequestDelegate), instance); + return (RequestDelegate)methodInfo.CreateDelegate(typeof(RequestDelegate), instance); } - var factory = Compile(methodinfo, parameters); + var factory = Compile(methodInfo, parameters); return context => { @@ -142,13 +142,13 @@ namespace Microsoft.AspNetCore.Builder }); } - private static Func Compile(MethodInfo methodinfo, ParameterInfo[] parameters) + private static Func Compile(MethodInfo methodInfo, ParameterInfo[] parameters) { // If we call something like // // public class Middleware // { - // public Task Invoke(HttpContext context, ILoggerFactory loggeryFactory) + // public Task Invoke(HttpContext context, ILoggerFactory loggerFactory) // { // // } @@ -158,14 +158,14 @@ namespace Microsoft.AspNetCore.Builder // We'll end up with something like this: // Generic version: // - // Task Invoke(Middleware instance, HttpContext httpContext, IServiceprovider provider) + // Task Invoke(Middleware instance, HttpContext httpContext, IServiceProvider provider) // { // return instance.Invoke(httpContext, (ILoggerFactory)UseMiddlewareExtensions.GetService(provider, typeof(ILoggerFactory)); // } // Non generic version: // - // Task Invoke(object instance, HttpContext httpContext, IServiceprovider provider) + // Task Invoke(object instance, HttpContext httpContext, IServiceProvider provider) // { // return ((Middleware)instance).Invoke(httpContext, (ILoggerFactory)UseMiddlewareExtensions.GetService(provider, typeof(ILoggerFactory)); // } @@ -190,7 +190,7 @@ namespace Microsoft.AspNetCore.Builder { providerArg, Expression.Constant(parameterType, typeof(Type)), - Expression.Constant(methodinfo.DeclaringType, typeof(Type)) + Expression.Constant(methodInfo.DeclaringType, typeof(Type)) }; var getServiceCall = Expression.Call(GetServiceInfo, parameterTypeExpression); @@ -198,12 +198,12 @@ namespace Microsoft.AspNetCore.Builder } Expression middlewareInstanceArg = instanceArg; - if (methodinfo.DeclaringType != typeof(T)) + if (methodInfo.DeclaringType != typeof(T)) { - middlewareInstanceArg = Expression.Convert(middlewareInstanceArg, methodinfo.DeclaringType); + middlewareInstanceArg = Expression.Convert(middlewareInstanceArg, methodInfo.DeclaringType); } - var body = Expression.Call(middlewareInstanceArg, methodinfo, methodArguments); + var body = Expression.Call(middlewareInstanceArg, methodInfo, methodArguments); var lambda = Expression.Lambda>(body, instanceArg, httpContextArg, providerArg); diff --git a/src/Microsoft.AspNetCore.Http.Abstractions/Extensions/UsePathBaseMiddleware.cs b/src/Microsoft.AspNetCore.Http.Abstractions/Extensions/UsePathBaseMiddleware.cs index 6474aeda58..103bdd9601 100644 --- a/src/Microsoft.AspNetCore.Http.Abstractions/Extensions/UsePathBaseMiddleware.cs +++ b/src/Microsoft.AspNetCore.Http.Abstractions/Extensions/UsePathBaseMiddleware.cs @@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.Builder.Extensions private readonly PathString _pathBase; /// - /// Creates a new instace of . + /// Creates a new instance of . /// /// The delegate representing the next middleware in the request pipeline. /// The path base to extract. diff --git a/src/Microsoft.AspNetCore.Http.Abstractions/PathString.cs b/src/Microsoft.AspNetCore.Http.Abstractions/PathString.cs index 2a5960b661..b7f121a039 100644 --- a/src/Microsoft.AspNetCore.Http.Abstractions/PathString.cs +++ b/src/Microsoft.AspNetCore.Http.Abstractions/PathString.cs @@ -26,7 +26,7 @@ namespace Microsoft.AspNetCore.Http private readonly string _value; /// - /// Initalize the path string with a given value. This value must be in unescaped format. Use + /// Initialize the path string with a given value. This value must be in unescaped format. Use /// PathString.FromUriComponent(value) if you have a path value which is in an escaped format. /// /// The unescaped path to be assigned to the Value property. @@ -117,7 +117,7 @@ namespace Microsoft.AspNetCore.Http { if (!requiresEscaping) { - // the current segument doesn't require escape + // the current segment doesn't require escape if (buffer == null) { buffer = new StringBuilder(_value.Length * 3); diff --git a/src/Microsoft.AspNetCore.Http.Features/FeatureReferences.cs b/src/Microsoft.AspNetCore.Http.Features/FeatureReferences.cs index 38bd2ec27a..04bc8d14be 100644 --- a/src/Microsoft.AspNetCore.Http.Features/FeatureReferences.cs +++ b/src/Microsoft.AspNetCore.Http.Features/FeatureReferences.cs @@ -84,7 +84,7 @@ namespace Microsoft.AspNetCore.Http.Features } else if (flush) { - // Cache was cleared, but item retrived from current Collection for version + // Cache was cleared, but item retrieved from current Collection for version // so use passed in revision rather than making another virtual call Revision = revision; } diff --git a/src/Microsoft.AspNetCore.Http/Features/FormFeature.cs b/src/Microsoft.AspNetCore.Http/Features/FormFeature.cs index f091e3b166..02c1bd7a8b 100644 --- a/src/Microsoft.AspNetCore.Http/Features/FormFeature.cs +++ b/src/Microsoft.AspNetCore.Http/Features/FormFeature.cs @@ -221,7 +221,7 @@ namespace Microsoft.AspNetCore.Http.Features // // value - // Do not limit the key name length here because the mulipart headers length limit is already in effect. + // Do not limit the key name length here because the multipart headers length limit is already in effect. var key = formDataSection.Name; var value = await formDataSection.GetValueAsync(); diff --git a/src/Microsoft.AspNetCore.Http/HttpContextFactory.cs b/src/Microsoft.AspNetCore.Http/HttpContextFactory.cs index c793ba402e..f293ef4782 100644 --- a/src/Microsoft.AspNetCore.Http/HttpContextFactory.cs +++ b/src/Microsoft.AspNetCore.Http/HttpContextFactory.cs @@ -55,7 +55,7 @@ namespace Microsoft.AspNetCore.Http } // Null out the TraceIdentifier here as a sign that this request is done, - // the HttpContextAcessor implementation relies on this to detect that the request is over + // the HttpContextAccessor implementation relies on this to detect that the request is over httpContext.TraceIdentifier = null; } } diff --git a/src/Microsoft.AspNetCore.Owin/OwinExtensions.cs b/src/Microsoft.AspNetCore.Owin/OwinExtensions.cs index 0344c1a552..b7fcf15d04 100644 --- a/src/Microsoft.AspNetCore.Owin/OwinExtensions.cs +++ b/src/Microsoft.AspNetCore.Owin/OwinExtensions.cs @@ -34,11 +34,11 @@ namespace Microsoft.AspNetCore.Builder { Func middleware1 = next1 => { - AppFunc exitMiddlware = env => + AppFunc exitMiddleware = env => { return next1((HttpContext)env[typeof(HttpContext).FullName]); }; - var app = middleware(exitMiddlware); + var app = middleware(exitMiddleware); return httpContext => { // Use the existing OWIN env if there is one. diff --git a/src/Microsoft.AspNetCore.Owin/WebSockets/OwinWebSocketAcceptAdapter.cs b/src/Microsoft.AspNetCore.Owin/WebSockets/OwinWebSocketAcceptAdapter.cs index 5fe43dedd2..074da1f968 100644 --- a/src/Microsoft.AspNetCore.Owin/WebSockets/OwinWebSocketAcceptAdapter.cs +++ b/src/Microsoft.AspNetCore.Owin/WebSockets/OwinWebSocketAcceptAdapter.cs @@ -103,10 +103,10 @@ namespace Microsoft.AspNetCore.Owin // 2. The middleware inserts an alternate Accept signature into the OWIN environment. // 3. The middleware invokes Next and stores Next's Task locally. It then returns an alternate Task to the server. // 4. The OwinFeatureCollection adapts the alternate Accept signature to IHttpWebSocketFeature.AcceptAsync. - // 5. A component later in the pipleline invokes IHttpWebSocketFeature.AcceptAsync (mapped to AcceptWebSocketAsync). + // 5. A component later in the pipeline invokes IHttpWebSocketFeature.AcceptAsync (mapped to AcceptWebSocketAsync). // 6. The middleware calls the OWIN Accept, providing a local callback, and returns an incomplete Task. // 7. The middleware completes the alternate Task it returned from Invoke, telling the server that the request pipeline has completed. - // 8. The server invokes the middleware's callback, which creats a WebSocket adapter complete's the orriginal Accept Task with it. + // 8. The server invokes the middleware's callback, which creates a WebSocket adapter and completes the original Accept Task with it. // 9. The middleware waits while the application uses the WebSocket, where the end is signaled by the Next's Task completion. public static AppFunc AdaptWebSockets(AppFunc next) { diff --git a/src/Microsoft.AspNetCore.WebUtilities/FormReader.cs b/src/Microsoft.AspNetCore.WebUtilities/FormReader.cs index 958a4971fa..65bfc37be4 100644 --- a/src/Microsoft.AspNetCore.WebUtilities/FormReader.cs +++ b/src/Microsoft.AspNetCore.WebUtilities/FormReader.cs @@ -101,7 +101,7 @@ namespace Microsoft.AspNetCore.WebUtilities public KeyValuePair? ReadNextPair() { ReadNextPairImpl(); - if (ReadSucceded()) + if (ReadSucceeded()) { return new KeyValuePair(_currentKey, _currentValue); } @@ -134,7 +134,7 @@ namespace Microsoft.AspNetCore.WebUtilities public async Task?> ReadNextPairAsync(CancellationToken cancellationToken = new CancellationToken()) { await ReadNextPairAsyncImpl(cancellationToken); - if (ReadSucceded()) + if (ReadSucceeded()) { return new KeyValuePair(_currentKey, _currentValue); } @@ -189,11 +189,11 @@ namespace Microsoft.AspNetCore.WebUtilities return true; } - private bool TryReadWord(char seperator, int limit, out string value) + private bool TryReadWord(char separator, int limit, out string value) { do { - if (ReadChar(seperator, limit, out value)) + if (ReadChar(separator, limit, out value)) { return true; } @@ -201,7 +201,7 @@ namespace Microsoft.AspNetCore.WebUtilities return false; } - private bool ReadChar(char seperator, int limit, out string word) + private bool ReadChar(char separator, int limit, out string word) { // End if (_bufferCount == 0) @@ -213,7 +213,7 @@ namespace Microsoft.AspNetCore.WebUtilities var c = _buffer[_bufferOffset++]; _bufferCount--; - if (c == seperator) + if (c == separator) { word = BuildWord(); return true; @@ -283,14 +283,14 @@ namespace Microsoft.AspNetCore.WebUtilities return accumulator.GetResults(); } - private bool ReadSucceded() + private bool ReadSucceeded() { return _currentKey != null && _currentValue != null; } private void Append(ref KeyValueAccumulator accumulator) { - if (ReadSucceded()) + if (ReadSucceeded()) { accumulator.Append(_currentKey, _currentValue); if (accumulator.ValueCount > ValueCountLimit) diff --git a/src/Microsoft.AspNetCore.WebUtilities/QueryHelpers.cs b/src/Microsoft.AspNetCore.WebUtilities/QueryHelpers.cs index 6bd1a0bb82..c1c23b64e9 100644 --- a/src/Microsoft.AspNetCore.WebUtilities/QueryHelpers.cs +++ b/src/Microsoft.AspNetCore.WebUtilities/QueryHelpers.cs @@ -77,7 +77,7 @@ namespace Microsoft.AspNetCore.WebUtilities var anchorIndex = uri.IndexOf('#'); var uriToBeAppended = uri; var anchorText = ""; - // If there is an anchor, then the query string must be inserted before its first occurance. + // If there is an anchor, then the query string must be inserted before its first occurence. if (anchorIndex != -1) { anchorText = uri.Substring(anchorIndex); diff --git a/src/Microsoft.Net.Http.Headers/ContentDispositionHeaderValue.cs b/src/Microsoft.Net.Http.Headers/ContentDispositionHeaderValue.cs index b9292ac1a8..392a441733 100644 --- a/src/Microsoft.Net.Http.Headers/ContentDispositionHeaderValue.cs +++ b/src/Microsoft.Net.Http.Headers/ContentDispositionHeaderValue.cs @@ -155,7 +155,7 @@ namespace Microsoft.Net.Http.Headers { if (!StringSegment.IsNullOrEmpty(fileName)) { - FileName = Sanatize(fileName); + FileName = Sanitize(fileName); } else { @@ -166,7 +166,7 @@ namespace Microsoft.Net.Http.Headers /// /// Sets the FileName parameter using encodings appropriate for MIME headers. - /// The FileNameStar paraemter is removed. + /// The FileNameStar parameter is removed. /// /// public void SetMimeFileName(StringSegment fileName) @@ -434,7 +434,7 @@ namespace Microsoft.Net.Http.Headers } // Replaces characters not suitable for HTTP headers with '_' rather than MIME encoding them. - private StringSegment Sanatize(StringSegment input) + private StringSegment Sanitize(StringSegment input) { var result = input; diff --git a/src/Microsoft.Net.Http.Headers/HeaderUtilities.cs b/src/Microsoft.Net.Http.Headers/HeaderUtilities.cs index 20b4319252..c45ca9cf43 100644 --- a/src/Microsoft.Net.Http.Headers/HeaderUtilities.cs +++ b/src/Microsoft.Net.Http.Headers/HeaderUtilities.cs @@ -143,7 +143,7 @@ namespace Microsoft.Net.Http.Headers } } - // Since we never re-use a "found" value in 'y', we expecte 'alreadyFound' to have all fields set to 'true'. + // Since we never re-use a "found" value in 'y', we expected 'alreadyFound' to have all fields set to 'true'. // Otherwise the two collections can't be equal and we should not get here. Contract.Assert(Contract.ForAll(alreadyFound, value => { return value; }), "Expected all values in 'alreadyFound' to be true since collections are considered equal."); diff --git a/src/Microsoft.Net.Http.Headers/HttpRuleParser.cs b/src/Microsoft.Net.Http.Headers/HttpRuleParser.cs index 3741ffa110..05f4a4576f 100644 --- a/src/Microsoft.Net.Http.Headers/HttpRuleParser.cs +++ b/src/Microsoft.Net.Http.Headers/HttpRuleParser.cs @@ -225,7 +225,7 @@ namespace Microsoft.Net.Http.Headers return HttpParseResult.NotParsed; } - // Quoted-char has 2 characters. Check wheter there are 2 chars left ('\' + char) + // Quoted-char has 2 characters. Check whether there are 2 chars left ('\' + char) // If so, check whether the character is in the range 0-127. If not, it's an invalid value. if ((startIndex + 2 > input.Length) || (input[startIndex + 1] > 127)) { diff --git a/src/Microsoft.Net.Http.Headers/RangeItemHeaderValue.cs b/src/Microsoft.Net.Http.Headers/RangeItemHeaderValue.cs index 99fdbfef5c..3b177f6e9a 100644 --- a/src/Microsoft.Net.Http.Headers/RangeItemHeaderValue.cs +++ b/src/Microsoft.Net.Http.Headers/RangeItemHeaderValue.cs @@ -169,7 +169,7 @@ namespace Microsoft.Net.Http.Headers current = current + fromLength; current = current + HttpRuleParser.GetWhitespaceLength(input, current); - // Afer the first value, the '-' character must follow. + // After the first value, the '-' character must follow. if ((current == input.Length) || (input[current] != '-')) { // We need a '-' character otherwise this can't be a valid range. diff --git a/test/Microsoft.AspNetCore.Http.Abstractions.Tests/MapPredicateMiddlewareTests.cs b/test/Microsoft.AspNetCore.Http.Abstractions.Tests/MapPredicateMiddlewareTests.cs index 0313a730d5..9274ab4207 100644 --- a/test/Microsoft.AspNetCore.Http.Abstractions.Tests/MapPredicateMiddlewareTests.cs +++ b/test/Microsoft.AspNetCore.Http.Abstractions.Tests/MapPredicateMiddlewareTests.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Builder.Extensions public class MapPredicateMiddlewareTests { - private static readonly Predicate NotImplementedPredicate = new Predicate(envionment => { throw new NotImplementedException(); }); + private static readonly Predicate NotImplementedPredicate = new Predicate(environment => { throw new NotImplementedException(); }); private static Task Success(HttpContext context) { diff --git a/test/Microsoft.AspNetCore.Http.Abstractions.Tests/QueryStringTests.cs b/test/Microsoft.AspNetCore.Http.Abstractions.Tests/QueryStringTests.cs index 8327f12509..a78a853a1c 100644 --- a/test/Microsoft.AspNetCore.Http.Abstractions.Tests/QueryStringTests.cs +++ b/test/Microsoft.AspNetCore.Http.Abstractions.Tests/QueryStringTests.cs @@ -59,10 +59,10 @@ namespace Microsoft.AspNetCore.Http.Abstractions [InlineData("", "value", "?=value")] [InlineData("", "", "?=")] [InlineData("", null, "?=")] - public void CreateNameValue_Success(string name, string value, string exepcted) + public void CreateNameValue_Success(string name, string value, string expected) { var query = QueryString.Create(name, value); - Assert.Equal(exepcted, query.Value); + Assert.Equal(expected, query.Value); } [Fact] diff --git a/test/Microsoft.AspNetCore.Http.Abstractions.Tests/UseMiddlewareTest.cs b/test/Microsoft.AspNetCore.Http.Abstractions.Tests/UseMiddlewareTest.cs index 07c1aa4e8d..749309319f 100644 --- a/test/Microsoft.AspNetCore.Http.Abstractions.Tests/UseMiddlewareTest.cs +++ b/test/Microsoft.AspNetCore.Http.Abstractions.Tests/UseMiddlewareTest.cs @@ -88,7 +88,7 @@ namespace Microsoft.AspNetCore.Http } [Fact] - public void UseMiddleware_MutlipleInvokeMethods_ThrowsException() + public void UseMiddleware_MultipleInvokeMethods_ThrowsException() { var builder = new ApplicationBuilder(new DummyServiceProvider()); builder.UseMiddleware(typeof(MiddlewareMultipleInvokesStub)); @@ -102,7 +102,7 @@ namespace Microsoft.AspNetCore.Http } [Fact] - public void UseMiddleware_MutlipleInvokeAsyncMethods_ThrowsException() + public void UseMiddleware_MultipleInvokeAsyncMethods_ThrowsException() { var builder = new ApplicationBuilder(new DummyServiceProvider()); builder.UseMiddleware(typeof(MiddlewareMultipleInvokeAsyncStub)); @@ -116,7 +116,7 @@ namespace Microsoft.AspNetCore.Http } [Fact] - public void UseMiddleware_MutlipleInvokeAndInvokeAsyncMethods_ThrowsException() + public void UseMiddleware_MultipleInvokeAndInvokeAsyncMethods_ThrowsException() { var builder = new ApplicationBuilder(new DummyServiceProvider()); builder.UseMiddleware(typeof(MiddlewareMultipleInvokeAndInvokeAsyncStub)); @@ -153,7 +153,7 @@ namespace Microsoft.AspNetCore.Http } [Fact] - public void UseMiddlewareWithIvokeWithOutAndRefThrows() + public void UseMiddlewareWithInvokeWithOutAndRefThrows() { var mockServiceProvider = new DummyServiceProvider(); var builder = new ApplicationBuilder(mockServiceProvider); diff --git a/test/Microsoft.AspNetCore.Http.Tests/DefaultHttpContextTests.cs b/test/Microsoft.AspNetCore.Http.Tests/DefaultHttpContextTests.cs index 33f73cf191..4aeeabb565 100644 --- a/test/Microsoft.AspNetCore.Http.Tests/DefaultHttpContextTests.cs +++ b/test/Microsoft.AspNetCore.Http.Tests/DefaultHttpContextTests.cs @@ -157,7 +157,7 @@ namespace Microsoft.AspNetCore.Http features.Set(new HttpResponseFeature()); features.Set(new TestHttpWebSocketFeature()); - // featurecollection is set. all cached interfaces are null. + // FeatureCollection is set. all cached interfaces are null. var context = new DefaultHttpContext(features); TestAllCachedFeaturesAreNull(context, features); Assert.Equal(3, features.Count()); @@ -166,7 +166,7 @@ namespace Microsoft.AspNetCore.Http TestAllCachedFeaturesAreSet(context, features); Assert.NotEqual(3, features.Count()); - // featurecollection is null. and all cached interfaces are null. + // FeatureCollection is null. and all cached interfaces are null. // only top level is tested because child objects are inaccessible. context.Uninitialize(); TestCachedFeaturesAreNull(context, null); @@ -177,7 +177,7 @@ namespace Microsoft.AspNetCore.Http newFeatures.Set(new HttpResponseFeature()); newFeatures.Set(new TestHttpWebSocketFeature()); - // featurecollection is set to newFeatures. all cached interfaces are null. + // FeatureCollection is set to newFeatures. all cached interfaces are null. context.Initialize(newFeatures); TestAllCachedFeaturesAreNull(context, newFeatures); Assert.Equal(3, newFeatures.Count()); diff --git a/test/Microsoft.AspNetCore.Http.Tests/HeaderDictionaryTests.cs b/test/Microsoft.AspNetCore.Http.Tests/HeaderDictionaryTests.cs index 03d642a018..26113f53c0 100644 --- a/test/Microsoft.AspNetCore.Http.Tests/HeaderDictionaryTests.cs +++ b/test/Microsoft.AspNetCore.Http.Tests/HeaderDictionaryTests.cs @@ -57,7 +57,7 @@ namespace Microsoft.AspNetCore.Http } [Fact] - public void EmtpyQuotedHeaderSegmentsAreIgnored() + public void EmptyQuotedHeaderSegmentsAreIgnored() { var headers = new HeaderDictionary( new Dictionary(StringComparer.OrdinalIgnoreCase) diff --git a/test/Microsoft.AspNetCore.Http.Tests/ResponseCookiesTest.cs b/test/Microsoft.AspNetCore.Http.Tests/ResponseCookiesTest.cs index 5e5c44f89d..a6aa2de5ba 100644 --- a/test/Microsoft.AspNetCore.Http.Tests/ResponseCookiesTest.cs +++ b/test/Microsoft.AspNetCore.Http.Tests/ResponseCookiesTest.cs @@ -15,13 +15,13 @@ namespace Microsoft.AspNetCore.Http.Tests { var headers = new HeaderDictionary(); var cookies = new ResponseCookies(headers, null); - var testcookie = "TestCookie"; + var testCookie = "TestCookie"; - cookies.Delete(testcookie); + cookies.Delete(testCookie); var cookieHeaderValues = headers[HeaderNames.SetCookie]; Assert.Single(cookieHeaderValues); - Assert.StartsWith(testcookie, cookieHeaderValues[0]); + Assert.StartsWith(testCookie, cookieHeaderValues[0]); Assert.Contains("path=/", cookieHeaderValues[0]); Assert.Contains("expires=Thu, 01 Jan 1970 00:00:00 GMT", cookieHeaderValues[0]); } @@ -31,7 +31,7 @@ namespace Microsoft.AspNetCore.Http.Tests { var headers = new HeaderDictionary(); var cookies = new ResponseCookies(headers, null); - var testcookie = "TestCookie"; + var testCookie = "TestCookie"; var time = new DateTimeOffset(2000, 1, 1, 1, 1, 1, 1, TimeSpan.Zero); var options = new CookieOptions { @@ -43,11 +43,11 @@ namespace Microsoft.AspNetCore.Http.Tests SameSite = SameSiteMode.Lax }; - cookies.Delete(testcookie, options); + cookies.Delete(testCookie, options); var cookieHeaderValues = headers[HeaderNames.SetCookie]; Assert.Single(cookieHeaderValues); - Assert.StartsWith(testcookie, cookieHeaderValues[0]); + Assert.StartsWith(testCookie, cookieHeaderValues[0]); Assert.Contains("path=/", cookieHeaderValues[0]); Assert.Contains("expires=Thu, 01 Jan 1970 00:00:00 GMT", cookieHeaderValues[0]); Assert.Contains("secure", cookieHeaderValues[0]); @@ -60,14 +60,14 @@ namespace Microsoft.AspNetCore.Http.Tests { var headers = new HeaderDictionary(); var cookies = new ResponseCookies(headers, null); - var testcookie = "TestCookie"; + var testCookie = "TestCookie"; - cookies.Append(testcookie, testcookie); - cookies.Delete(testcookie); + cookies.Append(testCookie, testCookie); + cookies.Delete(testCookie); var cookieHeaderValues = headers[HeaderNames.SetCookie]; Assert.Single(cookieHeaderValues); - Assert.StartsWith(testcookie, cookieHeaderValues[0]); + Assert.StartsWith(testCookie, cookieHeaderValues[0]); Assert.Contains("path=/", cookieHeaderValues[0]); Assert.Contains("expires=Thu, 01 Jan 1970 00:00:00 GMT", cookieHeaderValues[0]); } @@ -80,9 +80,9 @@ namespace Microsoft.AspNetCore.Http.Tests var cookieOptions = new CookieOptions(); var maxAgeTime = TimeSpan.FromHours(1); cookieOptions.MaxAge = TimeSpan.FromHours(1); - var testcookie = "TestCookie"; + var testCookie = "TestCookie"; - cookies.Append(testcookie, testcookie, cookieOptions); + cookies.Append(testCookie, testCookie, cookieOptions); var cookieHeaderValues = headers[HeaderNames.SetCookie]; Assert.Single(cookieHeaderValues); diff --git a/test/Microsoft.AspNetCore.Owin.Tests/OwinEnvironmentTests.cs b/test/Microsoft.AspNetCore.Owin.Tests/OwinEnvironmentTests.cs index b728802914..58538c7f84 100644 --- a/test/Microsoft.AspNetCore.Owin.Tests/OwinEnvironmentTests.cs +++ b/test/Microsoft.AspNetCore.Owin.Tests/OwinEnvironmentTests.cs @@ -131,7 +131,7 @@ namespace Microsoft.AspNetCore.Owin } [Fact] - public void OwinEnvironmentImpelmentsGetEnumerator() + public void OwinEnvironmentImplementsGetEnumerator() { var owinEnvironment = new OwinEnvironment(CreateContext()); diff --git a/test/Microsoft.AspNetCore.WebUtilities.Tests/MultipartReaderTests.cs b/test/Microsoft.AspNetCore.WebUtilities.Tests/MultipartReaderTests.cs index d66ea98fed..b92bb5ff92 100644 --- a/test/Microsoft.AspNetCore.WebUtilities.Tests/MultipartReaderTests.cs +++ b/test/Microsoft.AspNetCore.WebUtilities.Tests/MultipartReaderTests.cs @@ -106,7 +106,7 @@ namespace Microsoft.AspNetCore.WebUtilities } [Fact] - public async Task MutipartReader_ReadSinglePartBody_Success() + public async Task MultipartReader_ReadSinglePartBody_Success() { var stream = MakeStream(OnePartBody); var reader = new MultipartReader(Boundary, stream); @@ -123,7 +123,7 @@ namespace Microsoft.AspNetCore.WebUtilities } [Fact] - public async Task MutipartReader_HeaderCountExceeded_Throws() + public async Task MultipartReader_HeaderCountExceeded_Throws() { var stream = MakeStream(OnePartBodyTwoHeaders); var reader = new MultipartReader(Boundary, stream) @@ -136,7 +136,7 @@ namespace Microsoft.AspNetCore.WebUtilities } [Fact] - public async Task MutipartReader_HeadersLengthExceeded_Throws() + public async Task MultipartReader_HeadersLengthExceeded_Throws() { var stream = MakeStream(OnePartBodyTwoHeaders); var reader = new MultipartReader(Boundary, stream) @@ -149,7 +149,7 @@ namespace Microsoft.AspNetCore.WebUtilities } [Fact] - public async Task MutipartReader_ReadSinglePartBodyWithTrailingWhitespace_Success() + public async Task MultipartReader_ReadSinglePartBodyWithTrailingWhitespace_Success() { var stream = MakeStream(OnePartBodyWithTrailingWhitespace); var reader = new MultipartReader(Boundary, stream); @@ -166,7 +166,7 @@ namespace Microsoft.AspNetCore.WebUtilities } [Fact] - public async Task MutipartReader_ReadSinglePartBodyWithoutLastCRLF_Success() + public async Task MultipartReader_ReadSinglePartBodyWithoutLastCRLF_Success() { var stream = MakeStream(OnePartBodyWithoutFinalCRLF); var reader = new MultipartReader(Boundary, stream); @@ -183,7 +183,7 @@ namespace Microsoft.AspNetCore.WebUtilities } [Fact] - public async Task MutipartReader_ReadTwoPartBody_Success() + public async Task MultipartReader_ReadTwoPartBody_Success() { var stream = MakeStream(TwoPartBody); var reader = new MultipartReader(Boundary, stream); @@ -209,7 +209,7 @@ namespace Microsoft.AspNetCore.WebUtilities } [Fact] - public async Task MutipartReader_ReadTwoPartBodyWithUnicodeFileName_Success() + public async Task MultipartReader_ReadTwoPartBodyWithUnicodeFileName_Success() { var stream = MakeStream(TwoPartBodyWithUnicodeFileName); var reader = new MultipartReader(Boundary, stream); @@ -235,7 +235,7 @@ namespace Microsoft.AspNetCore.WebUtilities } [Fact] - public async Task MutipartReader_ThreePartBody_Success() + public async Task MultipartReader_ThreePartBody_Success() { var stream = MakeStream(ThreePartBody); var reader = new MultipartReader(Boundary, stream); @@ -270,7 +270,7 @@ namespace Microsoft.AspNetCore.WebUtilities } [Fact] - public void MutipartReader_BufferSizeMustBeLargerThanBoundary_Throws() + public void MultipartReader_BufferSizeMustBeLargerThanBoundary_Throws() { var stream = MakeStream(ThreePartBody); Assert.Throws(() => @@ -280,7 +280,7 @@ namespace Microsoft.AspNetCore.WebUtilities } [Fact] - public async Task MutipartReader_TwoPartBodyIncompleteBuffer_TwoSectionsReadSuccessfullyThirdSectionThrows() + public async Task MultipartReader_TwoPartBodyIncompleteBuffer_TwoSectionsReadSuccessfullyThirdSectionThrows() { var stream = MakeStream(TwoPartBodyIncompleteBuffer); var reader = new MultipartReader(Boundary, stream); @@ -311,7 +311,7 @@ namespace Microsoft.AspNetCore.WebUtilities } [Fact] - public async Task MutipartReader_ReadInvalidUtf8Header_ReplacementCharacters() + public async Task MultipartReader_ReadInvalidUtf8Header_ReplacementCharacters() { var body1 = "--9051914041544843365972754266\r\n" + @@ -346,7 +346,7 @@ namespace Microsoft.AspNetCore.WebUtilities } [Fact] - public async Task MutipartReader_ReadInvalidUtf8SurrogateHeader_ReplacementCharacters() + public async Task MultipartReader_ReadInvalidUtf8SurrogateHeader_ReplacementCharacters() { var body1 = "--9051914041544843365972754266\r\n" + diff --git a/test/Microsoft.Net.Http.Headers.Tests/ContentDispositionHeaderValueTest.cs b/test/Microsoft.Net.Http.Headers.Tests/ContentDispositionHeaderValueTest.cs index ad1f7fce1f..f2c53a8727 100644 --- a/test/Microsoft.Net.Http.Headers.Tests/ContentDispositionHeaderValueTest.cs +++ b/test/Microsoft.Net.Http.Headers.Tests/ContentDispositionHeaderValueTest.cs @@ -465,7 +465,7 @@ namespace Microsoft.Net.Http.Headers { { "inline", new ContentDispositionHeaderValue("inline") }, // @"This should be equivalent to not including the header at all." { "inline;", new ContentDispositionHeaderValue("inline") }, - { "inline;name=", new ContentDispositionHeaderValue("inline") { Parameters = { new NameValueHeaderValue("name", "") } } }, // TODO: passing in a null value causes a strange assert on CoreCLR before the test even starts. Not reproducable in the body of a test. + { "inline;name=", new ContentDispositionHeaderValue("inline") { Parameters = { new NameValueHeaderValue("name", "") } } }, // TODO: passing in a null value causes a strange assert on CoreCLR before the test even starts. Not reproducible in the body of a test. { "inline;name=value", new ContentDispositionHeaderValue("inline") { Name = "value" } }, { "inline;name=value;", new ContentDispositionHeaderValue("inline") { Name = "value" } }, { "inline;name=value;", new ContentDispositionHeaderValue("inline") { Name = "value" } }, diff --git a/test/Microsoft.Net.Http.Headers.Tests/CookieHeaderValueTest.cs b/test/Microsoft.Net.Http.Headers.Tests/CookieHeaderValueTest.cs index 416441991d..edd55bb7ab 100644 --- a/test/Microsoft.Net.Http.Headers.Tests/CookieHeaderValueTest.cs +++ b/test/Microsoft.Net.Http.Headers.Tests/CookieHeaderValueTest.cs @@ -286,7 +286,7 @@ namespace Microsoft.Net.Http.Headers public void CookieHeaderValue_ParseList_ExcludesInvalidValues(IList cookies, string[] input) { var results = CookieHeaderValue.ParseList(input); - // ParseList aways returns a list, even if empty. TryParseList may return null (via out). + // ParseList always returns a list, even if empty. TryParseList may return null (via out). Assert.Equal(cookies ?? new List(), results); } diff --git a/test/Microsoft.Net.Http.Headers.Tests/EntityTagHeaderValueTest.cs b/test/Microsoft.Net.Http.Headers.Tests/EntityTagHeaderValueTest.cs index f633fec226..b4ae186fb4 100644 --- a/test/Microsoft.Net.Http.Headers.Tests/EntityTagHeaderValueTest.cs +++ b/test/Microsoft.Net.Http.Headers.Tests/EntityTagHeaderValueTest.cs @@ -403,7 +403,7 @@ namespace Microsoft.Net.Http.Headers } [Fact] - public void ParseList_WithSomeInvlaidValues_ExcludesInvalidValues() + public void ParseList_WithSomeInvalidValues_ExcludesInvalidValues() { var inputs = new[] { @@ -433,7 +433,7 @@ namespace Microsoft.Net.Http.Headers } [Fact] - public void ParseStrictList_WithSomeInvlaidValues_Throws() + public void ParseStrictList_WithSomeInvalidValues_Throws() { var inputs = new[] { @@ -451,7 +451,7 @@ namespace Microsoft.Net.Http.Headers } [Fact] - public void TryParseList_WithSomeInvlaidValues_ExcludesInvalidValues() + public void TryParseList_WithSomeInvalidValues_ExcludesInvalidValues() { var inputs = new[] { @@ -482,7 +482,7 @@ namespace Microsoft.Net.Http.Headers } [Fact] - public void TryParseStrictList_WithSomeInvlaidValues_ReturnsFalse() + public void TryParseStrictList_WithSomeInvalidValues_ReturnsFalse() { var inputs = new[] { diff --git a/test/Microsoft.Net.Http.Headers.Tests/MediaTypeHeaderValueTest.cs b/test/Microsoft.Net.Http.Headers.Tests/MediaTypeHeaderValueTest.cs index e6c45f3584..63b2fa391b 100644 --- a/test/Microsoft.Net.Http.Headers.Tests/MediaTypeHeaderValueTest.cs +++ b/test/Microsoft.Net.Http.Headers.Tests/MediaTypeHeaderValueTest.cs @@ -617,7 +617,7 @@ namespace Microsoft.Net.Http.Headers } [Fact] - public void ParseList_WithSomeInvlaidValues_IgnoresInvalidValues() + public void ParseList_WithSomeInvalidValues_IgnoresInvalidValues() { var inputs = new[] { @@ -640,7 +640,7 @@ namespace Microsoft.Net.Http.Headers } [Fact] - public void ParseStrictList_WithSomeInvlaidValues_Throws() + public void ParseStrictList_WithSomeInvalidValues_Throws() { var inputs = new[] { @@ -651,7 +651,7 @@ namespace Microsoft.Net.Http.Headers } [Fact] - public void TryParseList_WithSomeInvlaidValues_IgnoresInvalidValues() + public void TryParseList_WithSomeInvalidValues_IgnoresInvalidValues() { var inputs = new[] { @@ -676,7 +676,7 @@ namespace Microsoft.Net.Http.Headers } [Fact] - public void TryParseStrictList_WithSomeInvlaidValues_ReturnsFalse() + public void TryParseStrictList_WithSomeInvalidValues_ReturnsFalse() { var inputs = new[] { diff --git a/test/Microsoft.Net.Http.Headers.Tests/NameValueHeaderValueTest.cs b/test/Microsoft.Net.Http.Headers.Tests/NameValueHeaderValueTest.cs index cac18debbb..4833b6898a 100644 --- a/test/Microsoft.Net.Http.Headers.Tests/NameValueHeaderValueTest.cs +++ b/test/Microsoft.Net.Http.Headers.Tests/NameValueHeaderValueTest.cs @@ -60,7 +60,7 @@ namespace Microsoft.Net.Http.Headers } [Fact] - public void Copy_NameOnly_SuccesfullyCopied() + public void Copy_NameOnly_SuccessfullyCopied() { var pair0 = new NameValueHeaderValue("name"); var pair1 = pair0.Copy(); @@ -95,7 +95,7 @@ namespace Microsoft.Net.Http.Headers } [Fact] - public void Copy_NameAndValue_SuccesfullyCopied() + public void Copy_NameAndValue_SuccessfullyCopied() { var pair0 = new NameValueHeaderValue("name", "value"); var pair1 = pair0.Copy(); @@ -466,7 +466,7 @@ namespace Microsoft.Net.Http.Headers } [Fact] - public void ParseList_WithSomeInvlaidValues_ExcludesInvalidValues() + public void ParseList_WithSomeInvalidValues_ExcludesInvalidValues() { var inputs = new[] { @@ -502,7 +502,7 @@ namespace Microsoft.Net.Http.Headers } [Fact] - public void ParseStrictList_WithSomeInvlaidValues_Throws() + public void ParseStrictList_WithSomeInvalidValues_Throws() { var inputs = new[] { @@ -520,7 +520,7 @@ namespace Microsoft.Net.Http.Headers } [Fact] - public void TryParseList_WithSomeInvlaidValues_ExcludesInvalidValues() + public void TryParseList_WithSomeInvalidValues_ExcludesInvalidValues() { var inputs = new[] { @@ -557,7 +557,7 @@ namespace Microsoft.Net.Http.Headers } [Fact] - public void TryParseStrictList_WithSomeInvlaidValues_ReturnsFalse() + public void TryParseStrictList_WithSomeInvalidValues_ReturnsFalse() { var inputs = new[] { diff --git a/test/Microsoft.Net.Http.Headers.Tests/RangeConditionHeaderValueTest.cs b/test/Microsoft.Net.Http.Headers.Tests/RangeConditionHeaderValueTest.cs index ce7c73997b..dab3f670a4 100644 --- a/test/Microsoft.Net.Http.Headers.Tests/RangeConditionHeaderValueTest.cs +++ b/test/Microsoft.Net.Http.Headers.Tests/RangeConditionHeaderValueTest.cs @@ -39,7 +39,7 @@ namespace Microsoft.Net.Http.Headers } [Fact] - public void ToString_UseDifferentrangeConditions_AllSerializedCorrectly() + public void ToString_UseDifferentRangeConditions_AllSerializedCorrectly() { var rangeCondition = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"x\"")); Assert.Equal("\"x\"", rangeCondition.ToString()); @@ -49,7 +49,7 @@ namespace Microsoft.Net.Http.Headers } [Fact] - public void GetHashCode_UseSameAndDifferentrangeConditions_SameOrDifferentHashCodes() + public void GetHashCode_UseSameAndDifferentRangeConditions_SameOrDifferentHashCodes() { var rangeCondition1 = new RangeConditionHeaderValue("\"x\""); var rangeCondition2 = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"x\"")); diff --git a/test/Microsoft.Net.Http.Headers.Tests/SetCookieHeaderValueTest.cs b/test/Microsoft.Net.Http.Headers.Tests/SetCookieHeaderValueTest.cs index e7e8bf045a..9a920f40d0 100644 --- a/test/Microsoft.Net.Http.Headers.Tests/SetCookieHeaderValueTest.cs +++ b/test/Microsoft.Net.Http.Headers.Tests/SetCookieHeaderValueTest.cs @@ -389,7 +389,7 @@ namespace Microsoft.Net.Http.Headers public void SetCookieHeaderValue_ParseList_ExcludesInvalidValues(IList cookies, string[] input) { var results = SetCookieHeaderValue.ParseList(input); - // ParseList aways returns a list, even if empty. TryParseList may return null (via out). + // ParseList always returns a list, even if empty. TryParseList may return null (via out). Assert.Equal(cookies ?? new List(), results); } diff --git a/test/Microsoft.Net.Http.Headers.Tests/StringWithQualityHeaderValueTest.cs b/test/Microsoft.Net.Http.Headers.Tests/StringWithQualityHeaderValueTest.cs index 49ee58b93e..971ad1028f 100644 --- a/test/Microsoft.Net.Http.Headers.Tests/StringWithQualityHeaderValueTest.cs +++ b/test/Microsoft.Net.Http.Headers.Tests/StringWithQualityHeaderValueTest.cs @@ -354,7 +354,7 @@ namespace Microsoft.Net.Http.Headers } [Fact] - public void ParseList_WithSomeInvlaidValues_IgnoresInvalidValues() + public void ParseList_WithSomeInvalidValues_IgnoresInvalidValues() { var inputs = new[] { @@ -392,7 +392,7 @@ namespace Microsoft.Net.Http.Headers } [Fact] - public void ParseStrictList_WithSomeInvlaidValues_Throws() + public void ParseStrictList_WithSomeInvalidValues_Throws() { var inputs = new[] { @@ -412,7 +412,7 @@ namespace Microsoft.Net.Http.Headers } [Fact] - public void TryParseList_WithSomeInvlaidValues_IgnoresInvalidValues() + public void TryParseList_WithSomeInvalidValues_IgnoresInvalidValues() { var inputs = new[] { @@ -451,7 +451,7 @@ namespace Microsoft.Net.Http.Headers } [Fact] - public void TryParseStrictList_WithSomeInvlaidValues_ReturnsFalse() + public void TryParseStrictList_WithSomeInvalidValues_ReturnsFalse() { var inputs = new[] { From cbafd89960b019dea7a26f28016712e95faca174 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 9 Sep 2018 12:14:09 -0700 Subject: [PATCH 30/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 26 +++++++++++++------------- korebuild-lock.txt | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 89aeb80853..5a30ffd283 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,20 +3,20 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 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-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.0.9 - 2.1.2 - 2.2.0-preview1-26618-02 + 2.1.3 + 2.2.0-preview2-26905-02 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 d0ddb068bea92f75fa0c783e97065ecbe3b2e04c Mon Sep 17 00:00:00 2001 From: Pranav K Date: Thu, 13 Sep 2018 13:35:31 -0700 Subject: [PATCH 31/41] Return FormCollection.Empty when Content-Length is 0 (#1038) * Return FormCollection.Empty when Content-Length is 0 Fixes https://github.com/aspnet/Mvc/issues/5631 --- .../Features/FormFeature.cs | 5 +++++ .../Features/FormFeatureTests.cs | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/Microsoft.AspNetCore.Http/Features/FormFeature.cs b/src/Microsoft.AspNetCore.Http/Features/FormFeature.cs index 02c1bd7a8b..865e183f76 100644 --- a/src/Microsoft.AspNetCore.Http/Features/FormFeature.cs +++ b/src/Microsoft.AspNetCore.Http/Features/FormFeature.cs @@ -131,6 +131,11 @@ namespace Microsoft.AspNetCore.Http.Features cancellationToken.ThrowIfCancellationRequested(); + if (_request.ContentLength == 0) + { + return FormCollection.Empty; + } + if (_options.BufferBody) { _request.EnableRewind(_options.MemoryBufferThreshold, _options.BufferBodyLengthLimit); diff --git a/test/Microsoft.AspNetCore.Http.Tests/Features/FormFeatureTests.cs b/test/Microsoft.AspNetCore.Http.Tests/Features/FormFeatureTests.cs index 591f46a43e..cfa8b0215b 100644 --- a/test/Microsoft.AspNetCore.Http.Tests/Features/FormFeatureTests.cs +++ b/test/Microsoft.AspNetCore.Http.Tests/Features/FormFeatureTests.cs @@ -12,6 +12,23 @@ namespace Microsoft.AspNetCore.Http.Features { public class FormFeatureTests { + [Fact] + public async Task ReadFormAsync_0ContentLength_ReturnsEmptyForm() + { + var context = new DefaultHttpContext(); + var responseFeature = new FakeResponseFeature(); + context.Features.Set(responseFeature); + context.Request.ContentType = MultipartContentType; + context.Request.ContentLength = 0; + + var formFeature = new FormFeature(context.Request, new FormOptions()); + context.Features.Set(formFeature); + + var formCollection = await context.Request.ReadFormAsync(); + + Assert.Same(FormCollection.Empty, formCollection); + } + [Theory] [InlineData(true)] [InlineData(false)] From de1f0ac3ffe9d7b71887ffbe50803c75acf27824 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 16 Sep 2018 12:12:50 -0700 Subject: [PATCH 32/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 22 +++++++++++----------- korebuild-lock.txt | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 5a30ffd283..e30bf31af0 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,17 +3,17 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 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-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.0.9 2.1.3 2.2.0-preview2-26905-02 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 7488fc087875309738b4388eb2e251d7aa958ab0 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 23 Sep 2018 19:15:01 +0000 Subject: [PATCH 33/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 22 +++++++++++----------- korebuild-lock.txt | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index e30bf31af0..f22a7ad37b 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,17 +3,17 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 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-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.0.9 2.1.3 2.2.0-preview2-26905-02 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 4f0908d2f29745f039c3d8848deed7c230edb2c2 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Fri, 28 Sep 2018 17:10:34 -0700 Subject: [PATCH 34/41] 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 0f13dc2004..41c157c6ff 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 30172616ed57f17c5bcf31e7f021914cb4d27e78 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 30 Sep 2018 12:15:12 -0700 Subject: [PATCH 35/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 24 ++++++++++++------------ korebuild-lock.txt | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index f22a7ad37b..62af6ab871 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,20 +3,20 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 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-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.0.9 2.1.3 - 2.2.0-preview2-26905-02 + 2.2.0-preview3-26927-02 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 89b0430bdad0f0ddb253ae699ea6b37e7108e89b Mon Sep 17 00:00:00 2001 From: "Chris Ross (ASP.NET)" Date: Wed, 3 Oct 2018 11:29:51 -0700 Subject: [PATCH 36/41] Add IHttpResponseTrailersFeature and extensions --- .../Extensions/ResponseTrailerExtensions.cs | 53 +++++++++++++++++++ .../IHttpResponseTrailersFeature.cs | 10 ++++ 2 files changed, 63 insertions(+) create mode 100644 src/Microsoft.AspNetCore.Http.Abstractions/Extensions/ResponseTrailerExtensions.cs create mode 100644 src/Microsoft.AspNetCore.Http.Features/IHttpResponseTrailersFeature.cs diff --git a/src/Microsoft.AspNetCore.Http.Abstractions/Extensions/ResponseTrailerExtensions.cs b/src/Microsoft.AspNetCore.Http.Abstractions/Extensions/ResponseTrailerExtensions.cs new file mode 100644 index 0000000000..745cbfd9de --- /dev/null +++ b/src/Microsoft.AspNetCore.Http.Abstractions/Extensions/ResponseTrailerExtensions.cs @@ -0,0 +1,53 @@ +// 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.AspNetCore.Http.Features; +using Microsoft.Extensions.Primitives; + +namespace Microsoft.AspNetCore.Http +{ + public static class ResponseTrailerExtensions + { + private const string Trailer = "Trailer"; + + /// + /// Adds the given trailer name to the 'Trailer' response header. This must happen before the response headers are sent. + /// + /// + /// + public static void DeclareTrailer(this HttpResponse response, string trailerName) + { + response.Headers.AppendCommaSeparatedValues(Trailer, trailerName); + } + + /// + /// Indicates if the server supports sending trailer headers for this response. + /// + /// + /// + public static bool SupportsTrailers(this HttpResponse response) + { + var feature = response.HttpContext.Features.Get(); + return feature?.Trailers != null && !feature.Trailers.IsReadOnly; + } + + /// + /// Adds the given trailer header to the trailers collection to be sent at the end of the response body. + /// Check or an InvalidOperationException may be thrown. + /// + /// + /// + /// + public static void AppendTrailer(this HttpResponse response, string trailerName, StringValues trailerValues) + { + var feature = response.HttpContext.Features.Get(); + if (feature?.Trailers == null || feature.Trailers.IsReadOnly) + { + throw new InvalidOperationException("Trailers are not supported for this response."); + } + + feature.Trailers.Append(trailerName, trailerValues); + } + } +} diff --git a/src/Microsoft.AspNetCore.Http.Features/IHttpResponseTrailersFeature.cs b/src/Microsoft.AspNetCore.Http.Features/IHttpResponseTrailersFeature.cs new file mode 100644 index 0000000000..edd8fbea35 --- /dev/null +++ b/src/Microsoft.AspNetCore.Http.Features/IHttpResponseTrailersFeature.cs @@ -0,0 +1,10 @@ +// 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. + +namespace Microsoft.AspNetCore.Http.Features +{ + public interface IHttpResponseTrailersFeature + { + IHeaderDictionary Trailers { get; set; } + } +} From 2368024490e796329ba4e50c57e6e376011c45ee Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Sun, 7 Oct 2018 19:15:41 +0000 Subject: [PATCH 37/41] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 24 ++++++++++++------------ korebuild-lock.txt | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 62af6ab871..0e476755c6 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -3,20 +3,20 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 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-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.0.9 2.1.3 - 2.2.0-preview3-26927-02 + 2.2.0-preview3-27001-02 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 f6e20a38e29226703d550e02593d084db44146c4 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Thu, 11 Oct 2018 04:27:33 +1300 Subject: [PATCH 38/41] HostString throws ArgumentNullException for null host (#1045) --- src/Microsoft.AspNetCore.Http.Abstractions/HostString.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.AspNetCore.Http.Abstractions/HostString.cs b/src/Microsoft.AspNetCore.Http.Abstractions/HostString.cs index 9496b26bac..7851659be0 100644 --- a/src/Microsoft.AspNetCore.Http.Abstractions/HostString.cs +++ b/src/Microsoft.AspNetCore.Http.Abstractions/HostString.cs @@ -35,7 +35,12 @@ namespace Microsoft.AspNetCore.Http /// A positive, greater than 0 value representing the port in the host string. public HostString(string host, int port) { - if(port <= 0) + if (host == null) + { + throw new ArgumentNullException(nameof(host)); + } + + if (port <= 0) { throw new ArgumentOutOfRangeException(nameof(port), Resources.Exception_PortMustBeGreaterThanZero); } From 800c79c0e4d3ee7423e9a255ad398e429659912f Mon Sep 17 00:00:00 2001 From: Ben Adams Date: Sat, 1 Sep 2018 03:19:43 +0100 Subject: [PATCH 39/41] Fast-path async in HttpResponseStreamWriter --- .../HttpResponseStreamWriter.cs | 98 ++++++++++++++++--- 1 file changed, 86 insertions(+), 12 deletions(-) diff --git a/src/Microsoft.AspNetCore.WebUtilities/HttpResponseStreamWriter.cs b/src/Microsoft.AspNetCore.WebUtilities/HttpResponseStreamWriter.cs index 050088ccb7..9e0bf57c92 100644 --- a/src/Microsoft.AspNetCore.WebUtilities/HttpResponseStreamWriter.cs +++ b/src/Microsoft.AspNetCore.WebUtilities/HttpResponseStreamWriter.cs @@ -3,7 +3,9 @@ using System; using System.Buffers; +using System.Diagnostics; using System.IO; +using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; @@ -150,34 +152,66 @@ namespace Microsoft.AspNetCore.WebUtilities } } - public override async Task WriteAsync(char value) + public override Task WriteAsync(char value) { if (_disposed) { - throw new ObjectDisposedException(nameof(HttpResponseStreamWriter)); + return GetObjectDisposedTask(); } if (_charBufferCount == _charBufferSize) { - await FlushInternalAsync(flushEncoder: false); + return WriteAsyncAwaited(value); } + else + { + // Enough room in buffer, no need to go async + _charBuffer[_charBufferCount] = value; + _charBufferCount++; + return Task.CompletedTask; + } + } + + private async Task WriteAsyncAwaited(char value) + { + Debug.Assert(_charBufferCount == _charBufferSize); + + await FlushInternalAsync(flushEncoder: false); _charBuffer[_charBufferCount] = value; _charBufferCount++; } - public override async Task WriteAsync(char[] values, int index, int count) + public override Task WriteAsync(char[] values, int index, int count) { if (_disposed) { - throw new ObjectDisposedException(nameof(HttpResponseStreamWriter)); + return GetObjectDisposedTask(); } - if (values == null) + if (values == null || count == 0) { - return; + return Task.CompletedTask; } + var remaining = _charBufferSize - _charBufferCount; + if (remaining >= count) + { + // Enough room in buffer, no need to go async + CopyToCharBuffer(values, ref index, ref count); + return Task.CompletedTask; + } + else + { + return WriteAsyncAwaited(values, index, count); + } + } + + private async Task WriteAsyncAwaited(char[] values, int index, int count) + { + Debug.Assert(count > 0); + Debug.Assert(_charBufferSize - _charBufferCount > count); + while (count > 0) { if (_charBufferCount == _charBufferSize) @@ -186,22 +220,43 @@ namespace Microsoft.AspNetCore.WebUtilities } CopyToCharBuffer(values, ref index, ref count); + Debug.Assert(count == 0); } } - public override async Task WriteAsync(string value) + public override Task WriteAsync(string value) { if (_disposed) { - throw new ObjectDisposedException(nameof(HttpResponseStreamWriter)); + return GetObjectDisposedTask(); } - if (value == null) + var count = value?.Length ?? 0; + if (count == 0) { - return; + return Task.CompletedTask; } + var remaining = _charBufferSize - _charBufferCount; + if (remaining >= count) + { + // Enough room in buffer, no need to go async + CopyToCharBuffer(value); + return Task.CompletedTask; + } + else + { + return WriteAsyncAwaited(value); + } + } + + private async Task WriteAsyncAwaited(string value) + { var count = value.Length; + + Debug.Assert(count > 0); + Debug.Assert(_charBufferSize - _charBufferCount < count); + var index = 0; while (count > 0) { @@ -231,7 +286,7 @@ namespace Microsoft.AspNetCore.WebUtilities { if (_disposed) { - throw new ObjectDisposedException(nameof(HttpResponseStreamWriter)); + return GetObjectDisposedTask(); } return FlushInternalAsync(flushEncoder: true); @@ -306,6 +361,19 @@ namespace Microsoft.AspNetCore.WebUtilities } } + private void CopyToCharBuffer(string value) + { + Debug.Assert(_charBufferSize - _charBufferCount >= value.Length); + + value.CopyTo( + sourceIndex: 0, + destination: _charBuffer, + destinationIndex: _charBufferCount, + count: value.Length); + + _charBufferCount += value.Length; + } + private void CopyToCharBuffer(string value, ref int index, ref int count) { var remaining = Math.Min(_charBufferSize - _charBufferCount, count); @@ -336,5 +404,11 @@ namespace Microsoft.AspNetCore.WebUtilities index += remaining; count -= remaining; } + + [MethodImpl(MethodImplOptions.NoInlining)] + private static Task GetObjectDisposedTask() + { + return Task.FromException(new ObjectDisposedException(nameof(HttpResponseStreamWriter))); + } } } From 19908d91c7e5b1d22aaf0ad4d920e7c73998002d Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Tue, 16 Oct 2018 12:48:14 -0700 Subject: [PATCH 40/41] Update package branding for 2.2 RTM --- version.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.props b/version.props index 704cac087b..4889a26987 100644 --- a/version.props +++ b/version.props @@ -1,7 +1,7 @@ 2.2.0 - preview3 + rtm $(VersionPrefix) $(VersionPrefix)-$(VersionSuffix)-final t000 From 91db78cf926939821bc96e8e60616cf5dde0b489 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 24 Oct 2018 15:10:19 -0700 Subject: [PATCH 41/41] Add safe copy for enumeration (#1052) --- .../AuthenticationSchemeProvider.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.AspNetCore.Authentication.Core/AuthenticationSchemeProvider.cs b/src/Microsoft.AspNetCore.Authentication.Core/AuthenticationSchemeProvider.cs index c14608511b..a7b913b1b2 100644 --- a/src/Microsoft.AspNetCore.Authentication.Core/AuthenticationSchemeProvider.cs +++ b/src/Microsoft.AspNetCore.Authentication.Core/AuthenticationSchemeProvider.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Options; @@ -49,6 +50,9 @@ namespace Microsoft.AspNetCore.Authentication private readonly IDictionary _schemes; private readonly List _requestHandlers; + // Used as a safe return value for enumeration apis + private IEnumerable _schemesCopy = Array.Empty(); + private IEnumerable _requestHandlersCopy = Array.Empty(); private Task GetDefaultSchemeAsync() => _options.DefaultScheme != null @@ -123,7 +127,7 @@ namespace Microsoft.AspNetCore.Authentication /// /// The schemes in priority order for request handling public virtual Task> GetRequestHandlerSchemesAsync() - => Task.FromResult>(_requestHandlers); + => Task.FromResult(_requestHandlersCopy); /// /// Registers a scheme for use by . @@ -144,8 +148,10 @@ namespace Microsoft.AspNetCore.Authentication if (typeof(IAuthenticationRequestHandler).IsAssignableFrom(scheme.HandlerType)) { _requestHandlers.Add(scheme); + _requestHandlersCopy = _requestHandlers.ToArray(); } _schemes[scheme.Name] = scheme; + _schemesCopy = _schemes.Values.ToArray(); } } @@ -164,13 +170,17 @@ namespace Microsoft.AspNetCore.Authentication if (_schemes.ContainsKey(name)) { var scheme = _schemes[name]; - _requestHandlers.Remove(scheme); + if (_requestHandlers.Remove(scheme)) + { + _requestHandlersCopy = _requestHandlers.ToArray(); + } _schemes.Remove(name); + _schemesCopy = _schemes.Values.ToArray(); } } } public virtual Task> GetAllSchemesAsync() - => Task.FromResult>(_schemes.Values); + => Task.FromResult(_schemesCopy); } } \ No newline at end of file