Author: markt
Date: Sun Nov  1 18:35:02 2009
New Revision: 831722

URL: http://svn.apache.org/viewvc?rev=831722&view=rev
Log:
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)

Modified:
    tomcat/trunk/java/org/apache/catalina/connector/Request.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=831722&r1=831721&r2=831722&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Sun Nov  1 
18:35:02 2009
@@ -919,7 +919,30 @@
 
     /**
      * 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()) {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to