Revision: 599
http://stripes.svn.sourceforge.net/stripes/?rev=599&view=rev
Author: bengunter
Date: 2007-08-16 16:10:00 -0700 (Thu, 16 Aug 2007)
Log Message:
-----------
Compare the length of the rewritten URI + query string to the length of the
request URI instead of the @UrlBinding path to determine if the request needs
to be forwarded. I.e., if nothing was appended to the request URI then do not
forward.
Modified Paths:
--------------
trunk/stripes/src/net/sourceforge/stripes/controller/StripesFilter.java
Modified:
trunk/stripes/src/net/sourceforge/stripes/controller/StripesFilter.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/controller/StripesFilter.java
2007-08-16 12:36:00 UTC (rev 598)
+++ trunk/stripes/src/net/sourceforge/stripes/controller/StripesFilter.java
2007-08-16 23:10:00 UTC (rev 599)
@@ -292,11 +292,12 @@
StringBuilder url = null;
if (rewrite) {
// get request URI sans the context path
- int contextLength = request.getContextPath().length();
- if (contextLength > 1)
- url = new
StringBuilder(request.getRequestURI().substring(contextLength));
+ int length = request.getContextPath().length();
+ if (length > 1)
+ url = new
StringBuilder(request.getRequestURI().substring(length));
else
url = new StringBuilder(request.getRequestURI());
+ length = url.length();
// append the binding parameters to the query string
char separator = '?';
@@ -316,7 +317,7 @@
}
}
}
- rewrite = url.length() > binding.getPath().length();
+ rewrite = url.length() > length;
}
if (rewrite) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development