Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to make PhysicalFileProvider case insensitive #2183

Closed
rasmus opened this issue Aug 14, 2019 · 6 comments
Closed

Option to make PhysicalFileProvider case insensitive #2183

rasmus opened this issue Aug 14, 2019 · 6 comments
Milestone

Comments

@rasmus
Copy link

rasmus commented Aug 14, 2019

Is your feature request related to a problem? Please describe.

We currently host our .NET Core services on Windows servers, but would really like to move them to Linux Docker containers some time down the line. However, having the PhysicalFileProvider rely on how the underlying OS treats casing for files and directories puts this as risk as our services currently ignore file and directory casing as they are hosted on Windows, moving them to Linux could potentially break a lot of our applications.

Describe the solution you'd like

While simply doing everything in lower case is an option, I would rather have an option to enable case insensitivity.

Maybe something in the lines on this

app.UseStaticFiles(new StaticFileOptions
{
    FileProvider = new PhysicalFileProvider("some path")
    {
        UseActivePolling = true,
        IgnoreCase = true
    }
});

Describe alternatives you've considered

As mentioned, while simply deciding to do everything lower case is an option, I would rather be able to ensure that there isn't any issues like this in our future migration.

Additional context

None

@XiaoFaye
Copy link

@rasmus Hi, I have created a middleware which allows ignore case for static files, it might be able to help you. https://github.com/XiaoFaye/CaseInsensitiveStaticFile

@drmathias
Copy link

drmathias commented Nov 22, 2019

Was looking for this as routing with MVC/Razor pages is by default capitalized and case-insensitive. I'd have thought case-insensitivity would be the default.

@analogrelay analogrelay added this to the Backlog milestone Jan 23, 2020
@ghost ghost added the Status: Stale label May 8, 2020
@ghost
Copy link

ghost commented May 8, 2020

As part of the migration of components from dotnet/extensions to dotnet/runtime (aspnet/Announcements#411) we will be bulk closing some of the older issues. If you are still interested in having this issue addressed, just comment and the issue will be automatically reactivated (even if you aren't the author). When you do that, I'll page the team to come take a look. If you've moved on or workaround the issue and no longer need this change, just ignore this and the issue will be closed in 7 days.

If you know that the issue affects a package that has moved to a different repo, please consider re-opening the issue in that repo. If you're unsure, that's OK, someone from the team can help!

@ghost ghost closed this as completed May 15, 2020
@onionhammer
Copy link

his should be reopened.

@ghost ghost reopened this Oct 29, 2020
@ghost
Copy link

ghost commented Oct 29, 2020

Paging @dotnet/extensions-migration ! This issue has been revived from staleness. Please take a look and route to the appropriate repository.

@ghost ghost removed the Status: Stale label Oct 29, 2020
@BrennanConroy
Copy link
Member

Similar/same thing tracked in dotnet/runtime#35128. PhysicalFileProvider is not in this repo anymore.

@ghost ghost locked as resolved and limited conversation to collaborators Nov 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants