Bug 38603 - /etc/nginx/mime.types does not correctly specify application/wasm
Summary: /etc/nginx/mime.types does not correctly specify application/wasm
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: nginx (show other bugs)
Version: unstable
Hardware: all Linux
: P5 normal
Assignee: Anton Farygin
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-10 23:33 MSK by Arseny Maslennikov
Modified: 2022-11-07 18:50 MSK (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arseny Maslennikov 2020-06-10 23:33:50 MSK
Предлагаю добавить в mime.types строчку
```application/wasm    wasm;```

https://webassembly.org/docs/web/#webassemblyinstantiatestreaming

> This function accepts a Response object, or a promise for one, and compiles
> and instantiates the resulting bytes of the response. This compilation can be
> performed in the background and in a streaming manner. If the Response is not
> CORS-same-origin, does not represent an ok status, or does not match the
> `application/wasm` MIME type, the returned promise will be rejected with
> a TypeError; <...>

Без указания надлежащего Content-Type браузеры отказываются подключать wasm-модули. Таким образом, размещённый в веб-руте wasm-модуль, будучи доступным, не работает.

То же сейчас некоторые браузеры делают с js, который отдают с неверным Content-Type.
Comment 1 Arseny Maslennikov 2022-07-22 01:19:18 MSK
Предлагаю (по ссылке) один из путей решения проблемы. :)

https://git.altlinux.org/people/arseny/packages/nginx.git?p=nginx.git;a=shortlog;h=refs/heads/38603
Comment 2 Repository Robot 2022-11-07 18:50:22 MSK
nginx-1.22.1-alt2 -> sisyphus:

 Thu Nov 03 2022 Arseny Maslennikov <arseny@altlinux> 1.22.1-alt2
 - NMU: Merge mime.types with upstream. (Closes: 38603)