-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Labels
bugSomething isn't workingSomething isn't workingpriority:minorMinor loss of function, or other problem where easy workaround is presentMinor loss of function, or other problem where easy workaround is present
Description
Romain Manni-Bucau opened MNG-7132 and commented
DefaultMirrorSelector used in org.apache.maven.internal.aether.DefaultRepositorySystemSessionFactory#newRepositorySession does not implement isLocal properly - more exactly it only handles 2 particular cases whereas local can be way more numerous:
- ipv4 case: 127.x.y.z (test can be has 4 segments separated by a dot and starts with 127.)
- ipv6 case: starts with 1 and ends with 0 (see java.net.Inet6Address.Inet6AddressHolder#isLoopbackAddress)
- host case: not sure we want to handle it but except localhost hardcoded string we could parse /etc/hosts (or windows specific location) too to resolve the ip without going through InetAddress - see next point) and use the ip with 1+2 rules.
this can be implemented as string parsing (faster) or reusing java.net.InetAddress#isLoopbackAddress (which can fallback in some resolution which can be slow at startup but works better overall and is easier).
Issue Links:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpriority:minorMinor loss of function, or other problem where easy workaround is presentMinor loss of function, or other problem where easy workaround is present