sqlmapproject/sqlmap · error · H2ProtocolError

non-CONNECT requests require a non-empty :path

Error message

non-CONNECT requests require a non-empty :path

What it means

Error "non-CONNECT requests require a non-empty :path" thrown in sqlmapproject/sqlmap.

Source

Thrown at lib/request/http2.py:761

        expected = len(body)
        if int(content_lengths[0]) != expected:
            raise H2ProtocolError("content-length does not match request body")
    return normalized


def _request_header_list(method, path, authority, headers, body):
    method = _as_bytes(method)
    authority = _as_bytes(authority)
    path = _as_bytes(path)
    _validate_method(method)
    if not authority:
        raise H2ProtocolError("authority is required")
    _validate_pseudo_value(":authority", authority)
    if method == b"CONNECT":
        request = [(b":method", method), (b":authority", authority)]
    else:
        if not path:
            raise H2ProtocolError("non-CONNECT requests require a non-empty :path")
        _validate_pseudo_value(":path", path)
        request = [(b":method", method), (b":scheme", b"https"), (b":path", path), (b":authority", authority)]
    request.extend(_normalize_request_headers(headers, body))
    return request


def _field_section_size(headers):
    return sum(32 + len(name) + len(value) for name, value in headers)


def _header_frames(stream_id, block, max_frame_size, end_stream):
    if max_frame_size < DEFAULT_MAX_FRAME_SIZE:
        raise H2ProtocolError("peer advertised an invalid maximum frame size")
    if not block:
        return [encode_frame(HEADERS, FLAG_END_HEADERS | (FLAG_END_STREAM if end_stream else 0), stream_id, b"")]
    frames = []
    pos = 0
    first = True

View on GitHub (pinned to 0a35b20e39)

When it happens

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