cziegeler 02/02/18 01:50:04 Modified: src/java/org/apache/cocoon/environment/http HttpRequest.java Log: Fix for getRequestURI Revision Changes Path 1.4 +16 -3 xml-cocoon2/src/java/org/apache/cocoon/environment/http/HttpRequest.java Index: HttpRequest.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/environment/http/HttpRequest.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- HttpRequest.java 13 Feb 2002 09:35:11 -0000 1.3 +++ HttpRequest.java 18 Feb 2002 09:50:04 -0000 1.4 @@ -70,7 +70,7 @@ * to provide request information for HTTP servlets. * * @author <a href="mailto:giacomo@apache,org">Giacomo Pati</a> - * @version CVS $Id: HttpRequest.java,v 1.3 2002/02/13 09:35:11 froehlich Exp $ + * @version CVS $Id: HttpRequest.java,v 1.4 2002/02/18 09:50:04 cziegeler Exp $ */ public class HttpRequest implements Request { @@ -193,8 +193,21 @@ return this.req.getRequestedSessionId(); } + protected String reqURI; + public String getRequestURI() { - return this.req.getRequestURI(); + if (this.reqURI == null) { + this.reqURI = this.req.getRequestURI(); + if ( this.reqURI.equals("/") ) { + String s = this.req.getServletPath(); + final StringBuffer buffer = new StringBuffer(); + if ( null != s ) buffer.append(s); + s = this.req.getPathInfo(); + if ( null != s ) buffer.append(s); + this.reqURI = buffer.toString(); + } + } + return this.reqURI; } public String getSitemapURI() { @@ -234,7 +247,7 @@ *instead. */ public boolean isRequestedSessionIdFromUrl() { - return this.req.isRequestedSessionIdFromUrl(); + return this.req.isRequestedSessionIdFromURL(); } /* The ServletRequest interface methods */
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]