Repository navigation
fix(headers): UTF-8 named on index.md, llms.txt and robots.txt, and release 1.10.1 - #18
Merged
Merged
Conversation
…elease 1.10.1 In production /index.md came as "text/markdown" with no charset, so a browser read its UTF-8 as Windows-1252: "Master’s" showed as "Master’s", and every ’, — and · alike. The route handlers name "charset=utf-8", but the static export keeps only the file, and the host types it by its extension. llms.txt and robots.txt were served the same way. public/_headers now sets each one's Content-Type, which reaches both hosts. wrangler dev adds the charset itself, so the e2e tests passed before and after the fix and could not see it. A unit test ties every text route in src/app to its rule in public/_headers (red first: three rules missing), and the testing rules say so. Checks on this tree: format, lint, types, 273 unit tests, e2e 220 passed and 12 skipped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In production /index.md came as "text/markdown" with no charset, so a browser read its UTF-8 as
Windows-1252: "Master’s" showed as "Master’s", and every ’, — and · alike. The route handlers
name "charset=utf-8", but the static export keeps only the file, and the host types it by its
extension. llms.txt and robots.txt were served the same way. public/_headers now sets each one's
Content-Type, which reaches both hosts.
wrangler dev adds the charset itself, so the e2e tests passed before and after the fix and could
not see it. A unit test ties every text route in src/app to its rule in public/_headers (red
first: three rules missing), and the testing rules say so.
Checks on this tree: format, lint, types, 273 unit tests, e2e 220 passed and 12 skipped.