closes #626: M1440677

This commit is contained in:
Cameron Kaiser 2020-09-27 16:21:22 -07:00
parent 92be8e3bec
commit 81acd2b99d
1 changed files with 6 additions and 3 deletions

View File

@ -485,10 +485,13 @@ nsMIMEHeaderParamImpl::DoParameterInternal(const char *aHeaderValue,
if (*str != '"') {
// The value is a token, not a quoted string.
valueStart = str;
for (valueEnd = str;
*valueEnd && !nsCRT::IsAsciiSpace (*valueEnd) && *valueEnd != ';';
valueEnd++)
for (valueEnd = str; *valueEnd && *valueEnd != ';'; valueEnd++) {
;
}
// ignore trailing whitespace:
while (valueEnd > valueStart && nsCRT::IsAsciiSpace(*(valueEnd - 1))) {
valueEnd--;
}
str = valueEnd;
} else {
isQuotedString = true;