Skip to content

Commit 32dc0f1

Browse files
committed
Merge in 'release/7.0' changes
2 parents bc027fb + 36ca30c commit 32dc0f1

File tree

25 files changed

+161
-141
lines changed

25 files changed

+161
-141
lines changed

src/Components/Web.JS/src/Platform/Mono/MonoDebugger.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const navigatorUA = navigator as MonoNavigatorUserAgent;
77
const brands = navigatorUA.userAgentData && navigatorUA.userAgentData.brands;
88
// eslint-disable-next-line @typescript-eslint/no-explicit-any
99
const currentBrowserIsChromeOrEdge = brands
10-
? brands.some(b => b.brand === 'Google Chrome' || b.brand === 'Microsoft Edge')
10+
? brands.some(b => b.brand === 'Google Chrome' || b.brand === 'Microsoft Edge' || b.brand === 'Chromium')
1111
: (window as any).chrome;
1212
const platform = navigatorUA.userAgentData?.platform ?? navigator.platform;
1313

@@ -34,7 +34,7 @@ export function attachDebuggerHotkey(resourceLoader: WebAssemblyResourceLoader):
3434
if (!debugBuild && !hasReferencedPdbs) {
3535
console.error('Cannot start debugging, because the application was not compiled with debugging enabled.');
3636
} else if (!currentBrowserIsChromeOrEdge) {
37-
console.error('Currently, only Microsoft Edge (80+), or Google Chrome, are supported for debugging.');
37+
console.error('Currently, only Microsoft Edge (80+), Google Chrome, or Chromium, are supported for debugging.');
3838
} else {
3939
launchDebugger();
4040
}

src/Components/WebAssembly/Server/src/TargetPickerUi.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Ensure your browser is running with debugging enabled.
6565
</p>
6666
<h2>Resolution</h2>
6767
<p>
68-
<h4>If you are using Google Chrome for your development, follow these instructions:</h4>
68+
<h4>If you are using Google Chrome or Chromium for your development, follow these instructions:</h4>
6969
{GetLaunchChromeInstructions(targetApplicationUrl.ToString())}
7070
</p>
7171
<p>

src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,22 @@ This package is an internal implementation of the .NET Core SDK and is not meant
249249
<!-- This project doesn't compile anything. -->
250250
<Target Name="CoreCompile" />
251251

252-
<Target Name="FilterUnwantedContent">
252+
<Target Name="FilterUnwantedContent"
253+
DependsOnTargets="_ExpandRuntimePackageRoot">
253254
<ItemGroup>
254255
<!-- These files end up in this item group as a result of setting CopyLocalLockFileAssemblies, but shouldn't be. -->
255256
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'%(FileName)' == 'apphost' OR '%(FileName)' == '$(LibPrefix)hostfxr' OR '%(FileName)' == '$(LibPrefix)hostpolicy' "/>
256257
</ItemGroup>
258+
259+
<ItemGroup>
260+
<RuntimePackageFiles Include="$(RuntimePackageRoot)runtimes\**\*" />
261+
<!--
262+
Filter out any overlap between our SharedFx (ReferenceCopyLocalPaths) and dotnet/runtime's SharedFx (RuntimePackageFiles).
263+
Most of the time there is no overlap, but in certain rare corner cases there can be.
264+
See https://github.com/dotnet/aspnetcore/issues/45033 for more detail.
265+
-->
266+
<ReferenceCopyLocalPaths Remove="@(RuntimePackageFiles)" MatchOnMetadata="FileName"/>
267+
</ItemGroup>
257268
</Target>
258269

259270
<Target Name="_WarnAboutUnbuiltNativeDependencies"
@@ -385,7 +396,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
385396

