Repository navigation
fix(docker): serve x2t WASM as gzip on plain HTTP - #269
Merged
Merged
Conversation
Deploying document with
|
| Latest commit: |
e9fd8f5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://38d4bda1.document-7hm.pages.dev |
| Branch Preview URL: | https://fix-docker-http-wasm.document-7hm.pages.dev |
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.
Merge Verdict
[APPROVE] — The Docker transport fix reproduces and resolves the ordinary-HTTP WASM decoding failure without changing the decoded module.
Summary
Chrome refuses Brotli decoding on ordinary HTTP origins outside localhost. Docker was unconditionally serving
Content-Encoding: br, sohttp://<server-ip>failed withERR_CONTENT_DECODING_FAILEDandx2t WASM instantiation failed: TypeError: Failed to fetch.Closes #267.
Risk Analysis
Low risk: decoded WASM bytes are identical. Docker's WASM transfer grows from 6,898,179 to 10,058,136 bytes; HTTPS Pages retains the smaller Brotli payload.
Design Decisions
.brURL;Content-Encodingdescribes the actual transport representation.isSecureContext === falseusing a Chromium hostname mapping to the container, rather than substituting loopback HTTP.Code Concerns
No actionable findings after tracing both converter loaders, native response decoding, the service-worker cache URL, and build ordering.
Verification
pnpm run lint:ts: passed; final changed code also passedoxlint --deny-warnings.pnpm run format:check: passed;git diff --check: passed.TypeError: Failed to fetch, then passed with gzip on a non-trustworthy HTTP origin and compiled the real WASM.Conclusion basis: Verified by the commands and browser reproduction above; full-container validation remains pending at PR creation.