docs: def do_GET(self, write_status_code_only=False):
          """Default method for processing all GET requests which can not be routed to other methods"""
  
          path = '/master' if self.path == '/' else self.path
          response = self.get_postgresql_status()
  
          patroni = self.server.patroni
          cluster = patroni.dcs.cluster
  
          if not cluster and patroni.ha.is_paused():
              primary_status_code = 200 if response['role'] == 'master' else 503
          else:
              primary_status_code = 200 if patroni.ha.is_leader() else 503
  
          replica_status_code = 200 if not patroni.noloadbalance and response.get('role') == 'replica' else 503
          status_code = 503
  
          if patroni.ha.is_standby_cluster() and ('standby_leader' in path or 'standby-leader' in path):
              status_code = 200 if patroni.ha.is_leader() else 503
          elif 'master' in path or 'leader' in path or 'primary' in path or 'read-write' in path:
              status_code = primary_status_code
          elif 'replica' in path:
              status_code = replica_status_code
          elif 'read-only' in path:
              status_code = 200 if primary_status_code == 200 else replica_status_code
          elif cluster:  # dcs is available
              is_synchronous = cluster.is_synchronous_mode() and cluster.sync \
                      and cluster.sync.sync_standby == patroni.postgresql.name
              if path in ('/sync', '/synchronous') and is_synchronous:
                  status_code = replica_status_code
              elif path in ('/async', '/asynchronous') and not is_synchronous:
                  status_code = replica_status_code
  
          if write_status_code_only:  # when haproxy sends OPTIONS request it reads only status code and nothing more
              message = self.responses[status_code][0]
              self.wfile.write('{0} {1} {2}\r\n'.format(self.protocol_version, status_code, message).encode('utf-8'))
          else:
              self._write_status_response(status_code, response)