|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #80195 WASM mimetype is not supported in php internal sever
Submitted: 2020-10-07 10:14 UTC Modified: 2020-10-09 14:24 UTC
From: yarco at 139 dot com Assigned:
Status: Open Package: Built-in web server
PHP Version: Irrelevant OS: Mac OS / Homebrew
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: yarco at 139 dot com
New email:
PHP Version: OS:


 [2020-10-07 10:14 UTC] yarco at 139 dot com
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 -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...)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-07 10:53 UTC]
Apparently, application/wasm has not yet been registered with

[1] <>
 [2020-10-09 14:24 UTC]
We support .wasm in PHP 8.0 as part of the switch to mime-db.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 14 15:01:30 2024 UTC