/ Zope / Apsis / Pound Mailing List / Archive / 2003 / 2003-12 / Redirect rewrite feature

[ << ] [ >> ]

[ Zope ZMI: 302 not working / Sascha Ottolski ... ] [ Virtual directory virtual hosting for Zope with ... ]

Redirect rewrite feature
Pavel Merdine <pounduser(at)merdin.com>
2003-12-10 15:14:23 [ SNIP ]
Hello,

  I  think  that  there  should  be the possibility to switch redirect
  rewrite  feature  off  in  the config. In my case it was bad things,
  because I use some servers directly.

-- 
/ Pavel Merdine


Re: Redirect rewrite feature
Robert Segall <roseg(at)apsis.ch>
2003-12-10 18:55:59 [ SNIP ]
On Wednesday 10 December 2003 15:14, Pavel Merdine wrote:
> Hello,
>
>   I  think  that  there  should  be the possibility to switch redirect
>   rewrite  feature  off  in  the config. In my case it was bad things,
>   because I use some servers directly.

If you use a server directly you are not affected by Pound. Could you provide 
some more details what exactly the problem is?
-- 
Robert Segall
Apsis GmbH
Postfach, Uetikon am See, CH-8707
Tel: +41-1-920 4904



Re[2]: Redirect rewrite feature
Pavel Merdine <pounduser(at)merdin.com>
2003-12-10 19:19:50 [ SNIP ]
Hello ,

Wednesday, December 10, 2003, 8:55:59 PM, you wrote:

> On Wednesday 10 December 2003 15:14, Pavel Merdine wrote:
>> Hello,
>>
>>   I  think  that  there  should  be the possibility to switch redirect
>>   rewrite  feature  off  in  the config. In my case it was bad things,
>>   because I use some servers directly.

> If you use a server directly you are not affected by Pound. Could you provide

> some more details what exactly the problem is?

It's  not  really a problem for. I commented out that part now. I just
thought that such dangerous feature should be switchable.
I  use  pound for some hosts. It works with 2 backend servers. However
another  one  of  host  names  is  pointing  to one of backend servers
directly.  (Because  another  server cannot service that host name for
some reason.) So when a redirect to that host comes it is rewritten to
current host, which causes a loop.

-- 
/ Pavel Merdine


Re: Re[2]: Redirect rewrite feature
Robert Segall <roseg(at)apsis.ch>
2003-12-11 09:47:28 [ SNIP ]
On Wednesday 10 December 2003 19:19, Pavel Merdine wrote:
> It's  not  really a problem for. I commented out that part now. I just
> thought that such dangerous feature should be switchable.
> I  use  pound for some hosts. It works with 2 backend servers. However
> another  one  of  host  names  is  pointing  to one of backend servers
> directly.  (Because  another  server cannot service that host name for
> some reason.) So when a redirect to that host comes it is rewritten to
> current host, which causes a loop.

Sorry, I must be stupid today: I still don't understand what the issue is.

- If a request comes to Pound and is redirected to some back-end the client 
talks to Pound. If the back-end responds with some redirect to ITSELF the 
address is rewritten to the one Pound listens on, as it should be.

- If a request comes directly to some server Pound is not involved at all. 
Whatever happens between the server and the client is not affected.

How the above two can cause a loop is beyond me.
-- 
Robert Segall
Apsis GmbH
Postfach, Uetikon am See, CH-8707
Tel: +41-1-920 4904



Re[4]: Redirect rewrite feature
Pavel Merdine <pounduser(at)merdin.com>
2003-12-11 10:11:12 [ SNIP ]
Hello ,

Thursday, December 11, 2003, 11:47:28 AM, you wrote:

> On Wednesday 10 December 2003 19:19, Pavel Merdine wrote:
>> It's  not  really a problem for. I commented out that part now. I just
>> thought that such dangerous feature should be switchable.
>> I  use  pound for some hosts. It works with 2 backend servers. However
>> another  one  of  host  names  is  pointing  to one of backend servers
>> directly.  (Because  another  server cannot service that host name for
>> some reason.) So when a redirect to that host comes it is rewritten to
>> current host, which causes a loop.

