Skip to content

Commit f4f781d

Browse files
gaurishhsRafaelGSS
authored andcommitted
util: pass invalidSubtypeIndex instead of trimmedSubtype to error
PR-URL: #51264 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Deokjin Kim <[email protected]>
1 parent 684dd9d commit f4f781d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎lib/internal/mime.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function parseTypeAndSubtype(str){
7070
constinvalidSubtypeIndex=SafeStringPrototypeSearch(trimmedSubtype,
7171
NOT_HTTP_TOKEN_CODE_POINT);
7272
if(trimmedSubtype===''||invalidSubtypeIndex!==-1){
73-
thrownewERR_INVALID_MIME_SYNTAX('subtype',str,trimmedSubtype);
73+
thrownewERR_INVALID_MIME_SYNTAX('subtype',str,invalidSubtypeIndex);
7474
}
7575
constsubtype=toASCIILower(trimmedSubtype);
7676
return[

0 commit comments

Comments
(0)