flake8
passed.
JSHint
passed.
Review Request #13513 — Created Jan. 31, 2024 and submitted
A while back we added an escape hatch for mapping certain file
extensions to mimetypes for when mimeparse messes up (specfically with
text/x-rst
andtext/x-markdown
). While I was looking at this code, I
realized that we go through all the trouble of using mimeparse only to
throw away the result. The mimeparse code isn't doing a whole lot, but
it's always better to avoid doing work if we don't need to. This change
swaps those so if we're going to match based on the file extension, we
do that first, and only use mimeparse otherwise.
Ran unit tests.
Summary | ID |
---|---|
447695c90c28c4faa9388bbf51c1d964e61f6f85 |