Skip to content
  • Jeff King's avatar
    remote-curl: tighten "version 2" check for smart-http · cbdb8d14
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    In a v2 smart-http conversation, the server should reply to our initial
    request with a pkt-line saying "version 2". We check that with
    starts_with(), but really that should be the only thing in that packet.
    A response of "version 20" should not match.
    
    Let's tighten this check to use strcmp(). Note that we don't need to
    worry about a trailing newline here, because the ptk-line code will have
    chomped it for us already.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    cbdb8d14