386397
<Target Name="PrepareForCrossGen"
387398
Condition="'$(CrossgenOutput)' == 'true'"
388-
DependsOnTargets="_ExpandRuntimePackageRoot">
399+
DependsOnTargets="FilterUnwantedContent">
389400
<!-- The output directories of assemblies built in this repo contain a mix of ref and impl assemblies. Copy impl assemblies to a separate directory. -->
390401
<RemoveDir Directories="$(CrossgenPlatformAssembliesDir)" />
391402
<Copy SourceFiles="@(ReferenceCopyLocalPaths)" DestinationFolder="$(CrossgenPlatformAssembliesDir)" Condition="'%(ReferenceCopyLocalPaths.ProjectPath)' != ''"/>
@@ -426,10 +437,6 @@ This package is an internal implementation of the .NET Core SDK and is not meant
426437
File="$(CrossgenToolDir)PlatformAssembliesPathsCrossgen2.rsp"
427438
Overwrite="true" />
428439

429-
<ItemGroup>
430-
<RuntimePackageFiles Include="$(RuntimePackageRoot)runtimes\**\*" />
431-
</ItemGroup>
432-
433440
<Error Text="Could not find crossgen2 $(CrossgenToolPath)" Condition=" ! Exists($(CrossgenToolPath))" />
434441

435442
<!-- Create tool directory with runtime assemblies -->

src/Http/Http.Extensions/src/RequestDelegateFactory.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public static partial class RequestDelegateFactory
9191
private static readonly MemberExpression FormFilesExpr = Expression.Property(FormExpr, typeof(IFormCollection).GetProperty(nameof(IFormCollection.Files))!);
9292
private static readonly MemberExpression StatusCodeExpr = Expression.Property(HttpResponseExpr, typeof(HttpResponse).GetProperty(nameof(HttpResponse.StatusCode))!);
9393
private static readonly MemberExpression CompletedTaskExpr = Expression.Property(null, (PropertyInfo)GetMemberInfo<Func<Task>>(() => Task.CompletedTask));
94-
private static readonly NewExpression CompletedValueTaskExpr = Expression.New(typeof(ValueTask<object>).GetConstructor(new[] { typeof(Task) })!, CompletedTaskExpr);
94+
private static readonly NewExpression EmptyHttpResultValueTaskExpr = Expression.New(typeof(ValueTask<object>).GetConstructor(new[] { typeof(EmptyHttpResult) })!, Expression.Property(null, typeof(EmptyHttpResult), nameof(EmptyHttpResult.Instance)));
9595

9696
private static readonly ParameterExpression TempSourceStringExpr = ParameterBindingMethodCache.TempSourceStringExpr;
9797
private static readonly BinaryExpression TempSourceStringNotNullExpr = Expression.NotEqual(TempSourceStringExpr, Expression.Constant(null));
@@ -424,7 +424,7 @@ targetExpression is null
424424
var filteredInvocation = Expression.Lambda<EndpointFilterDelegate>(
425425
Expression.Condition(
426426
Expression.GreaterThanOrEqual(FilterContextHttpContextStatusCodeExpr, Expression.Constant(400)),
427-
CompletedValueTaskExpr,
427+
EmptyHttpResultValueTaskExpr,
428428
handlerInvocation),
429429
FilterContextExpr).Compile();
430430
var routeHandlerContext = new EndpointFilterFactoryContext
@@ -455,7 +455,7 @@ private static Expression MapHandlerReturnTypeToValueTask(Expression methodCall,
455455
{
456456
if (returnType == typeof(void))
457457
{
458-
return Expression.Block(methodCall, Expression.Constant(new ValueTask<object?>(EmptyHttpResult.Instance)));
458+
return Expression.Block(methodCall, EmptyHttpResultValueTaskExpr);
459459
}
460460
else if (returnType == typeof(Task))
461461
{

src/Http/Http.Extensions/test/RequestDelegateFactoryTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5246,6 +5246,8 @@ string HelloName(string name)
52465246
};
52475247

52485248
var httpContext = CreateHttpContext();
5249+
var responseBodyStream = new MemoryStream();
5250+
httpContext.Response.Body = responseBodyStream;
52495251

52505252
// Act
52515253
var factoryResult = RequestDelegateFactory.Create(HelloName, new RequestDelegateFactoryOptions()
@@ -5265,6 +5267,7 @@ string HelloName(string name)
52655267
// Assert
52665268
Assert.False(invoked);
52675269
Assert.Equal(400, httpContext.Response.StatusCode);
5270+
Assert.Equal(0, responseBodyStream.Position);
52685271
}
52695272

52705273
[Fact]

src/Http/Http/test/RequestCookiesCollectionTests.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,29 @@ public void ParseManyCookies()
4444

4545
Assert.Equal(12, cookies.Count);
4646
}
47+
48+
[Theory]
49+
[InlineData(",", null)]
50+
[InlineData(";", null)]
51+
[InlineData("er=dd,cc,bb", new[] { "dd" })]
52+
[InlineData("er=dd,err=cc,errr=bb", new[] { "dd", "cc", "bb" })]
53+
[InlineData("errorcookie=dd,:(\"sa;", new[] { "dd" })]
54+
[InlineData("s;", null)]
55+
public void ParseInvalidCookies(string cookieToParse, string[] expectedCookieValues)
56+
{
57+
var cookies = RequestCookieCollection.Parse(new StringValues(new[] { cookieToParse }));
58+
59+
if (expectedCookieValues == null)
60+
{
61+
Assert.Equal(0, cookies.Count);
62+
return;
63+
}
64+
65+
Assert.Equal(expectedCookieValues.Length, cookies.Count);
66+
for (int i = 0; i < expectedCookieValues.Length; i++)
67+
{
68+
var value = expectedCookieValues[i];
69+
Assert.Equal(value, cookies.ElementAt(i).Value);
70+
}
71+
}
4772
}

