Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47364
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 1 Nov 2009 18:35:02 +0000 (18:35 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 1 Nov 2009 18:35:02 +0000 (18:35 +0000)
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

index adcfc39..85df544 100644 (file)
@@ -919,7 +919,30 @@ public class Request
 
     /**
      * Return the names of all request attributes for this Request, or an
-     * empty <code>Enumeration</code> if there are none.
+     * empty <code>Enumeration</code> 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:
+     * <ul>
+     * <li>{@link Globals.DISPATCHER_TYPE_ATTR}</li>
+     * <li>{@link Globals.DISPATCHER_REQUEST_PATH_ATTR}</li>
+     * <li>{@link Globals.ASYNC_SUPPORTED_ATTR}</li>
+     * <li>{@link Globals.CERTIFICATES_ATTR} (SSL connections only)</li>
+     * <li>{@link Globals.CIPHER_SUITE_ATTR} (SSL connections only)</li>
+     * <li>{@link Globals.KEY_SIZE_ATTR} (SSL connections only)</li>
+     * <li>{@link Globals.SSL_SESSION_ID_ATTR} (SSL connections only)</li>
+     * <li>{@link Globals.SSL_SESSION_MGR_ATTR} (SSL connections only)</li>
+     * </ul>
+     * The underlying connector may also expose request attributes. These all
+     * have names starting with "org.apache.tomcat" and include:
+     * <ul>
+     * <li>org.apache.tomcat.sendfile.support</li>
+     * <li>org.apache.tomcat.comet.support</li>
+     * <li>org.apache.tomcat.comet.timeout.support</li>
+     * </ul>
+     * Connector implementations may return some, all or none of these
+     * attributes and may also support additional attributes.
      */
     public Enumeration<String> getAttributeNames() {
         if (isSecure()) {