portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r202439 - /portals/jetspeed-2/trunk/components/capability/src/java/org/apache/jetspeed/capabilities/impl/JetspeedCapabilities.java
Date Wed, 29 Jun 2005 21:46:23 GMT
Author: taylor
Date: Wed Jun 29 14:46:22 2005
New Revision: 202439

URL: http://svn.apache.org/viewcvs?rev=202439&view=rev
Log:
handle unknown agents better, so that we dont go building the cap map with every single request
when we have an unknown user agent

Modified:
    portals/jetspeed-2/trunk/components/capability/src/java/org/apache/jetspeed/capabilities/impl/JetspeedCapabilities.java

Modified: portals/jetspeed-2/trunk/components/capability/src/java/org/apache/jetspeed/capabilities/impl/JetspeedCapabilities.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/capability/src/java/org/apache/jetspeed/capabilities/impl/JetspeedCapabilities.java?rev=202439&r1=202438&r2=202439&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/capability/src/java/org/apache/jetspeed/capabilities/impl/JetspeedCapabilities.java
(original)
+++ portals/jetspeed-2/trunk/components/capability/src/java/org/apache/jetspeed/capabilities/impl/JetspeedCapabilities.java
Wed Jun 29 14:46:22 2005
@@ -126,6 +126,7 @@
     {        
         CapabilityMap map = null;
         boolean bClientFound = false;
+        String defaultAgent = null;
 
         if (userAgent == null)
         {
@@ -167,6 +168,7 @@
                     }
 
                     // Use default Client
+                    defaultAgent = userAgent;
                     userAgent = DEFAULT_AGENT;
                 }
             } else
@@ -208,7 +210,8 @@
 
                 // Add map to cache
                 capabilityMapCache.put(userAgent, map);
-
+                if (defaultAgent != null)
+                    capabilityMapCache.put(defaultAgent, map);
                 return map;
             }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message