From a5bfb8f3eeef25408055912a99d01661b384c3a7 Mon Sep 17 00:00:00 2001 From: markt Date: Sun, 1 Nov 2009 18:35:02 +0000 Subject: [PATCH] Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47364 Document that HttpServletRequest.getAttributeNames() does not return the names of all attributes (internal Tomcat attributes are excluded) git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@831722 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/catalina/connector/Request.java | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/connector/Request.java b/java/org/apache/catalina/connector/Request.java index adcfc39c1..85df544c6 100644 --- a/java/org/apache/catalina/connector/Request.java +++ b/java/org/apache/catalina/connector/Request.java @@ -919,7 +919,30 @@ public class Request /** * Return the names of all request attributes for this Request, or an - * empty Enumeration if there are none. + * empty Enumeration if there are none. Note that the attribute + * names return will only be those for the attributes set via + * {@link #setAttribute(String, Object)}. Tomcat internal attributes will + * not be included although they are accessible via + * {@link #getAttribute(String)}. The Tomcat internal attributes include: + * + * The underlying connector may also expose request attributes. These all + * have names starting with "org.apache.tomcat" and include: + * + * Connector implementations may return some, all or none of these + * attributes and may also support additional attributes. */ public Enumeration getAttributeNames() { if (isSecure()) { -- 2.11.0