Matisse Enzer wrote:
Is it possible that the value returned by $r->get_server_port could be affected by the format or content of the client request?
yes
I've got a test case where when i hit the same URL from two different clients
I get different values from $r->get_server_port.
This doesn't make sense to me, because I had believed that get_server_port gets its information from the server side only, but perhaps i am mistaken about that.
yes, you are. if UseCanonicalName is set to Off or DNS, first the incoming URI is checked, then the ServerName is checked, then finally the port defaults to 80. if UseCanonicalName is set to On, first the ServerName is checked, then the incoming connection is checked, finally the port defaults to 80. it's all there in the code (server/core.c) and the docs.
so, as I suggested to you before, try playing with UseCanonicalName settings, in conjunction with ServerName, and see if that helps.
--Geoff