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

Refactor file server implementation #3588

Merged
merged 2 commits into from
Sep 10, 2024
Merged

Refactor file server implementation #3588

merged 2 commits into from
Sep 10, 2024

Conversation

raphael
Copy link
Member

@raphael raphael commented Sep 10, 2024

So that it doesn't require introducing a Replace function. The new implementation is more robust and properly handles cases where the file path is deep and differs from the mount path.

So that it doesn't require introducing a `Replace` function.
The new implementation is more robust and properly handles cases where the file path is deep and differs from the mount path.
@raphael raphael merged commit beed4ab into v3 Sep 10, 2024
8 of 9 checks passed
@raphael raphael deleted the file_server_redux branch September 10, 2024 16:03
@tchssk
Copy link
Member

tchssk commented Sep 17, 2024

This code cannot handle cases where the filename is different between request and file system.
My project contains that cases and v3.19.0 breaks the code.

Files("/index.html", "/www/data/another.html")

@tchssk
Copy link
Member

tchssk commented Sep 17, 2024

@raphael

@raphael
Copy link
Member Author

raphael commented Sep 18, 2024

Whoops, yes that makes sense, I think we can modify the generated appendFS struct to handle this case - let me take a stab at it.

raphael added a commit that referenced this pull request Sep 18, 2024
This fixes a regression introduced by #3588 that broke the
generation of file servers when the served filename differs
from the request path filename, .e.g:

Files(/index.html, /www/data/another.html)
@raphael
Copy link
Member Author

raphael commented Sep 18, 2024

Would you be able to test #3593 to see if its fixes the issue? Thank you!

raphael added a commit that referenced this pull request Sep 21, 2024
This fixes a regression introduced by #3588 that broke the
generation of file servers when the served filename differs
from the request path filename, .e.g:

Files(/index.html, /www/data/another.html)
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

Successfully merging this pull request may close these issues.

2 participants