Skip to main content

Module utils

Module utils 

Source
Expand description

Helper functions shared by the Git smart protocol handlers, including pkt-line parsing, pkt-line encoding, subsequence scans, and response builders that honor HTTP/SSH quirks.

Functionsยง

add_pkt_line_string
Add a packet line string to the buffer with proper length prefix
build_smart_reply
Build a smart reply packet line stream
read_pkt_line
Read a packet line from the given bytes buffer
read_until_white_space
Read until whitespace and return the extracted string
search_subsequence
Search for a subsequence in a byte slice