Extra request with protocol v2 and git ls-remote

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A colleague (Jon Simons) today pointed out an interesting behavior of
git ls-remote with protocol v2: it makes a second POST request and sends
only a flush packet.  This can be demonstrated with the following:

  GIT_CURL_VERBOSE=1 git -c protocol.version=2 ls-remote origin

The Content-Length header on the second request will be exactly 4 bytes.

I'm not sure exactly how to fix this by looking at remote-curl.c, but I
suspect that we can avoid sending a request if all we're going to do is
send a flush packet.  If I were a bit more familiar with the code, I'd
send a patch, but I'm not.

I just thought I'd point this out since it was surprising to me.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux