Minor verbiage change in exception messages
This commit is contained in:
parent
ccf72d6752
commit
398e5b3462
|
@ -68,16 +68,16 @@ public final class Syntax
|
|||
// 0x00 - 0x1F are low order control characters
|
||||
// 0x7F is the DEL control character
|
||||
if ((c <= 0x1F) || (c == 0x7F))
|
||||
throw new IllegalArgumentException(msg + ": Control characters not allowed in RFC2616 token");
|
||||
throw new IllegalArgumentException(msg + ": RFC2616 tokens may not contain control characters");
|
||||
if (c == '(' || c == ')' || c == '<' || c == '>' || c == '@'
|
||||
|| c == ',' || c == ';' || c == ':' || c == '\\' || c == '"'
|
||||
|| c == '/' || c == '[' || c == ']' || c == '?' || c == '='
|
||||
|| c == '{' || c == '}' || c == ' ')
|
||||
{
|
||||
throw new IllegalArgumentException(msg + ": RFC2616 token may not contain separator character: [" + c + "]");
|
||||
throw new IllegalArgumentException(msg + ": RFC2616 tokens may not contain separator character: [" + c + "]");
|
||||
}
|
||||
if (c >= 0x80)
|
||||
throw new IllegalArgumentException(msg + ": RFC2616 token characters restricted to US-ASCII range: 0x" + Integer.toHexString(c));
|
||||
throw new IllegalArgumentException(msg + ": RFC2616 tokens characters restricted to US-ASCII: 0x" + Integer.toHexString(c));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ public final class Syntax
|
|||
// Has starting DQUOTE
|
||||
if (valueLen <= 1 || (value.charAt(valueLen - 1) != '"'))
|
||||
{
|
||||
throw new IllegalArgumentException("RFC6265 Cookie value must have balanced DQUOTES (if used)");
|
||||
throw new IllegalArgumentException("RFC6265 Cookie values must have balanced DQUOTES (if used)");
|
||||
}
|
||||
|
||||
// adjust search range to exclude DQUOTES
|
||||
|
@ -127,16 +127,16 @@ public final class Syntax
|
|||
// 0x00 - 0x1F are low order control characters
|
||||
// 0x7F is the DEL control character
|
||||
if ((c <= 0x1F) || (c == 0x7F))
|
||||
throw new IllegalArgumentException("Control characters not allowed in RFC6265 Cookie value");
|
||||
throw new IllegalArgumentException("RFC6265 Cookie values may not contain control characters");
|
||||
if ((c == ' ' /* 0x20 */) ||
|
||||
(c == '"' /* 0x2C */) ||
|
||||
(c == ';' /* 0x3B */) ||
|
||||
(c == '\\' /* 0x5C */))
|
||||
{
|
||||
throw new IllegalArgumentException("RFC6265 Cookie value may not contain character: [" + c + "]");
|
||||
throw new IllegalArgumentException("RFC6265 Cookie values may not contain character: [" + c + "]");
|
||||
}
|
||||
if (c >= 0x80)
|
||||
throw new IllegalArgumentException("RFC6265 Cookie value characters restricted to US-ASCII range: 0x" + Integer.toHexString(c));
|
||||
throw new IllegalArgumentException("RFC6265 Cookie values characters restricted to US-ASCII: 0x" + Integer.toHexString(c));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue