From 398e5b3462621d919f9dcd1fab4b9f764f6b1b3b Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Thu, 16 Mar 2017 11:52:48 -0700 Subject: [PATCH] Minor verbiage change in exception messages --- .../main/java/org/eclipse/jetty/http/Syntax.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/Syntax.java b/jetty-http/src/main/java/org/eclipse/jetty/http/Syntax.java index e85d745ceee..3a001eb8f7d 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/Syntax.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/Syntax.java @@ -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)); } } }