cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: [C2] minor bug in CocoonServlet.java
Date Thu, 05 Oct 2000 11:23:52 GMT
dima wrote:
> 
> 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.

you are totally right.

My fault. I'm patching right away.

Thanks much.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message