Bug 38603

Summary: /etc/nginx/mime.types does not correctly specify application/wasm
Product: Sisyphus Reporter: Arseny Maslennikov <arseny>
Component: nginxAssignee: Anton Farygin <rider>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P5 CC: rider
Version: unstable   
Hardware: all   
OS: Linux   

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)