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

Content type on static files lacks charset=UTF-8 #2987

Open
1 task done
Tronic opened this issue Jul 18, 2024 · 1 comment
Open
1 task done

Content type on static files lacks charset=UTF-8 #2987

Tronic opened this issue Jul 18, 2024 · 1 comment
Labels

Comments

@Tronic
Copy link
Member

Tronic commented Jul 18, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

app.static should specify UTF-8 for MIME types text/*. Currently it returns simply text/html for HTML files.

Code snippet

from sanic import Sanic

app = Sanic("index")
app.static("/", ".", index="index.html")

Expected Behavior

content-type: text/html; charset=UTF-8

How do you run Sanic?

Sanic CLI

Operating System

Linux

Sanic Version

24.6.0

Additional context

No response

@Tronic Tronic added the bug label Jul 18, 2024
@aarcex3
Copy link

aarcex3 commented Sep 27, 2024

Hi, I would like to work on this issue.

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

No branches or pull requests

2 participants