From: <jbo...@li...> - 2005-10-28 13:45:23
|
Author: rem...@jb... Date: 2005-10-28 09:45:16 -0400 (Fri, 28 Oct 2005) New Revision: 1458 Modified: trunk/labs/jbossweb/src/share/classes/org/jboss/web/rewrite/RewriteValve.java Log: - Actually update the right URI field (it should be the "undecoded" URI). Ooops. - It works, but setting the valve to a Context won't work yet (URLs are relative to the context during most of the processing, so it isn't exactly the same thing). Modified: trunk/labs/jbossweb/src/share/classes/org/jboss/web/rewrite/RewriteValve.java =================================================================== --- trunk/labs/jbossweb/src/share/classes/org/jboss/web/rewrite/RewriteValve.java 2005-10-28 11:57:43 UTC (rev 1457) +++ trunk/labs/jbossweb/src/share/classes/org/jboss/web/rewrite/RewriteValve.java 2005-10-28 13:45:16 UTC (rev 1458) @@ -210,6 +210,9 @@ // As long as MB isn't a char sequence or affiliated, this has to be // converted to a string + // FIXME: Most likely need to use the requestPath to handle the case + // where the valve is set at the context level, and then reconstruct the + // full URL at the end String url = request.getDecodedRequestURI(); boolean rewritten = false; boolean done = false; @@ -294,10 +297,10 @@ Engine engine = (Engine) request.getHost().getParent(); Connector[] connectors = engine.getService().findConnectors(); // Find the right connector (note: this is the only real hack) - // FIXME + // FIXME: do it by comparing ports and stuff for now ? Connector connector = connectors[0]; try { - request.getCoyoteRequest().decodedURI().setString(url); + request.getCoyoteRequest().requestURI().setString(url); connector.getProtocolHandler().getAdapter().service (request.getCoyoteRequest(), response.getCoyoteResponse()); } catch (Exception e) { @@ -472,7 +475,8 @@ } else if (flag.startsWith("noescape") || flag.startsWith("NE")) { rule.setNoescape(true); } else if (flag.startsWith("proxy") || flag.startsWith("P")) { - // FIXME: Proxy not supported at the moment + // FIXME: Proxy not supported at the moment, would require proxy + // capabilities //rule.setProxy(true); } else if (flag.startsWith("qsappend") || flag.startsWith("QSA")) { rule.setQsappend(true); |