{"record":{"id":"ec4df74070afa32a","repo":"sqlmapproject/sqlmap","slug":"content-length-does-not-match-request-body","errorCode":null,"errorMessage":"content-length does not match request body","messagePattern":"content-length does not match request body","errorType":"exception","errorClass":"H2ProtocolError","httpStatus":null,"severity":"error","filePath":"lib/request/http2.py","lineNumber":745,"sourceCode":"        if name == b\"host\" or name == b\"proxy-authorization\":\n            continue\n        if name in _CONNECTION_FIELDS or name in connection_tokens:\n            continue\n        if name == b\"te\" and value.strip().lower() != b\"trailers\":\n            raise H2ProtocolError(\"HTTP/2 permits TE only with value 'trailers'\")\n        if name == b\"content-length\":\n            content_lengths.append(value.strip())\n            if content_length_added:\n                continue\n            content_length_added = True\n        normalized.append((name, value))\n\n    if content_lengths:\n        if len(set(content_lengths)) != 1 or not content_lengths[0].isdigit():\n            raise H2ProtocolError(\"invalid or conflicting content-length fields\")\n        expected = len(body)\n        if int(content_lengths[0]) != expected:\n            raise H2ProtocolError(\"content-length does not match request body\")\n    return normalized\n\n\ndef _request_header_list(method, path, authority, headers, body):\n    method = _as_bytes(method)\n    authority = _as_bytes(authority)\n    path = _as_bytes(path)\n    _validate_method(method)\n    if not authority:\n        raise H2ProtocolError(\"authority is required\")\n    _validate_pseudo_value(\":authority\", authority)\n    if method == b\"CONNECT\":\n        request = [(b\":method\", method), (b\":authority\", authority)]\n    else:\n        if not path:\n            raise H2ProtocolError(\"non-CONNECT requests require a non-empty :path\")\n        _validate_pseudo_value(\":path\", path)\n        request = [(b\":method\", method), (b\":scheme\", b\"https\"), (b\":path\", path), (b\":authority\", authority)]","sourceCodeStart":727,"sourceCodeEnd":763,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/request/http2.py#L727-L763","documentation":"Error \"content-length does not match request body\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at lib/request/http2.py:745 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}