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

Fix "serve" subcommand for URL encoded static files #1351

Merged
merged 1 commit into from
Feb 13, 2021

Conversation

wdv4758h
Copy link
Contributor

There is a bug in zola serve for static files. If the filename contains something that will be changed after URL encoding (e.g. CJK), then I can't access it with the builtin dev server.

For example, if I put a file like static/測試.png in the project.
Before:

http://localhost:1111/測試.png -> 404 Not Found

After:

http://localhost:1111/測試.png -> get PNG image

Not sure if there is more concern for this PR, but this change solves my issue.


Sanity check:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Code changes

  • Are you doing the PR on the next branch?

@Keats Keats merged commit d734b17 into getzola:next Feb 13, 2021
@Keats
Copy link
Collaborator

Keats commented Feb 13, 2021

Thanks!

@wdv4758h wdv4758h deleted the fix/static-files-with-url-encoded branch February 13, 2021 12:10
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.

None yet

2 participants