code: func RequestTargetPort(req *http.Request) int {
  	_, portStr, err := net.SplitHostPort(req.Host)
  	if err == nil && portStr != "" {
  		port, err := strconv.ParseInt(portStr, 0, 64)
  		if err == nil {
  			return int(port)
  		}
  	}
  	if req.TLS != nil {
  		return 443
  	}
  	return 80
  }
docs: // RequestTargetPort returns the port targeted by the client
  // in req. If not present, it returns 80, or 443 if TLS is used.