sqlmapproject/sqlmap · error · ValueError
frame header must be exactly 9 bytes
Error message
frame header must be exactly 9 bytes
What it means
Error "frame header must be exactly 9 bytes" thrown in sqlmapproject/sqlmap.
Source
Thrown at lib/request/http2.py:285
if not (0 <= ftype <= 0xff and 0 <= flags <= 0xff):
raise ValueError("frame type and flags must fit in one octet")
if not (0 <= stream_id <= MAX_STREAM_ID):
raise ValueError("stream id must be between 0 and 2^31-1")
if len(payload) > MAX_FRAME_SIZE:
raise ValueError("frame payload exceeds 24-bit length")
header = struct.pack("!I", len(payload))[1:]
header += struct.pack("!BBI", ftype, flags, stream_id)
return header + payload
def decode_frame_header(nine):
"""Parse a 9-byte frame header into (length, type, flags, stream_id).
>>> decode_frame_header(encode_frame(DATA, 0, 1, b'')[:9])
(0, 0, 0, 1)
"""
if len(nine) != 9:
raise ValueError("frame header must be exactly 9 bytes")
length = struct.unpack("!I", b"\x00" + nine[:3])[0]
ftype, flags, stream_id = struct.unpack("!BBI", nine[3:9])
return length, ftype, flags, stream_id & MAX_STREAM_ID
# ---------- Huffman ----------
def huffman_encode(data):
"""Huffman-encode a byte string using the RFC 7541 static code.
>>> huffman_decode(huffman_encode(b'www.example.com')) == b'www.example.com'
True
"""
data = _as_bytes(data)
if not data:
return b""
acc = 0
nbits = 0
for item in bytearray(data):View on GitHub (pinned to 0a35b20e39)
When it happens
Trigger: Thrown at lib/request/http2.py:285 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/ae5bd6a916ef1fd1.
Report an issue: GitHub.