Skip to content
  • Denton Liu's avatar
    remote-curl: error on incomplete packet · 74b082ad
    Denton Liu authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    Currently, remote-curl acts as a proxy and blindly forwards packets
    between an HTTP server and fetch-pack. In the case of a stateless RPC
    connection where the connection is terminated with a partially written
    packet, remote-curl will blindly send the partially written packet
    before waiting on more input from fetch-pack. Meanwhile, fetch-pack will
    read the partial packet and continue reading, expecting more input. This
    results in a deadlock between the two processes.
    
    For a stateless connection, inspect packets before sending them and
    error out if a packet line packet is incomplete.
    
    Helped-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarDenton Liu <liu.denton@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    74b082ad