This is more serious than I first thought, and was only introduced in T5.2.4 
which is why it's not been caught before. Also it does not affect single server 
environments, so most people will not have noticed this.

I think this must be fixed before the release of T5.2

> -----Original Message-----
> From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
> Sent: 15 December 2010 12:17
> To: 'Tapestry users'
> Subject: [T5.2.4] Why does BaseURLSource use getLocalPort() rather than
> getServerPort() ? A bug?
> 
> Line 31 of BaseURLSourceImpl:
> 
>         int port = request.getLocalPort();
> 
> Which calls same method in the underlying ServletRequest.
> 
> getLocalPort javadoc: "Returns the Internet Protocol (IP) port number
> of the interface on which the request was received."
> 
> getServerPort javadoc: "Returns the port number to which the request
> was sent. It is the value of the part after ":" in the
> <code>Host</code> header, if any, or the server port where the client
> connection was accepted on."
> 
> I think that the second is the one that should be used and since this
> port number is paired with the host returned from getServerName()
> rather than getLocalName(), this seems like a bug to me. Admittedly one
> that will only rarely cause a problem, but it's just affected our site
> so it would be great if it could be fixed for 5.2.5 final release,
> unless anyone has a convincing argument why it should be this way, of
> course...
> 
> I've raised TAP5-1372 for this issue.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to