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

Feature Request: Case folding #1445

Open
Quackdoc opened this issue Jul 21, 2024 · 4 comments
Open

Feature Request: Case folding #1445

Quackdoc opened this issue Jul 21, 2024 · 4 comments

Comments

@Quackdoc
Copy link

It would be nice if miniserve supported casefolding itself, if you try do deploy something that was developed on windows, filenames will often break due to case sensitivity

@svenstaro
Copy link
Owner

Let's be sure that I know what you mean: You request a file hello.omg at http://localhost:8000/heLLo.omg and with case-folding turned on, it would still serve it?

@Quackdoc
Copy link
Author

Correct. This is fairly common if you have a server on a Windows host and try to migrate it to a Linux host. There are some file systems on linux which do support case folding, which does fix the issue, but not all file systems supported.

@svenstaro
Copy link
Owner

What would the interaction be on a case-sensitive filesystem with this option turned on? If there's a dir with Hello.omg and hellO.omg, which one would be used? Do you know of any webserver that does this so we can look at some prior art?

@Quackdoc
Copy link
Author

I'm not sure if there are webservers that do this, and which one it chooses may entirely be up to miniserve to figure out (possibly even with a flag that swaps between lower first or upper first?) as for "prior art" the closest example I have is this python script which starts the http.server with case insensitivity.

case.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants