Hello,

I'm currently migrating from tomcat 8.0.33 to 8.5.5, as stated in the
subject, but have stumbled in an unexpected behavior when using the
RewriteValve. I tested in two diferent OS (ubuntu 16.04 LTS and Centos 6.7).

This is the content of my WEB-INF/rewrite.config (Valve configured inside
Context):

> RewriteCond %{HTTP_HOST} ^ci.behoh.com
> RewriteRule ^(.*)$ http://www.%{HTTP_HOST}$1 [R=302,L]



In 8.0.33, my response headers are:

> HTTP/1.1 302
> Location: http://www.ci.behoh.com/
> Content-Length: 0
> Date: Mon, 19 Sep 2016 18:39:43 GMT



In 8.5.5, my response headers are:

> HTTP/1.1 302
> Location: http%3A//www.ci.behoh.com/
> Content-Length: 0
> Date: Mon, 19 Sep 2016 18:40:24 GMT


Notice the encoded version of ":" (%3A) in 8.5.5.

Because of that, the browser (Chrome/Firefox/Safari) is not redirecting
correctly, but instead appending the encoded string to the end of the url,
incrementally, until i get a "java.lang.IllegalArgumentException: Request
header is too large" (final modified  requestURL:
https://gist.github.com/tiagojco/b9c3f1a6e8c3fbacf206505b18944c62)

I already tried the flag [NE] in the RewriteRule, to no avail.

How can i fix this ? Is there any workaround ?

Thanks a lot.

p.s.: Sorry for my bad english, not my first language.
-- 
[image: Tiago Oliveira] Tiago OliveiraAnálise de sistemas[image: Contato]+55
83 99331.5541 <+5583993315541>/ 83 3506.8310 <+558335068310>[image: Email]
tiago.olive...@behoh.com <tiago.olive...@behoh.com>
[image: BeHOH]
[image: Facebook] <https://www.facebook.com/behoh.co>[image: Twitter]
<https://twitter.com/@BeHOHmyfriend>[image: Instagram]
<https://www.instagram.com/behoh.co/>
  [image: Website]behoh.com <http://www.behoh.com/>[image: Localização]
goo.gl/FtUZdn <http://goo.gl/FtUZdn>

Reply via email to