On Mon, Oct 29, 2018 at 6:13 PM Mark Thomas <ma...@apache.org> wrote:

> On 29/10/2018 16:56, Mark Thomas wrote:
> > On 29/10/2018 16:41, Rémy Maucherat wrote:
> >> On Mon, Oct 29, 2018 at 4:17 PM <ma...@apache.org> wrote:
> >>
> >>> Author: markt
> >>> Date: Mon Oct 29 15:17:01 2018
> >>> New Revision: 1845136
> >>>
> >>> URL: http://svn.apache.org/viewvc?rev=1845136&view=rev
> >>> Log:
> >>> Refactor the Connector so that the port is obtained from the Endpoint
> >>> rather than a local field that could end up out of sync.
> >>>
> >>> Modified:
> >>>      tomcat/trunk/java/org/apache/catalina/connector/Connector.java
> >>>      tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
> >>>      tomcat/trunk/webapps/docs/changelog.xml
> >>>
> >>
> >> I have the feeling that duplication was there because port was used a
> bit
> >> more than other things (like in the two "security" valves) and the
> lookup
> >> is more expensive now.
> >
> > Good point. I need to rethink that / maybe revert it.
>
> I've updated that code.
>
> The really slow part (the reflection) will be skipped when using a
> standard protocol implementation.
>
> Do you think it is OK now or would you prefer I revert the changes?
>

It's good. It's only used in  RemoteAddr/HostValve with an optional
configuration where the port is used.

Rémy

Reply via email to