G'day Pound,

I think I've found an edge case where LocationRewrite doesn't work if the pool 
is on non-standard ports.

e.g. Client -> Pound Pool (HTTPs on 443 or 446) -> Tomcat backends (HTTP on 
8080)

If the client sends a wget to https://pool/url and the backend returns a 
redirect to http://pool/url/ (standard tomcat behaviour), then 
LocationRewrite=1 will change the protocol on the redirect returned to the 
client to https://pool/url/  (ie all works well).

However if the https pool is on port 446 then the redirect to 
http://pool:446/url/ is not rewritten to https.

I realise this won't be an issue in production but it's useful in dev for our 
chef scripts to be able to build lots of pools on a single IP by using non 
standard ports.

I struggle to read the code but I expect it's something in the "need_rewrite" 
match which maybe thinks the host is "pool:446" so it doesn't match it to 
"pool"?
https://github.com/goochjj/pound/blob/570dc2d523d5888bfec6cbbc510aacab6149f927/svc.c

Any ideas/suggestions welcome.

James

Reply via email to