Skip to content

Conversation

@javiercn
Copy link
Member

Fixes #35328

Static web assets generates a manifest that creates a "virtual file system" that maps content from different folders/locations into the app. That manifest is built as a tree that we parse at runtime and use to map the different file requests to the underlying files.

Each node of the tree represents a folder/file in the path of the "file system". The issue is that when we generate he manifest, we need to preserve all the details about the casing because we don't know the final environment where the app is going to run (for example, within WSL or Docker, where the build has happened on Windows, (this is how tooling works))

This produces the problem that we have a manifest with multiple entries that are case insensitive, and that when we try to parse on windows, nodes that only differ on casing need to be "merged" into a single node.

This doesn't create ambiguity because we already have a process that validates at build time that we don't produce a manifest where more than one asset can target a given request path

@javiercn javiercn requested review from a team, Eilon and pranavkm August 20, 2021 19:40
@Pilchie Pilchie added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Aug 23, 2021
@javiercn javiercn force-pushed the javiercn/static-web-assets-casing-fix branch from 9c6f684 to 1790035 Compare September 2, 2021 10:28
@javiercn javiercn requested a review from halter73 as a code owner September 2, 2021 10:28
Copy link
Member

@SteveSandersonMS SteveSandersonMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for fixing this!

@javiercn javiercn merged commit 24040fa into main Sep 7, 2021
@javiercn javiercn deleted the javiercn/static-web-assets-casing-fix branch September 7, 2021 15:40
@javiercn
Copy link
Member Author

javiercn commented Sep 7, 2021

/backport to release/6.0

@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2021

Started backporting to release/6.0: https://github.com/dotnet/aspnetcore/actions/runs/1210072872

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blazor hosted project with static folder in different cases

4 participants