Skip to content

Commit 32ba783

Browse files
authored
Merge branch 'release/10.0.1xx' into darc-release/10.0.1xx-d5e70d62-80a9-432c-8bad-50dceb349e82
2 parents ff31f2d + 98bf432 commit 32ba783

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

eng/Version.Details.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ This file should be imported by eng/Versions.props
140140
<!-- dotnet/core-setup dependencies -->
141141
<NETStandardLibraryRefPackageVersion>2.1.0</NETStandardLibraryRefPackageVersion>
142142
<!-- microsoft/testfx dependencies -->
143-
<MicrosoftTestingPlatformPackageVersion>1.9.0-preview.25430.5</MicrosoftTestingPlatformPackageVersion>
144-
<MSTestPackageVersion>3.11.0-preview.25430.5</MSTestPackageVersion>
143+
<MicrosoftTestingPlatformPackageVersion>1.9.0-preview.25451.2</MicrosoftTestingPlatformPackageVersion>
144+
<MSTestPackageVersion>3.11.0-preview.25451.2</MSTestPackageVersion>
145145
</PropertyGroup>
146146
<!--Property group for alternate package version names-->
147147
<PropertyGroup>

eng/Version.Details.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -553,13 +553,13 @@
553553
<Uri>https://github.com/dotnet/dotnet</Uri>
554554
<Sha>7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3</Sha>
555555
</Dependency>
556-
<Dependency Name="Microsoft.Testing.Platform" Version="1.9.0-preview.25430.5">
556+
<Dependency Name="Microsoft.Testing.Platform" Version="1.9.0-preview.25451.2">
557557
<Uri>https://github.com/microsoft/testfx</Uri>
558-
<Sha>9d2e740bc8be46f45c6d69b33be1f5a913bf6231</Sha>
558+
<Sha>8d29291af97543579834e9109768c5ee89f63638</Sha>
559559
</Dependency>
560-
<Dependency Name="MSTest" Version="3.11.0-preview.25430.5">
560+
<Dependency Name="MSTest" Version="3.11.0-preview.25451.2">
561561
<Uri>https://github.com/microsoft/testfx</Uri>
562-
<Sha>9d2e740bc8be46f45c6d69b33be1f5a913bf6231</Sha>
562+
<Sha>8d29291af97543579834e9109768c5ee89f63638</Sha>
563563
</Dependency>
564564
<Dependency Name="Microsoft.Extensions.Configuration.Ini" Version="10.0.0-rc.2.25427.104">
565565
<Uri>https://github.com/dotnet/dotnet</Uri>

src/BuiltInTools/BrowserRefresh/BrowserRefreshMiddleware.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ internal static bool IsBrowserDocumentRequest(HttpContext context)
164164

165165
if (request.Headers.TryGetValue("Sec-Fetch-Dest", out var values) &&
166166
!StringValues.IsNullOrEmpty(values) &&
167-
!string.Equals(values[0], "document", StringComparison.OrdinalIgnoreCase))
167+
!string.Equals(values[0], "document", StringComparison.OrdinalIgnoreCase) &&
168+
!IsProgressivelyEnhancedNavigation(context.Request))
168169
{
169170
// See https://github.com/dotnet/aspnetcore/issues/37326.
170171
// Only inject scripts that are destined for a browser page.
@@ -188,6 +189,14 @@ internal static bool IsBrowserDocumentRequest(HttpContext context)
188189
return false;
189190
}
190191

192+
private static bool IsProgressivelyEnhancedNavigation(HttpRequest request)
193+
{
194+
// This is an exact copy from https://github.com/dotnet/aspnetcore/blob/bb2d778dc66aa998ea8e26db0e98e7e01423ff78/src/Components/Endpoints/src/Rendering/EndpointHtmlRenderer.Streaming.cs#L327-L332
195+
// For enhanced nav, the Blazor JS code controls the "accept" header precisely, so we can be very specific about the format
196+
var accept = request.Headers.Accept;
197+
return accept.Count == 1 && string.Equals(accept[0]!, "text/html; blazor-enhanced-nav=on", StringComparison.Ordinal);
198+
}
199+
191200
internal void Test_SetEnvironment(string dotnetModifiableAssemblies, string aspnetcoreBrowserTools)
192201
{
193202
_dotnetModifiableAssemblies = dotnetModifiableAssemblies;

0 commit comments

Comments
 (0)