sqlmapproject/sqlmap · error · H2Error

aggregate response headers exceed configured limit

Error message

aggregate response headers exceed configured limit

What it means

Guard enforcing a byte budget on the aggregate of all response header blocks received for a stream (final plus trailers). Combined encoded size beyond the configured limit means the peer is bloating the header stream and the exchange fails.

Solutions

  1. Increase the aggregate header limit for servers that legitimately send large headers
  2. Fix server/intermediary header bloat (oversized cookies, tracing headers)
  3. Abort the exchange to avoid unbounded memory use
Defensive patterns

Strategy: validation

When it happens

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

Appendix: source

Thrown at lib/request/http2.py:1132

            if status == 204 and content_length is not None:
                self._connection_error("204 response must not carry content-length")
            if status == 205 and content_length not in (None, 0):
                self._connection_error("205 response content-length must be zero")
            if state.request_method == b"CONNECT" and 200 <= status < 300 and content_length is not None:
                self._connection_error("successful CONNECT response must not carry content-length")
            if (not state.body_forbidden and content_length is not None and
                    content_length > MAX_RESPONSE_SIZE):
                self.usable = False
                raise H2Error("declared response body exceeds configured limit")
            if end_stream:
                self._finish_response(state)
        else:
            _validate_response_field_section(headers, trailers=True)
            if not end_stream:
                self._connection_error("trailing field section did not end the stream")
            if _field_section_size(state.headers) + _field_section_size(headers) > MAX_HEADER_LIST_SIZE:
                self.usable = False
                raise H2Error("aggregate response headers exceed configured limit")
            state.trailers.extend(headers)
            state.headers.extend(headers)
            self._finish_response(state)

    def _process_header_frame(self, ftype, flags, sid, payload, states, continuation_sid):
        if continuation_sid is not None:
            if ftype != CONTINUATION or sid != continuation_sid:
                self._connection_error("frame interleaved inside a CONTINUATION sequence")
        elif ftype == CONTINUATION:
            self._connection_error("unexpected CONTINUATION frame")

        state = states.get(sid)
        if state is None:
            self._connection_error("header frame for an unknown stream")
        if state.complete:
            self._connection_error("header frame received after END_STREAM")

        if ftype == HEADERS:

View on GitHub (pinned to 0a35b20e39)