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

added utf-8 support. #18

Merged
merged 5 commits into from
Oct 21, 2021
Merged

Conversation

chrisamti
Copy link
Contributor

No description provided.

@adrianrudnik
Copy link
Owner

Hi @chrisamti thanks for the PR!

Out of curiosity, what arm64 devices do you use?

Do you see any reason to split CHARSET and DEFAULT_RESPONSE_CONTENT_TYPE or could it be text/html; charset=${CHARSET}"?

@chrisamti
Copy link
Contributor Author

AWS ARM64 and Apple Silicon M1.

Do you see any reason to split CHARSET and DEFAULT_RESPONSE_CONTENT_TYPE or could it be text/html; charset=${CHARSET}"?

Maybe. Did not test that. As far as I know the http header is only valid if written as:

Content-Type: text/html; charset=utf-8

I assume

Content-Type: text/html; charset=utf8

is not valid.

and

res.write(result.html, charsetOpts.write)

https://nodejs.org/api/http.html#http_request_write_chunk_encoding_callback

requires utf8

So I decided to have 2 ENV vars.

@adrianrudnik adrianrudnik merged commit d463714 into adrianrudnik:develop Oct 21, 2021
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