{"record":{"id":"cc90dc862580a321","repo":"sqlmapproject/sqlmap","slug":"invalid-content-length-field","errorCode":null,"errorMessage":"invalid content-length field","messagePattern":"invalid content-length field","errorType":"exception","errorClass":"H2ProtocolError","httpStatus":null,"severity":"error","filePath":"lib/request/http2.py","lineNumber":846,"sourceCode":"    if not payload:\n        raise H2ProtocolError(\"padded DATA frame has no pad length\")\n    pad_length = bytearray(payload)[0]\n    if pad_length > len(payload) - 1:\n        raise H2ProtocolError(\"DATA padding exceeds frame payload\")\n    return payload[1:len(payload) - pad_length]\n\n\ndef _parse_content_length(headers, trailers=False):\n    values = []\n    for name, value in headers:\n        if _as_bytes(name).lower() != b\"content-length\":\n            continue\n        if trailers:\n            raise H2ProtocolError(\"content-length is not permitted in trailers\")\n        for part in _as_bytes(value).split(b\",\"):\n            part = part.strip()\n            if not part or not part.isdigit():\n                raise H2ProtocolError(\"invalid content-length field\")\n            values.append(int(part))\n    if not values:\n        return None\n    expected = values[0]\n    if any(value != expected for value in values[1:]):\n        raise H2ProtocolError(\"conflicting content-length fields\")\n    return expected\n\n\ndef _validate_response_field_section(headers, trailers=False):\n    regular_seen = False\n    status = None\n    for name, value in headers:\n        name = _as_bytes(name)\n        value = _as_bytes(value)\n        _validate_field_value(value)\n        if name.startswith(b\":\"):\n            if trailers or regular_seen or name != b\":status\" or status is not None:","sourceCodeStart":828,"sourceCodeEnd":864,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/request/http2.py#L828-L864","documentation":"Validation failure inside _parse_content_length: a content-length field value (or one comma-separated component of it) is not a pure digit string, so it cannot be parsed into the declared body length. Distinct from the conflicting-values check, which fires afterwards.","triggerScenarios":"Thrown at lib/request/http2.py:846 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Treat the response as malformed and reset the stream","Fix the origin to send one valid content-length"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}