Skip to content

fix(wopi): register the zmd extension the way the mime table spells it - #907

Merged
butonic merged 1 commit into
mainfrom
fix/wopi-zmd-registration
Oct 23, 2026
Merged

butonic merged 1 commit into
mainfrom
fix/wopi-zmd-registration

Conversation

@dschmidt

Copy link
Copy Markdown

mime.Detect strips a leading dot before it looks an extension up, so RegisterMime(".zmd", ...) stored a key nothing ever asks for. zmd is not in the built-in table either, so a .zmd file comes back as application/octet-stream today and the registration right next to it does nothing.

The extension is now written the way the table spells every other one.

Hardening the other side, so that a custom_mimetypes_json with dotted or upper case keys cannot run into the same wall, is separate.

mime.Detect strips a leading dot before it looks an extension up, so the dotted registration never matched and a .zmd file came back as application/octet-stream. The extension is not in the built-in table either, so nothing else caught it.
@dschmidt
dschmidt marked this pull request as ready for review October 23, 2026 11:12
@butonic
butonic merged commit 5f95b10 into main Oct 23, 2026
19 of 20 checks passed
@butonic
butonic deleted the fix/wopi-zmd-registration branch October 23, 2026 13:19
@openclouders openclouders mentioned this pull request Oct 23, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants