sqlmapproject/sqlmap · error · H2Error
hostname is required
Error message
hostname is required
What it means
Error "hostname is required" thrown in sqlmapproject/sqlmap.
Source
Thrown at lib/request/http2.py:569
payload = _recv_exact(sock, length) if length else b""
return ftype, flags, sid, payload
def _idna_host(host):
if isinstance(host, bytes):
try:
host = host.decode("ascii")
except UnicodeDecodeError:
try:
host = host.decode("utf-8")
except UnicodeDecodeError:
raise H2Error("hostname bytes are neither ASCII nor UTF-8")
if not isinstance(host, text_type):
host = text_type(host)
if host.startswith("[") and host.endswith("]"):
host = host[1:-1]
if not host:
raise H2Error("hostname is required")
if ":" in host: # IPv6 literal, optionally with a zone identifier
return host
try:
return host.encode("idna").decode("ascii")
except (UnicodeError, AttributeError):
raise H2Error("invalid internationalized hostname %r" % host)
def _format_authority_host(host):
host = _idna_host(host)
if ":" in host:
return "[%s]" % host
return host
def _authority_for_host(host, port):
authority = _format_authority_host(host)
if port != 443:View on GitHub (pinned to 0a35b20e39)
When it happens
Trigger: Thrown at lib/request/http2.py:569 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sqlmapproject/sqlmap@0a35b20e39 (2026-08-26).
Data as JSON: /api/errors/1539607641df4d94.
Report an issue: GitHub.