Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-23 Thread Jérémie Barthés
Hi, I send you the patch from 8.0.15 Tell me if it doesn't match with what you expected Kind regards, Jérémie Index: RewriteValve.java === --- RewriteValve.java(revision 1661627) +++ RewriteValve.java(working copy) @@

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-20 Thread Jérémie Barthés
Le 20/02/2015 11:22, Rémy Maucherat a écrit : 2015-02-20 10:31 GMT+01:00 Jérémie Barthés j.bart...@oodrive.fr: I send you the patch i did to fix my issue with the RewriteValve (it was for the 8.0.15), The goal of that patch is to block the RewriteValve if a 302 automatic folder '/' redirection

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-20 Thread Rémy Maucherat
2015-02-20 10:31 GMT+01:00 Jérémie Barthés j.bart...@oodrive.fr: I send you the patch i did to fix my issue with the RewriteValve (it was for the 8.0.15), The goal of that patch is to block the RewriteValve if a 302 automatic folder '/' redirection occurs. The RewriteValve will rewrite the

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-20 Thread Felix Schumacher
Am 20.02.2015 08:49, schrieb Rainer Jung: Am 19.02.2015 um 22:13 schrieb Felix Schumacher: Am 19.02.2015 um 21:41 schrieb André Warnier: Jérémie Barthés wrote: ... Make a file rewrite.config in conf/Catalina/localhost/ that contains : RewriteRule^/mypath/(.*)$/examples/jsp/$1

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-20 Thread Jérémie Barthés
I send you the patch i did to fix my issue with the RewriteValve (it was for the 8.0.15), The goal of that patch is to block the RewriteValve if a 302 automatic folder '/' redirection occurs. The RewriteValve will rewrite the redirected URL. first step : http://localhost:8080/mypath/async =

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-20 Thread Jérémie Barthés
instead of just a snippet of fixed code Sorry Chris,i didn't read this. How do you want me to provide the patch ? Jérémie Le 20/02/2015 10:31, Jérémie Barthés a écrit : I send you the patch i did to fix my issue with the RewriteValve (it was for the 8.0.15), The goal of that patch is to

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jérémie, On 2/20/15 4:48 AM, Jérémie Barthés wrote: instead of just a snippet of fixed code Sorry Chris,i didn't read this. How do you want me to provide the patch ? Presumably, you have a copy of the source code. If you checked-out from

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-20 Thread Konstantin Kolinko
2015-02-20 19:41 GMT+03:00 Christopher Schultz ch...@christopherschultz.net: Jérémie, On 2/20/15 4:48 AM, Jérémie Barthés wrote: instead of just a snippet of fixed code Sorry Chris,i didn't read this. How do you want me to provide the patch ? Presumably, you have a copy of the source

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread André Warnier
Jérémie Barthés wrote: ... Make a file rewrite.config in conf/Catalina/localhost/ that contains : RewriteRule^/mypath/(.*)$/examples/jsp/$1 copy the line Valve className=org.apache.catalina.valves.rewrite.RewriteValve / in the conf/server.xml file, line 131 Since this is

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread Felix Schumacher
Am 19.02.2015 um 21:41 schrieb André Warnier: Jérémie Barthés wrote: ... Make a file rewrite.config in conf/Catalina/localhost/ that contains : RewriteRule^/mypath/(.*)$/examples/jsp/$1 copy the line Valve className=org.apache.catalina.valves.rewrite.RewriteValve / in the

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread Jérémie Barthés
Hi Chris, When an URL target a folder on the server, tomcat automaticly add a / at the end of the URL if missing : myHost.com/myFolder = myHost.com/myFolder/ (automatic tomcat 302 redirection) If you use a rewriteValve to forward myHost.com/myFolder to myHost.com/rewriteTrick/myFolder, the

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread Felix Schumacher
Am 20. Februar 2015 00:43:40 MEZ, schrieb André Warnier a...@ice-sa.com: André Warnier wrote: Felix Schumacher wrote: Am 19.02.2015 um 21:41 schrieb André Warnier: Jérémie Barthés wrote: ... ... in the browser, you have to modify your rewrite rules, perhaps by using a RewriteCond with

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread Rainer Jung
Am 19.02.2015 um 22:13 schrieb Felix Schumacher: Am 19.02.2015 um 21:41 schrieb André Warnier: Jérémie Barthés wrote: ... Make a file rewrite.config in conf/Catalina/localhost/ that contains : RewriteRule^/mypath/(.*)$/examples/jsp/$1 copy the line Valve

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jérémie, On 2/19/15 4:54 AM, Jérémie Barthés wrote: When an URL target a folder on the server, tomcat automaticly add a / at the end of the URL if missing : myHost.com/myFolder = myHost.com/myFolder/ (automatic tomcat 302 redirection) If you

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread Jérémie Barthés
Tell me what you need about my configuration : rewrite.config file : RewriteRule^/jamfiles/(.*)$/newapp/jamfiles/$1 RewriteRule^/workspace/(.*)$ /newapp/htdocuments/workspace/$1 RewriteRule ^/([a-zA-Z0-9]+)(\.jsp|\.html|\.txt)$ /newapp/htdocuments/$1$2 tomcat version : 8.0.15 (tried

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread Jérémie Barthés
Hi, I made a scenario to make the issue happens : Use a tomcat 8.0.18 Make a file rewrite.config in conf/Catalina/localhost/ that contains : RewriteRule^/mypath/(.*)$/examples/jsp/$1 copy the line Valve className=org.apache.catalina.valves.rewrite.RewriteValve / in the

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jérémie, On 2/19/15 10:05 AM, Jérémie Barthés wrote: I made a scenario to make the issue happens : Use a tomcat 8.0.18 Make a file rewrite.config in conf/Catalina/localhost/ that contains : RewriteRule^/mypath/(.*)$/examples/jsp/$1

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread André Warnier
André Warnier wrote: Felix Schumacher wrote: Am 19.02.2015 um 21:41 schrieb André Warnier: Jérémie Barthés wrote: ... ... in the browser, you have to modify your rewrite rules, perhaps by using a RewriteCond with the -d flag, to check first if the URL points to an existing directory, and

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread André Warnier
Felix Schumacher wrote: Am 19.02.2015 um 21:41 schrieb André Warnier: Jérémie Barthés wrote: ... Make a file rewrite.config in conf/Catalina/localhost/ that contains : RewriteRule^/mypath/(.*)$/examples/jsp/$1 copy the line Valve

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-17 Thread Jérémie Barthés
Hi, I don't have more to say than : There is a bug using the RewriteValve :If you are targeting a folder and there is no / at the end of the URI, the rewritten URI is visible for the client browser (302 redirection). Example : http://myhost.com/myFolder =

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jérémie, On 2/17/15 6:20 AM, Jérémie Barthés wrote: I just installed tomcat 8 and used the RewriteValve to forward some old URLs on my new tomcat8 webapp. I had an issue for URIs targeting a folder: If there is no / at the end of the URI, the

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jérémie, On 2/17/15 10:47 AM, Jérémie Barthés wrote: I don't have more to say than : There is a bug using the RewriteValve :If you are targeting a folder and there is no / at the end of the URI, The end of which URI? The one in the rewrite

Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-17 Thread Jérémie Barthés
Hi, I just installed tomcat 8 and used the RewriteValve to forward some old URLs on my new tomcat8 webapp. I had an issue for URIs targeting a folder: If there is no / at the end of the URI, the rewritten URI is visible for the client browser (302 redirection). Example :