| 3631 | const type = collectASequenceOfCodePointsFast( |
| 3632 | "/", |
| 3633 | input, |
| 3634 | position |
| 3635 | ); |
| 3636 | if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { |
| 3637 | return "failure"; |
| 3638 | } |
| 3639 | if (position.position > input.length) { |
| 3640 | return "failure"; |
| 3641 | } |
| 3642 | position.position++; |
| 3643 | let subtype = collectASequenceOfCodePointsFast( |
| 3644 | ";", |
| 3645 | input, |
| 3646 | position |
| 3647 | ); |
| 3648 | subtype = removeHTTPWhitespace(subtype, false, true); |
| 3649 | if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { |
| 3650 | return "failure"; |
| 3651 | } |
| 3652 | const typeLowercase = type.toLowerCase(); |
| 3653 | const subtypeLowercase = subtype.toLowerCase(); |
| 3654 | const mimeType = { |
| 3655 | type: typeLowercase, |