Hello @ndortega,
I came across an issue with serving static and dynamic files. If the mime type of a file is not identified correctly, Oxygen fails with the error message: KeyError: key "map" not found
The issue seems to be in the function mimetype(filename::String) of mimetypes.jl. The file to lookup mime types doesn't contain e.g. *.map files which are widely used when loading JS libraries.
I noticed that https://github.com/JuliaWeb/MIMEs.jl has a more comprehensive list to map extensions to MIME types. Maybe instead of maintaining a separate list, it is easier to use MIMEs for that.
Also if the MIME can't be identified a fallback solution would be good instead of failing with an error.
Hello @ndortega, I came across an issue with serving static and dynamic files. If the mime type of a file is not identified correctly, Oxygen fails with the error message:
KeyError: key "map" not found
The issue seems to be in the functionmimetype(filename::String)
ofmimetypes.jl
. The file to lookup mime types doesn't contain e.g. *.map files which are widely used when loading JS libraries.I noticed that https://github.com/JuliaWeb/MIMEs.jl has a more comprehensive list to map extensions to MIME types. Maybe instead of maintaining a separate list, it is easier to use MIMEs for that.
Also if the MIME can't be identified a fallback solution would be good instead of failing with an error.
BR Stefan