Hi!
There seems to be a bug in Orion (1.4.7) with sendRedirect and <frontend
host=".." port=".." /> tag (from web-site.xml). I have understood the
meaning of frontend tag so that it is used in HTTP REDIRECTS if relative
URL is used in a method HttpServletResponse.sendRedirect. E.g.
response.sendRedirect("/foo.jsp") should send a redirect pointing to
http://my.server:port/foo.jsp if web-site is configured with <frontend
host="my.server" port="port" /> tag. This doesn't work in my environment
where I use Squid cache server (http://www.squid-cache.org) as a
frontend server listening port 80 and Orion is running on a same machine
on port 8080. So, my web-site configuration is:

<frontend host="www.myserver.com" port="80" />

The port attribute in frontend tag is working well but Orion always
incorrectly sends the redirect pointing to localhost, thus neglecting
the host attribute. Notice that the actual request comes from localhost
since Squid is listening port 80 and then issueing a new HTTP request to
port 80. 

Here's a beautiful picture depicting this architecture :)

           +-------------+
           |   Firewall  |
           +-------------+
                 |
                 | http://www.myserver.com:80
                 V
      +-----------------------------------+
      |      +------------+               |
      |      |   Squid    |               |
      |      +------------+               |
      |          |                        |
      |          | http://localhost:8080  |
      |          V                        |
      |      +------------+               |
      |      |   Orion    |               |
      |      +------------+               |
      |                                   |
      +-----------------------------------+

The obvious (but ugly) fix for this is to always use absolute URL's when
using response.sendRedirect();

This bug propably have implications on a various load-balancing
solutions too? Has any of you seen this? I am considering to put this to
Orion bugzilla but I am still hesitating since I am not 100% sure if I
have understood the problem correctly.

BTW. This Squid set up as a front-end cache server is an excellent way
to speed up Orion. It is very fast with static files (gifs, jpegs etc.)
and with a simple rules + HTTP headers it is possible to cache dynamic
pages too. You can contact me in case you want more information.

-- 
Joni
[EMAIL PROTECTED]

Reply via email to