sqlmapproject/sqlmap · error · H2ProtocolError
conflicting content-length fields
Error message
conflicting content-length fields
What it means
Error "conflicting content-length fields" thrown in sqlmapproject/sqlmap.
Source
Thrown at lib/request/http2.py:852
def _parse_content_length(headers, trailers=False):
values = []
for name, value in headers:
if _as_bytes(name).lower() != b"content-length":
continue
if trailers:
raise H2ProtocolError("content-length is not permitted in trailers")
for part in _as_bytes(value).split(b","):
part = part.strip()
if not part or not part.isdigit():
raise H2ProtocolError("invalid content-length field")
values.append(int(part))
if not values:
return None
expected = values[0]
if any(value != expected for value in values[1:]):
raise H2ProtocolError("conflicting content-length fields")
return expected
def _validate_response_field_section(headers, trailers=False):
regular_seen = False
status = None
for name, value in headers:
name = _as_bytes(name)
value = _as_bytes(value)
_validate_field_value(value)
if name.startswith(b":"):
if trailers or regular_seen or name != b":status" or status is not None:
raise H2ProtocolError("invalid response pseudo-field ordering or duplication")
if len(value) != 3 or not value.isdigit():
raise H2ProtocolError("invalid :status pseudo-field")
status = int(value)
if not 100 <= status <= 599:
raise H2ProtocolError("response status is outside the valid range")View on GitHub (pinned to 0a35b20e39)
When it happens
Trigger: Thrown at lib/request/http2.py:852 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/c006006c0c20a7e8.
Report an issue: GitHub.