remm 2003/05/31 07:59:56 Modified: catalina/src/share/org/apache/catalina/core ApplicationHttpRequest.java Log: - Apply Jan Luehe's patch (why ask before ? if there's an obvious problem, I can always veto the patch). - Cleanup: remove old code. - Take some credit for whatever will be broken in this class. Revision Changes Path 1.9 +12 -39 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationHttpRequest.java Index: ApplicationHttpRequest.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationHttpRequest.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ApplicationHttpRequest.java 26 May 2003 12:02:31 -0000 1.8 +++ ApplicationHttpRequest.java 31 May 2003 14:59:56 -0000 1.9 @@ -94,6 +94,7 @@ * keep these two classes in synchronization when making changes! * * @author Craig R. McClanahan + * @author Remy Maucherat * @version $Revision$ $Date$ */ @@ -141,13 +142,6 @@ /** - * The request attributes for this request. This is initialized from the - * wrapped request, but updates are allowed. - */ - //protected HashMap attributes = new HashMap(); - - - /** * The context path for this request. */ protected String contextPath = null; @@ -252,21 +246,7 @@ * request. */ public Enumeration getAttributeNames() { - return (new AttributeNamesEnumerator()); - /* - HashMap clone = (HashMap)attributes.clone(); - Enumeration enum = getRequest().getAttributeNames(); - Object key; - while(enum.hasMoreElements()){ - key = enum.nextElement(); - if (!clone.containsKey(key)){ - clone.put(key, getRequest().getAttribute(key.toString())); - } - } - return (new Enumerator(clone.keySet())); - */ - } @@ -524,20 +504,9 @@ super.setRequest(request); // Initialize the attributes for this request - /* - synchronized (attributes) { - attributes.clear(); - Enumeration names = request.getAttributeNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - if( ! ( Globals.INCLUDE_REQUEST_URI_ATTR.equals(name) || - Globals.INCLUDE_SERVLET_PATH_ATTR.equals(name) ) ) { - Object value = request.getAttribute(name); - attributes.put(name, value); - } - } - } - */ + dispatcherType = request.getAttribute(Globals.DISPATCHER_TYPE_ATTR); + requestDispatcherPath = + request.getAttribute(Globals.DISPATCHER_REQUEST_PATH_ATTR); // Initialize the path elements for this request contextPath = request.getContextPath(); @@ -756,6 +725,10 @@ // ----------------------------------- AttributeNamesEnumerator Inner Class + /** + * Utility class used to expose the special attributes as being available + * as request attributes. + */ protected class AttributeNamesEnumerator implements Enumeration { protected int pos = -1;
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]