src/Http/Shared/CookieHeaderParserShared.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,12 @@ public static bool TryParseValues(StringValues values, IDictionary<string, strin
2929
if (TryParseValue(value, ref index, supportsMultipleValues, out var parsedName, out var parsedValue))
3030
{
3131
// The entry may not contain an actual value, like " , "
32-
var name = enableCookieNameEncoding ? Uri.UnescapeDataString(parsedName.Value.Value!) : parsedName.Value.Value!;
33-
store[name] = Uri.UnescapeDataString(parsedValue.Value.Value!);
34-
hasFoundValue = true;
32+
if (parsedName != null && parsedValue != null)
33+
{
34+
var name = enableCookieNameEncoding ? Uri.UnescapeDataString(parsedName.Value.Value!) : parsedName.Value.Value!;
35+
store[name] = Uri.UnescapeDataString(parsedValue.Value.Value!);
36+
hasFoundValue = true;
37+
}
3538
}
3639
else
3740
{

src/Installers/Windows/WindowsHostingBundle/1028/thm.wxl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@
6161

6262
<!-- Custom UI strings -->
6363
<String Id="Welcome">歡迎使用 [WixBundleName] 安裝程式。</String>
64-
<String Id="InstallResetIIS">請在安裝完成後重新啟動 IIS。如需其他資訊,請參閱&lt;a href="https://go.microsoft.com/fwlink/?LinkId=798277"&gt;這裡&lt;/a&gt;。</String>
65-
<String Id="InstallNoIIS">這部電腦上未啟用 IIS。如果您要使用 IIS 執行 ASP.NET Core 應用程式,就必須先安裝 IIS 才能執行此安裝程式。如需其他資訊,請參閱&lt;a href="https://go.microsoft.com/fwlink/?LinkId=798277"&gt;這裡&lt;/a&gt;。</String>
64+
<String Id="InstallResetIIS">請在安裝完成後重新啟動 IIS。如需其他資訊,請參閱&lt;a href="https://aka.ms/aspnet/7.0/host-and-deploy-with-iis"&gt;這裡&lt;/a&gt;。</String>
65+
<String Id="InstallNoIIS">這部電腦上未啟用 IIS。如果您要使用 IIS 執行 ASP.NET Core 應用程式,就必須先安裝 IIS 才能執行此安裝程式。如需其他資訊,請參閱&lt;a href="https://aka.ms/aspnet/7.0/host-and-deploy-with-iis"&gt;這裡&lt;/a&gt;。</String>
6666
<String Id="EulaPrivacy">[WixBundleName] &lt;a href="https://go.microsoft.com/fwlink/?LinkId=329770"&gt;授權條款&lt;/a&gt;&lt;a href="https://go.microsoft.com/fwlink/?LinkId=786378"&gt;隱私權聲明&lt;/a&gt;。</String>
67-
<String Id="ModifyResetIIS">請在安裝完成後重新啟動 IIS。如需其他資訊,請參閱&lt;a href="https://go.microsoft.com/fwlink/?LinkId=798277"&gt;這裡&lt;/a&gt;。</String>
68-
<String Id="ModifyNoIIS">這部電腦上未啟用 IIS。如果您要使用 IIS 執行 ASP.NET Core 應用程式,就必須先安裝 IIS 才能執行此安裝程式。如需其他資訊,請參閱&lt;a href="https://go.microsoft.com/fwlink/?LinkId=798277"&gt;這裡&lt;/a&gt;。</String>
69-
</WixLocalization>
67+
<String Id="ModifyResetIIS">請在安裝完成後重新啟動 IIS。如需其他資訊,請參閱&lt;a href="https://aka.ms/aspnet/7.0/host-and-deploy-with-iis"&gt;這裡&lt;/a&gt;。</String>
68+
<String Id="ModifyNoIIS">這部電腦上未啟用 IIS。如果您要使用 IIS 執行 ASP.NET Core 應用程式,就必須先安裝 IIS 才能執行此安裝程式。如需其他資訊,請參閱&lt;a href="https://aka.ms/aspnet/7.0/host-and-deploy-with-iis"&gt;這裡&lt;/a&gt;。</String>
69+
</WixLocalization>

src/Installers/Windows/WindowsHostingBundle/1029/thm.wxl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@
6161

6262
<!-- Custom UI strings -->
6363
<String Id="Welcome">Vítá vás instalační program produktu [WixBundleName]</String>
64-
<String Id="InstallResetIIS">Po dokončení instalace prosím restartujte službu IIS. Další informace najdete &lt;a href="https://go.microsoft.com/fwlink/?LinkId=798277"&gt;tady&lt;/a&gt;.</String>
65-
<String Id="InstallNoIIS">Služba IIS není na tomto počítači povolená. Pokud máte v úmyslu spouštět aplikace ASP.NET Core se službou IIS, je nutné před spuštěním tohoto instalačního programu nainstalovat službu IIS. Další informace najdete &lt;a href="https://go.microsoft.com/fwlink/?LinkId=798277"&gt;tady&lt;/a&gt;.</String>
64+
<String Id="InstallResetIIS">Po dokončení instalace prosím restartujte službu IIS. Další informace najdete &lt;a href="https://aka.ms/aspnet/7.0/host-and-deploy-with-iis"&gt;tady&lt;/a&gt;.</String>
65+
<String Id="InstallNoIIS">Služba IIS není na tomto počítači povolená. Pokud máte v úmyslu spouštět aplikace ASP.NET Core se službou IIS, je nutné před spuštěním tohoto instalačního programu nainstalovat službu IIS. Další informace najdete &lt;a href="https://aka.ms/aspnet/7.0/host-and-deploy-with-iis"&gt;tady&lt;/a&gt;.</String>
6666
<String Id="EulaPrivacy">[WixBundleName] – &lt;a href="https://go.microsoft.com/fwlink/?LinkId=329770"&gt;licenční podmínky&lt;/a&gt; a &lt;a href="https://go.microsoft.com/fwlink/?LinkId=786378"&gt;prohlášení o zásadách ochrany osobních údajů&lt;/a&gt;</String>
67-
<String Id="ModifyResetIIS">Po dokončení instalace prosím restartujte službu IIS. Další informace najdete &lt;a href="https://go.microsoft.com/fwlink/?LinkId=798277"&gt;tady&lt;/a&gt;.</String>
68-
<String Id="ModifyNoIIS">Služba IIS není na tomto počítači povolená. Pokud máte v úmyslu spouštět aplikace ASP.NET Core se službou IIS, je nutné před spuštěním tohoto instalačního programu nainstalovat službu IIS. Další informace najdete &lt;a href="https://go.microsoft.com/fwlink/?LinkId=798277"&gt;tady&lt;/a&gt;.</String>
69-
</WixLocalization>
67+
<String Id="ModifyResetIIS">Po dokončení instalace prosím restartujte službu IIS. Další informace najdete &lt;a href="https://aka.ms/aspnet/7.0/host-and-deploy-with-iis"&gt;tady&lt;/a&gt;.</String>
68+
<String Id="ModifyNoIIS">Služba IIS není na tomto počítači povolená. Pokud máte v úmyslu spouštět aplikace ASP.NET Core se službou IIS, je nutné před spuštěním tohoto instalačního programu nainstalovat službu IIS. Další informace najdete &lt;a href="https://aka.ms/aspnet/7.0/host-and-deploy-with-iis"&gt;tady&lt;/a&gt;.</String>
69+
</WixLocalization>

src/Installers/Windows/WindowsHostingBundle/1031/thm.wxl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@
6161

6262
<!-- Custom UI strings -->
6363
<String Id="Welcome">Willkommen beim Setup von [WixBundleName].</String>
64-
<String Id="InstallResetIIS">Starten Sie IIS nach Abschluss der Installation neu. Zusätzliche Informationen finden Sie &lt;a href="https://go.microsoft.com/fwlink/?LinkId=798277"&gt;hier&lt;/a&gt;.</String>
65-
<String Id="InstallNoIIS">IIS ist auf diesem Computer nicht aktiviert. Wenn Sie ASP.NET Core-Anwendungen mit IIS ausführen möchten, müssen Sie IIS installieren, bevor Sie diesen Installer ausführen. Zusätzliche Informationen finden Sie &lt;a href="https://go.microsoft.com/fwlink/?LinkId=798277"&gt;hier&lt;/a&gt;.</String>
64+
<String Id="InstallResetIIS">Starten Sie IIS nach Abschluss der Installation neu. Zusätzliche Informationen finden Sie &lt;a href="https://aka.ms/aspnet/7.0/host-and-deploy-with-iis"&gt;hier&lt;/a&gt;.</String>
65+
<String Id="InstallNoIIS">IIS ist auf diesem Computer nicht aktiviert. Wenn Sie ASP.NET Core-Anwendungen mit IIS ausführen möchten, müssen Sie IIS installieren, bevor Sie diesen Installer ausführen. Zusätzliche Informationen finden Sie &lt;a href="https://aka.ms/aspnet/7.0/host-and-deploy-with-iis"&gt;hier&lt;/a&gt;.</String>
6666
<String Id="EulaPrivacy">&lt;a href="https://go.microsoft.com/fwlink/?LinkId=329770"&gt;Lizenzbedingungen&lt;/a&gt; und &lt;a href="https://go.microsoft.com/fwlink/?LinkId=786378"&gt;Datenschutzerklärung&lt;/a&gt; für [WixBundleName].</String>
67-
<String Id="ModifyResetIIS">Starten Sie IIS nach Abschluss der Installation neu. Zusätzliche Informationen finden Sie &lt;a href="https://go.microsoft.com/fwlink/?LinkId=798277"&gt;hier&lt;/a&gt;.</String>
68-
<String Id="ModifyNoIIS">IIS ist auf diesem Computer nicht aktiviert. Wenn Sie ASP.NET Core-Anwendungen mit IIS ausführen möchten, müssen Sie IIS installieren, bevor Sie diesen Installer ausführen. Zusätzliche Informationen finden Sie &lt;a href="https://go.microsoft.com/fwlink/?LinkId=798277"&gt;hier&lt;/a&gt;.</String>
69-
</WixLocalization>
67+
<String Id="ModifyResetIIS">Starten Sie IIS nach Abschluss der Installation neu. Zusätzliche Informationen finden Sie &lt;a href="https://aka.ms/aspnet/7.0/host-and-deploy-with-iis"&gt;hier&lt;/a&gt;.</String>
68+
<String Id="ModifyNoIIS">IIS ist auf diesem Computer nicht aktiviert. Wenn Sie ASP.NET Core-Anwendungen mit IIS ausführen möchten, müssen Sie IIS installieren, bevor Sie diesen Installer ausführen. Zusätzliche Informationen finden Sie &lt;a href="https://aka.ms/aspnet/7.0/host-and-deploy-with-iis"&gt;hier&lt;/a&gt;.</String>
69+
</WixLocalization>

0 commit comments

Comments
 (0)