Revision: 594
http://stripes.svn.sourceforge.net/stripes/?rev=594&view=rev
Author: bengunter
Date: 2007-07-26 12:22:45 -0700 (Thu, 26 Jul 2007)
Log Message:
-----------
Do not forward to a clean URL that expects URI parameters if there are none
present in the URI. Also, strip URI parameters before forwarding.
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-07-25 21:38:08 UTC (rev 593)
+++ trunk/stripes/src/net/sourceforge/stripes/controller/StripesFilter.java
2007-07-26 19:22:45 UTC (rev 594)
@@ -290,16 +290,20 @@
}
// if all that worked out to be true, then the URL needs to be
rewritten
+ String relative = null;
if (rewrite) {
// get request URI sans the context path
- StringBuilder url;
int contextLength = request.getContextPath().length();
if (contextLength > 1)
- url = new
StringBuilder(request.getRequestURI().substring(contextLength));
+ relative = request.getRequestURI().substring(contextLength);
else
- url = new StringBuilder(request.getRequestURI());
+ relative = request.getRequestURI();
+ rewrite = relative.length() > binding.getPath().length();
+ }
+ if (rewrite) {
// append the binding parameters to the query string
+ StringBuilder url = new StringBuilder(binding.getPath());
char separator = '?';
for (UrlBindingParameter p : binding.getParameters()) {
String name = p.getName();
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