]> source.dussan.org Git - gitea.git/commit
Replace regex usage for MIME parsing (#17831)
authorGabriel Vasile <gabriel.vasile@email.com>
Sat, 27 Nov 2021 11:12:43 +0000 (13:12 +0200)
committerGitHub <noreply@github.com>
Sat, 27 Nov 2021 11:12:43 +0000 (19:12 +0800)
commit2e8fc5b034d7a2ceb22f264193a157230b48365a
tree7d7512cc7390ed105ee701d0f95106c8534941d8
parent789d251ae4223fb3fe6c42333cb6731d8ebde05e
Replace regex usage for MIME parsing (#17831)

MIME types can have multiple optional parameters, eg:
    video/webm; codecs="w/e codec"; charset="binary"
This commit replaces the usage of regex for getting the "type/subtype"
with mime.ParseMediaType.
modules/upload/upload.go