Author: markt
Date: Sun Nov  1 18:38:46 2009
New Revision: 831724

URL: http://svn.apache.org/viewvc?rev=831724&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/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java?rev=831724&r1=831723&r2=831724&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java Sun 
Nov  1 18:38:46 2009
@@ -930,7 +930,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 getAttributeNames() {
         if (isSecure()) {

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=831724&r1=831723&r2=831724&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sun Nov  1 18:38:46 2009
@@ -130,6 +130,12 @@
         <bug>42747</bug>. (markt)
       </fix>
       <fix>
+        <bug>47364</bug>: Improve Javadoc for
+        org.apache.catalina.connector.Request.getAttributeNames() to include
+        information on the handling of Tomcat's interal request attributes.
+        (markt)
+      </fix>
+      <fix>
         <bug>47518</bug>: Correct reference in Valve Javadoc that referred to 
an
         old method. Patch provided by Christopher Schultz. (markt)
       </fix>



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

Reply via email to