sqlmapproject/sqlmap · error · H2Error

response body exceeds configured limit

Error message

response body exceeds configured limit

What it means

Client-side limit in _process_data_frame tripped when received body bytes exceed the configured maximum response size. Unlike the declared-length check, this fires on actual DATA payload accumulation.

Solutions

  1. Increase the max response body setting for legitimately large downloads
  2. Use range requests to fetch large content in chunks
  3. Reset the stream and close the connection to stop the transfer
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at lib/request/http2.py:1188 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/d8635915855e661a. Report an issue: GitHub.

Appendix: source

Thrown at lib/request/http2.py:1188

            self._connection_error("DATA received before final response headers")
        if state.complete:
            self._connection_error("DATA received after END_STREAM")
        flow_len = len(payload)
        if flow_len > self.conn_recv_window:
            self._connection_error("peer exceeded the connection receive window")
        if flow_len > state.recv_window:
            self._connection_error("peer exceeded the stream receive window")
        self.conn_recv_window -= flow_len
        state.recv_window -= flow_len
        data = _extract_data(flags, payload)
        if state.body_forbidden and data:
            self._connection_error("response semantics forbid a message body")
        if (state.expected_content_length is not None and not state.body_forbidden and
                len(state.body) + len(data) > state.expected_content_length):
            self._connection_error("response body exceeds declared content-length")
        if len(state.body) + len(data) > MAX_RESPONSE_SIZE:
            self.usable = False
            raise H2Error("response body exceeds configured limit")
        state.body.extend(data)

        end_stream = bool(flags & FLAG_END_STREAM)
        if flow_len:
            if end_stream:
                try:
                    self.sock.sendall(encode_frame(WINDOW_UPDATE, 0, 0, struct.pack("!I", flow_len)))
                    self.conn_recv_window += flow_len
                except (socket.error, ssl.SSLError, IOError):
                    self.usable = False
            else:
                self.sock.sendall(encode_frame(WINDOW_UPDATE, 0, 0, struct.pack("!I", flow_len)))
                self.sock.sendall(encode_frame(WINDOW_UPDATE, 0, sid, struct.pack("!I", flow_len)))
                self.conn_recv_window += flow_len
                state.recv_window += flow_len
        if end_stream:
            self._finish_response(state)

View on GitHub (pinned to 0a35b20e39)