Skip to content

Commit

Permalink
Merge 23625d3 into 6453645
Browse files Browse the repository at this point in the history
  • Loading branch information
climba03003 committed Jan 5, 2023
2 parents 6453645 + 23625d3 commit 74e8e72
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/contentTypeParser.js
Expand Up @@ -72,6 +72,7 @@ ContentTypeParser.prototype.add = function (contentType, opts, parserFn) {
if (contentTypeIsString) {
this.parserList.unshift(new ParserListItem(contentType))
} else {
contentType.isEssence = contentType.source.indexOf(';') === -1
this.parserRegExpList.unshift(contentType)
}
this.customParsers.set(contentType.toString(), parser)
Expand Down Expand Up @@ -395,7 +396,7 @@ function compareContentType (contentType, parserListItem) {
}

function compareRegExpContentType (contentType, essenceMIMEType, regexp) {
if (regexp.source.indexOf(';') === -1) {
if (regexp.isEssence) {
// we do essence check
return regexp.test(essenceMIMEType)
} else {
Expand Down

0 comments on commit 74e8e72

Please sign in to comment.