> Sorry, I must be stupid today: I still don't understand what the issue is.

Sorry, maybe I was not specific.

> - If a request comes to Pound and is redirected to some back-end the client 
> talks to Pound. If the back-end responds with some redirect to ITSELF the 
> address is rewritten to the one Pound listens on, as it should be.

> - If a request comes directly to some server Pound is not involved at all. 
> Whatever happens between the server and the client is not affected.

> How the above two can cause a loop is beyond me.

First  of all, we have no automatic redirects. (e.g. apache can send a
redirect to its ServerName). We have only programmed redirects.
In  our  configuration, one of the servers sends non logged-in user to
another  server  to  login.  This login server has direct address of a
backend server.
So  when pound redirects then user is sent to the same server and gets
the same redirection. That is loop.
I  know you might thought this is not usual configuration. But pound's
redirection  has  no meaning in our case, because as I said we have no
automatic redirection.

-- 
/ Pavel Merdine


Re: Re[4]: Redirect rewrite feature
Robert Segall <roseg(at)apsis.ch>
2003-12-11 11:08:29 [ SNIP ]
On Thursday 11 December 2003 10:11, Pavel Merdine wrote:
> First  of all, we have no automatic redirects. (e.g. apache can send a
> redirect to its ServerName). We have only programmed redirects.
> In  our  configuration, one of the servers sends non logged-in user to
> another  server  to  login.  This login server has direct address of a
> backend server.
> So  when pound redirects then user is sent to the same server and gets
> the same redirection. That is loop.
> I  know you might thought this is not usual configuration. But pound's
> redirection  has  no meaning in our case, because as I said we have no
> automatic redirection.

How about a concrete example? It would be helpful to see how this could 
happen.
-- 
Robert Segall
Apsis GmbH
Postfach, Uetikon am See, CH-8707
Tel: +41-1-920 4904


Re[6]: Redirect rewrite feature
Pavel Merdine <pounduser(at)merdin.com>
2003-12-11 11:17:39 [ SNIP ]
Hello ,

Thursday, December 11, 2003, 1:08:29 PM, you wrote:

> On Thursday 11 December 2003 10:11, Pavel Merdine wrote:
>> First  of all, we have no automatic redirects. (e.g. apache can send a
>> redirect to its ServerName). We have only programmed redirects.
>> In  our  configuration, one of the servers sends non logged-in user to
>> another  server  to  login.  This login server has direct address of a
>> backend server.
>> So  when pound redirects then user is sent to the same server and gets
>> the same redirection. That is loop.
>> I  know you might thought this is not usual configuration. But pound's
>> redirection  has  no meaning in our case, because as I said we have no
>> automatic redirection.

> How about a concrete example? It would be helpful to see how this could 
> happen.

Ok.
Let say we have pound and 2 backends.
                       /------  http1
main pound server -----
                       \------  http2

main server has alias myaccount.domain.com
http2 has alias login.domain.com

Now when myaccount.fotki.com gets request with no cookie it sends back
302 with Location: http://login.domain.com/?backto=myaccount.
When pound gets that it rewrites Location: to current host header.
So it is 'http://myaccount.domain.com/?backto=myaccount'.
Client gets it and goes to myaccount again. So it's a loop.

-- 
/ Pavel Merdine


Re: Re[6]: Redirect rewrite feature
Robert Segall <roseg(at)apsis.ch>
2003-12-11 11:48:27 [ SNIP ]
On Thursday 11 December 2003 11:17, Pavel Merdine wrote:
> Let say we have pound and 2 backends.
>                        /------  http1
> main pound server -----
>                        \------  http2
>
> main server has alias myaccount.domain.com
> http2 has alias login.domain.com
>
> Now when myaccount.fotki.com gets request with no cookie it sends back
> 302 with Location: http://login.domain.com/?backto=myaccount.
> When pound gets that it rewrites Location: to current host header.
> So it is 'http://myaccount.domain.com/?backto=myaccount'.
> Client gets it and goes to myaccount again. So it's a loop.

