You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by sc...@apache.org on 2010/02/26 13:37:59 UTC

svn commit: r916662 - /incubator/wookie/trunk/src/org/apache/wookie/server/LocalizedResourceFilter.java

Author: scottbw
Date: Fri Feb 26 12:37:58 2010
New Revision: 916662

URL: http://svn.apache.org/viewvc?rev=916662&view=rev
Log:
Updated the localization filter to catch exception in processing a path - for example stale sessions or cookies - and return the original path

Modified:
    incubator/wookie/trunk/src/org/apache/wookie/server/LocalizedResourceFilter.java

Modified: incubator/wookie/trunk/src/org/apache/wookie/server/LocalizedResourceFilter.java
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/src/org/apache/wookie/server/LocalizedResourceFilter.java?rev=916662&r1=916661&r2=916662&view=diff
==============================================================================
--- incubator/wookie/trunk/src/org/apache/wookie/server/LocalizedResourceFilter.java (original)
+++ incubator/wookie/trunk/src/org/apache/wookie/server/LocalizedResourceFilter.java Fri Feb 26 12:37:58 2010
@@ -130,7 +130,13 @@
 		// Strip out the widget base path to obtain just the resource itself
 		String widgetPath = getWidgetInstanceBasePath(instance);
 		int start = originalPath.indexOf(widgetPath)+widgetPath.length();
-		String resource = originalPath.substring(start);
+
+		String resource;
+		try {
+			resource = originalPath.substring(start);
+		} catch (Exception e) {
+			return originalPath;
+		}
 
 		// If the resource already contains a locale, remove it for the purposes of searching
 		// This is because local links witin widgets can target localized files - e.g.