mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
util: pass invalidSubtypeIndex instead of trimmedSubtype to error
PR-URL: https://github.com/nodejs/node/pull/51264 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
This commit is contained in:
1 parent
684dd9db2f
commit
f4f781d493
1 file changed
+1
-1
@@ -70,7 +70,7 @@ function parseTypeAndSubtype(str) {
|
||||
const invalidSubtypeIndex = SafeStringPrototypeSearch(trimmedSubtype,
|
||||
NOT_HTTP_TOKEN_CODE_POINT);
|
||||
if (trimmedSubtype === '' || invalidSubtypeIndex !== -1) {
|
||||
throw new ERR_INVALID_MIME_SYNTAX('subtype', str, trimmedSubtype);
|
||||
throw new ERR_INVALID_MIME_SYNTAX('subtype', str, invalidSubtypeIndex);
|
||||
}
|
||||
const subtype = toASCIILower(trimmedSubtype);
|
||||
return [
|
||||
|
||||
Reference in new issue
Block a user