Req #80195 [Opn]: WASM mimetype is not supported in php internal sever
| From: | cmb@php.net | Date: | Wed, 07 Oct 2020 10:53:18 +0000 |
| Subject: | Req #80195 [Opn]: WASM mimetype is not supported in php internal sever | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-229440@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80195&edit=1
ID: 80195
Updated by: cmb@php.net
Reported by: yarco at 139 dot com
Summary: WASM mimetype is not supported in php internal sever
Status: Open
Type: Feature/Change Request
Package: Built-in web server
Operating System: Mac OS / Homebrew
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Apparently, application/wasm has not yet been registered with
IANA[1].
[1] <https://www.iana.org/assignments/media-types/media-types.xhtml>
Previous Comments:
------------------------------------------------------------------------
[2020-10-07 10:14:26] yarco at 139 dot com
Description:
------------
WASM (*.wasm) is the webassembly program. And it seems will be the future for at least it runs fine
in modern browser environment.
I'm trying to run it by using
php -S 127.0.0.1:8000 -t . , and local directory
contains "main.html", "main.js", "main.wasm" (those generated by emcc
which is a warm compiler). The script "main.js" (or maybe main.html) will load
"main.wasm" somewhere. And the browser tells me under the console:
wasm streaming compile failed: TypeError: Failed to execute 'compile' on
'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.
It seems when sending "main.wasm", it didn't set the header
application/wasm.
(I think PHP should take care of those modern features...)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80195&edit=1