Closed stoft closed 2 months ago
Is there a reason we wouldn't always set the charset for HTML?
Not that I can think of but I'm no expert regarding http headers. Of note is that charset can be set for other text types as well, and application/json.
I'm also unsure of the ergonomics here, could it be utf-8 by default and then have some way of changing it such as "wisp.set_charset"? Or are there too many people out there for whom utf-8 would be just plain wrong?
Gleam uses utf-8 so the these bodies are guaranteed to be that charset. Let's add it to all of them
For example
text/html; charset=utf-8
. Currently this requires a call toset_header
but not forgetting to add the mime-type that may already be there.