Skip to main content

handle_v2_request

Function handle_v2_request 

Source
pub fn handle_v2_request(
    repo: &Repository,
    body: &[u8],
    stateless: bool,
) -> Result<Vec<u8>, ServerError>
Expand description

Handle a v2 command request body (after capability advertisement).

HTTP (stateless): append response-end-pkt after fetch only. Stock Git ls-refs over HTTP (2.39+) errors on response-end immediately after the listing flush (unexpected response end packet); Content-Length close is enough for that RPC. Cite: gitprotocol-v2 Packet-Line Framing.