Skip to content

Remove wasm url extension check#43

Open
ansbbrooks wants to merge 3 commits into
Kitware:mainfrom
ansbbrooks:no-url-check-1
Open

Remove wasm url extension check#43
ansbbrooks wants to merge 3 commits into
Kitware:mainfrom
ansbbrooks:no-url-check-1

Conversation

@ansbbrooks
Copy link
Copy Markdown
Contributor

@ansbbrooks ansbbrooks commented May 21, 2026

Currently, when a wasm url is passed to createNamespace(), loader.load() checks if the url ends with .gz to handle Gzip archives.

This is a problem since urls do not have to have a .gz extension to serve a Gzip file.

For example, running a server that serves the VTK.wasm client .gz bundle at the following endpoint would fail the url check:

http://localhost/get_vtk_bundle

It is better to allow the Gzip decompressor to fail on its own if the downloaded resource is not a Gzip archive, and let the user specify what is at the end of their endpoint (since only they can know for sure).

In this PR, the createNamespace() function has the following signature:

createNamespace(url: string, config: object, wasmBaseName: string, urlIsGzipBundle: boolean)

@ansbbrooks ansbbrooks changed the title Removed wasm url extension check Remove wasm url extension check May 21, 2026
@ansbbrooks
Copy link
Copy Markdown
Contributor Author

ansbbrooks commented Jun 2, 2026

@jourdain @jspanchu What are everyone's thoughts on this one?

@jspanchu
Copy link
Copy Markdown
Member

jspanchu commented Jun 2, 2026

I'm fine with the changes.

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