git/serve: add a '\n' after HEAD

Per the docs:

	the sender SHOULD include a LF, but the
	receiver MUST NOT complain if it is not
	present.

I typoed away the SHOULD, and got missed the
MUST NOT.

thanks qbit.
This commit is contained in:
Ori Bernstein 2021-08-25 22:15:34 +00:00
parent 9ca6ca345f
commit 0741147eab

View file

@ -34,7 +34,7 @@ showrefs(Conn *c)
refs = nil;
names = nil;
if(resolveref(&head, "HEAD") != -1)
if(fmtpkt(c, "%H HEAD", head) == -1)
if(fmtpkt(c, "%H HEAD\n", head) == -1)
goto error;
if((nrefs = listrefs(&refs, &names)) == -1)