landing follow-up patch to bug 297078 "fix signed character math" r+sr=bzbarsky a=sparky
This commit is contained in:
Родитель
2c855860d5
Коммит
2f7cc1364e
|
@ -127,7 +127,7 @@ static PRBool IsValidToken(const nsCString &s)
|
|||
const char *end = start + s.Length();
|
||||
|
||||
for (; start != end; ++start)
|
||||
if (*start > 127 || !kValidTokenMap[*start])
|
||||
if (((unsigned char) *start) > 127 || !kValidTokenMap[*start])
|
||||
return PR_FALSE;
|
||||
|
||||
return PR_TRUE;
|
||||
|
|
|
@ -40,4 +40,13 @@ function run_test() {
|
|||
}
|
||||
if (!x)
|
||||
do_throw("header value with newline not rejected");
|
||||
|
||||
x = false;
|
||||
try {
|
||||
chan.setRequestHeader("foopy\u0080", "baz", false);
|
||||
} catch (e) {
|
||||
x = true;
|
||||
}
|
||||
if (!x)
|
||||
do_throw("header name with non-ASCII not rejected");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче