Commit

The early answer ends with a flush only; git's HTTP transport adds the response-end packet itself

2245712 ended a negotiating fetch's acknowledgments with a flush and a response-end packet. git's remote-curl writes its own response-end after each HTTP answer and refuses one from the server ("unexpected response end packet"). Checked against g1t.sh with a fetch whose only have the store does not know.

syntaqxcommitted Parent2245712Browse files
1 file+4−30/1 viewed
+4−3
772772 match acknowledged(&head) {
773773 Acknowledged::CutAt(at) => {
774774 head.truncate(at);
775− // A flush ends the acknowledgments; a response-end packet
776− // ends the stateless answer, as upload-pack's does.
777− head.extend_from_slice(b"00000002");
775+ // A flush ends the acknowledgments and the answer. No
776+ // response-end packet: git's HTTP transport adds its own
777+ // and refuses one from the server.
778+ head.extend_from_slice(b"0000");
778779 return Ok(Response::from_bytes(head)?.with_headers(headers));
779780 }
780781 Acknowledged::Whole => break,