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

Directory Listing: Add UTF-8 Charset to the response Content type #679

Merged
merged 1 commit into from
May 7, 2024

Conversation

alexkutsan
Copy link
Contributor

@alexkutsan alexkutsan commented Apr 27, 2024

Within the directory listing handler, the absence of an explicit charset in the content type has led to issues, particularly with directories containing non-ASCII symbols, resulting in broken displays.

изображение

Adding charset charset=UTF-8 to the Content-type header fixes this issue.

изображение

Alternate Designs

Benefits

it works

Possible Drawbacks

Not flexible for non UTF-8 cases.

Within the directory listing handler, the absence of an explicit charset in the content type has led to issues, particularly with directories containing non-ASCII symbols, resulting in broken displays.

Adding charset charset=UTF-8 to the Content-type header fixes this issue.
@alexkutsan
Copy link
Contributor Author

Seams like this part of code is a monkey patched crystal std lib.
Added similar PR to original crystal code crystal-lang/crystal#14546

Copy link
Member

@sdogruyol sdogruyol left a comment

Choose a reason for hiding this comment

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

Thanks a lot @alexkutsan 🙏

@sdogruyol sdogruyol merged commit e69bd40 into kemalcr:master May 7, 2024
4 checks passed
@alexkutsan alexkutsan deleted the patch-1 branch May 7, 2024 13:22
Sija added a commit to Sija/kemal that referenced this pull request May 7, 2024
sdogruyol pushed a commit that referenced this pull request May 16, 2024
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.

3 participants