You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Irv Salisbury <ir...@gmail.com> on 2005/06/17 17:08:50 UTC

Weird tomcat 5.5 beahvior (adding extra / at end)

We just tried our app in the latest Tomcat 5.5, and  URL like:

http://127.0.0.1:8080/realnet/asset/module/property/profile/summary?feature=read&moduleData=1648855690&defaultTab=&searchResult=true

Tries to match on pipeline asset/module/property/profile/summary/

In previous versions (4.x), the pipeline matched on
asset/module/property/profile/summary  (without the ending / )

This, of course breaks our app.  Has anyone else seen this behavior? 
Also, it seems like with the URL above, it shouldn't have an ending /
on it, but maybe I am wrong.

Help is appreciated.

Thanks,

Irv

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Weird tomcat 5.5 beahvior (adding extra / at end)

Posted by Irv Salisbury <ir...@gmail.com>.
Actually, I just found the answer and it is very weird.  I knew it was
Tomcat as I am not using apache in front of it, and I am using Live
HTTP headers that can be downloaded for Firefox to see exactly what
the web server is sending back.

Anyway, it turns out if your URL maps exaclty to a directory structure
under your application, Tomcat 5.5 tries to be "smart" and puts an
ending slash on it.  Now, there might be a way to tell Tomcat to not
do this, but we just changed our URL pattern to not match exaclty and
it worked fine.  (All other URLs that matched exactly were exhibiting
the same problem)

So, if you have a URL that looks like:

asset/module/screen?foo=true

and you have a directory under cocoon that is

asset/module/screen

Tomcat 5.5 will send a redirect back to the browser with

asset/module/screen/?foo=true

Which obviously presents many problems for cocoon based applications
that do URL matching.

Too much fun!

Irv

On 6/17/05, Mark Lundquist <ml...@wrinkledog.com> wrote:
> Hi Irv,
> 
> How do you know that it's Tomcat that's issuing the redirect?  I'm not
> saying it isn't, just making sure you've properly narrowed it down.
> Are you running Apache in front of Tomcat?  And are you sure the
> redirect isn't coming from Cocoon (you can easily find that out from
> the logs)?
> 
> —ml—
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
>

Re: Weird tomcat 5.5 beahvior (adding extra / at end)

Posted by Mark Lundquist <ml...@wrinkledog.com>.
Hi Irv,

How do you know that it's Tomcat that's issuing the redirect?  I'm not 
saying it isn't, just making sure you've properly narrowed it down.  
Are you running Apache in front of Tomcat?  And are you sure the 
redirect isn't coming from Cocoon (you can easily find that out from 
the logs)?

—ml—

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Weird tomcat 5.5 beahvior (adding extra / at end)

Posted by Irv Salisbury <ir...@gmail.com>.
Just some more information.  It looks like for whatever reason, Tomcat
is sending back a redirect to the browser that adds the final /.  So,
when we request

http://127.0.0.1:8080/realnet/asset/module/property/profile/summary?feature=read&moduleData=1648855690&defaultTab=&searchResult=true

It gets redirected to 

http://127.0.0.1:8080/realnet/asset/module/property/profile/summary/?feature=read&moduleData=1648855690&defaultTab=&searchResult=true

This blows everything up.  If someone else has seen this, and have
found out why, it would be a huge help.

Irv

On 6/17/05, Irv Salisbury <ir...@gmail.com> wrote:
> We just tried our app in the latest Tomcat 5.5, and  URL like:
> 
> http://127.0.0.1:8080/realnet/asset/module/property/profile/summary?feature=read&moduleData=1648855690&defaultTab=&searchResult=true
> 
> Tries to match on pipeline asset/module/property/profile/summary/
> 
> In previous versions (4.x), the pipeline matched on
> asset/module/property/profile/summary  (without the ending / )
> 
> This, of course breaks our app.  Has anyone else seen this behavior?
> Also, it seems like with the URL above, it shouldn't have an ending /
> on it, but maybe I am wrong.
> 
> Help is appreciated.
> 
> Thanks,
> 
> Irv
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Betr.: Weird tomcat 5.5 beahvior (adding extra / at end)

Posted by Pe...@mediacenter.nl.




Irv Salisbury <ir...@gmail.com> wrote on 17-06-2005 17:08:50:

> We just tried our app in the latest Tomcat 5.5, and  URL like:
>
> http://127.0.0.1:8080/realnet/asset/module/property/profile/summary?
> feature=read&moduleData=1648855690&defaultTab=&searchResult=true
>
> Tries to match on pipeline asset/module/property/profile/summary/
>
> In previous versions (4.x), the pipeline matched on
> asset/module/property/profile/summary  (without the ending / )
>
> This, of course breaks our app.  Has anyone else seen this behavior?
> Also, it seems like with the URL above, it shouldn't have an ending /
> on it, but maybe I am wrong.
>
> Help is appreciated.
>
> Thanks,
>
> Irv

We had the same problem, and "solved" it by always using a file ending
(e.g. .html). Never had the problem since.
Take a look at this:
http://issues.apache.org/bugzilla/show_bug.cgi?id=32424

HTH, Peter



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org