/ Zope / Apsis / Pound Mailing List / Archive / 2004 / 2004-12 / Wrong :port in Host:

[ << ] [ >> ]

[ best approach / Brook Stevens ... ] [ Need help to get pound 1.8 into Debian / FX ... ]

Wrong :port in Host:
Dmitry Dvoinikov <dmitry(at)targeted.org>
2004-12-07 06:15:07 [ FULL ]
I'm wondering if the following behaviour is correct and what's
going on or I'm just missing something obvious. Consider the
following scheme (backend is running web proxy):

app -> pound:443 -> backend:8000 -> website:80

the following relevant pound config:
[...]

and the following sequence of requests' URLs and Host: headers:

app to pound:[...]

pound to backend:[...]
                ^^^
this obviosly breaks things and prevents proxy from working.

The only part of the 1.8 source which overwrites Host: seems to be
[...]

but it's rather unclear if this can produce the above behaviour.

I'm using pound 1.7.99 (one of the latest 1.7 currents before 1.8
has been released).

Sincerely,
Dmitry Dvoinikov
http://www.targeted.org/

Re: Wrong :port in Host:
Robert Segall <roseg(at)apsis.ch>
2004-12-08 12:15:39 [ FULL ]
On Tuesday 07 December 2004 06.15, Dmitry Dvoinikov wrote:[...]

Sorry, but for many of servers this is the only thing that works. The problem 
is that back-end servers create redirect response using the Host header as 
basis, but switch to HTTP. The only way Pound has of identifying such 
responses (and changing the Location header accordingly) is to add the port 
number. Additional ideas are welcome.
[...]

That is exactly what makes it happen. You can comment out the function (have 
it return NULL in all cases) to prevent the change, but then it may well 
break other stuff, such as the above mentioned Location rewriting.

Should you try the change please let us know how it works - we could easily 
put in a compile-time switch for this.[...]

MailBoxer