bzp2010 commented on code in PR #2421: URL: https://github.com/apache/apisix-dashboard/pull/2421#discussion_r874379186
########## api/internal/core/entity/format.go: ########## @@ -17,17 +17,23 @@ package entity import ( - "net" + "errors" "strconv" + "strings" "github.com/apisix/manager-api/internal/log" ) func mapKV2Node(key string, val float64) (*Node, error) { - host, port, err := net.SplitHostPort(key) - if err != nil { - log.Errorf("split host port fail: %s", err) - return nil, err + hp := strings.Split(key, ":") + host := hp[0] + // according to APISIX upstream nodes policy, port is optional + port := "0" Review Comment:  When there is no port in host, port `0` will be used by default, which I think is wrong. For HTTP it should be `80` and for HTTPS it should be `443`, so I think it should be set to 80 by default. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org