This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push: new 644c904 Improve Javadoc as suggested by schultz 644c904 is described below commit 644c904205194e09a9c8e8d16bfd01d341a8ed2d Author: Mark Thomas <ma...@apache.org> AuthorDate: Tue Jan 11 10:43:28 2022 +0000 Improve Javadoc as suggested by schultz --- java/org/apache/tomcat/util/http/parser/HttpParser.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/http/parser/HttpParser.java b/java/org/apache/tomcat/util/http/parser/HttpParser.java index 7dcb631..76d79ca 100644 --- a/java/org/apache/tomcat/util/http/parser/HttpParser.java +++ b/java/org/apache/tomcat/util/http/parser/HttpParser.java @@ -237,8 +237,20 @@ public class HttpParser { } + /** + * Is the provided String a token as per RFC 7230? + * <br> + * Note: token = 1 * tchar (RFC 7230) + * <br> + * Since a token requires at least 1 tchar, {@code null} and the empty + * string ({@code ""}) are not considered to be valid tokens. + * + * @param s The string to test + * + * @return {@code true} if the string is a valid token, otherwise + * {@code false} + */ public static boolean isToken(String s) { - // token = 1 * tchar (RFC 7230) if (s == null) { return false; } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org