Move listen address functions into caddy package; fix unix bug

This commit is contained in:
Matthew Holt
2019-07-08 16:46:38 -06:00
parent 4eb5fc541b
commit d25008d2c8
4 changed files with 94 additions and 66 deletions

View File

@ -156,7 +156,7 @@ func (s *Server) enforcementHandler(w http.ResponseWriter, r *http.Request, next
func (s *Server) listenersUseAnyPortOtherThan(otherPort int) bool {
for _, lnAddr := range s.Listen {
_, addrs, err := parseListenAddr(lnAddr)
_, addrs, err := caddy.ParseListenAddr(lnAddr)
if err == nil {
for _, a := range addrs {
_, port, err := net.SplitHostPort(a)