Now I understand and yes, it is a loop. However, this comes under the heading 
of "less than optimal design", and I don't think it is really a Pound 
problem, but rather something to be addressed by the network admin.

As a possible work-around (a kludge really) assign login.domain.com some other 
IP address and have it redirected to http2 internally. It's not clean but 
certainly better than what you have now.
-- 
Robert Segall
Apsis GmbH
Postfach, Uetikon am See, CH-8707
Tel: +41-1-920 4904


Re[8]: Redirect rewrite feature
Pavel Merdine <pounduser(at)merdin.com>
2003-12-11 13:26:58 [ SNIP ]
Hello ,

Thursday, December 11, 2003, 1:48:27 PM, you wrote:

> On Thursday 11 December 2003 11:17, Pavel Merdine wrote:
>> Let say we have pound and 2 backends.
>>                        /------  http1
>> main pound server -----
>>                        \------  http2
>>
>> main server has alias myaccount.domain.com
>> http2 has alias login.domain.com
>>
>> Now when myaccount.fotki.com gets request with no cookie it sends back
>> 302 with Location: http://login.domain.com/?backto=myaccount.
>> When pound gets that it rewrites Location: to current host header.
>> So it is 'http://myaccount.domain.com/?backto=myaccount'.
>> Client gets it and goes to myaccount again. So it's a loop.

> Now I understand and yes, it is a loop. However, this comes under the heading

> of "less than optimal design", and I don't think it is really a Pound 
> problem, but rather something to be addressed by the network admin.

> As a possible work-around (a kludge really) assign login.domain.com some
other 
> IP address and have it redirected to http2 internally. It's not clean but 
> certainly better than what you have now.

I commented that part in pound sources. So it's now working fine.
In the first letter I said that your design in pound is not absolutely
right too. It could be switchable.
But,  of  course,  it's  up  to you what you are going to do with your
product.

P.S. In remembers me the microsoft way of thinking, like "we know what
to do for you, even if you disagree" :)

-- 
/ Pavel Merdine


Re: Re[8]: Redirect rewrite feature
Robert Segall <roseg(at)apsis.ch>
2003-12-11 17:30:08 [ SNIP ]
On Thursday 11 December 2003 13:26, Pavel Merdine wrote:
> I commented that part in pound sources. So it's now working fine.
> In the first letter I said that your design in pound is not absolutely
> right too. It could be switchable.
> But,  of  course,  it's  up  to you what you are going to do with your
> product.

We try to put into Pound whatever the community finds useful. On the other 
hand, we also try to keep it as simple as possible - much healthier and 
safer. It is not always easy to balance the two, but we try.

In this case we feel that the additional feature would not be warranted - it 
would just add some complexity for little gain (essentially we would make 
Pound a bit more complex in order to compensate for a poorly designed 
network/application).

> P.S. In remembers me the microsoft way of thinking, like "we know what
> to do for you, even if you disagree" :)

We certainly do not "know what is best for you". I am not aware of Pound being 
bundled with any operating system, or of Windows source code being available 
to the general public. I also think that the price you paid for Pound was 
quite reasonable - and BTW it is the same price we charge everybody, namely 
nothing.

You have the source and are free (and encouraged) to do with it whatever you 
wish - any modification is OK. We are happy to include modifications which in 
our opinion should be included. Expecting us to accept all changes into the 
"official" package is a bit much.

You are welcome to make your modifications public, and we'll be glad to put a 
link to your version on the Pound web page.
-- 
Robert Segall
Apsis GmbH
Postfach, Uetikon am See, CH-8707
Tel: +41-1-920 4904



MailBoxer