benweidig opened a new pull request, #64:
URL: https://github.com/apache/tapestry-5/pull/64

   `LocalhostOnly` didn't detect a few of the IPv6 variants.
   Furthermore, it might trigger a DNS lookup, which could impact performance.
   Therefore, it now relies on `HttpServletRequest.getRemoteAddr` (via Request).
   
   I've decided to extend the `Request` interfrace with `getRemoteAddr` instead 
of trying to provide `LocalhostOnly` with the `HttpServletRequest` somehow.
   
   My reasoning is that `Request` is already a more high-level/convenient 
wrapper for `HttpServletRequest`, delegating multiple methods already to the 
underlying `HttpServletRequest`.
   Adding another one makes sense, as anything relying on `LocalhostOnly would 
need to provide the full/correct environment.
   This was an issue during initial testing with using `RequestGlobals` in 
`LocalhostOnly`, as it became an invisible dependency.
   
   By extending `Request` and the related `TestableRequest` and 
`DelegatingRequest`, the `Request`-based code will behave correctly, regardless 
of how it's used.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to