Add support for opening URLs (lazy database file) #278
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.
I've added support for opening URLs using
FS.createLazyFile
API of Emscripten. I've modifiedapi.coffee
andworker.coffee
respectively.It might be also useful to document somewhere (README or the API docs?) that the following headers must be present for the file to be lazy-loaded (see
library_fs.js:1703
):Accept-Ranges: bytes
Content-Length
Content-Encoding
(if other thanidentity
)Care must be taken that these headers are accessible from XHR requests, thus appropriate CORS headers (e.g.
Access-Control-Expose-Headers
) must be set accordingly.