cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dima <d...@hyperfluid.com>
Subject [C2] minor bug in CocoonServlet.java
Date Wed, 04 Oct 2000 17:33:45 GMT
Hi everyone,

 recently built Cocoon 2.0a3 from CVS and discovered a little bug

 this.cocoon.process (env) returned false because in
org.apache.cocoon.Cocoon.java because of a little bug in
org.apache.cocoon.servlet.CocoonServlet.java (:276):
_________________________________________________________________

        // We got it... Process the request
        String uri =  req.getServletPath();
        String pathInfo = req.getPathInfo();
        if (pathInfo != null) uri += "/" + pathInfo; <== here

        if (!uri.equals("")) {
            try {
                if (uri.charAt(0) == '/') {
                    uri = uri.substring(1);
                }
        and it should be :

	if (pathInfo != null) uri += pathInfo;

	when I sent req.getServletPath () and req.getPathInfo () to debug
output
	req.getServletPath () returned null and req.getPathInfo () return "/"

	so the original "if (pathInfo != null) uri += "/" + pathInfo;" was
producing
	a path with "//" in it.

hope this helps,
cheers,
dima

Mime
View raw message