summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2018-03-03 00:27:08 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-03-05 11:05:19 -0800
commit0aa7a780995d3bbef4524a2cdc2e5d33cca56fa9 (patch)
tree9e2002320076099f277f292b1e2b5d2a76d47dcd
parentMerge branch 'ys/bisect-object-id-missing-conversion-fix' into maint (diff)
downloadtgif-0aa7a780995d3bbef4524a2cdc2e5d33cca56fa9.tar.xz
smart-http: document flush after "# service" line
The http-protocol.txt spec fails to mention that a flush packet comes in the smart server response after sending the "service" header. Technically the client code is actually ready to receive an arbitrary number of headers here, but since we haven't introduced any other headers in the past decade (and the client would just throw them away), let's not mention it in the spec. This fixes both BNF and the example. While we're fixing the latter, let's also add the missing flush after the ref list. Reported-by: Dorian Taylor <dorian.taylor.lists@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--Documentation/technical/http-protocol.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/technical/http-protocol.txt b/Documentation/technical/http-protocol.txt
index a0e45f2889..64f49d0bbb 100644
--- a/Documentation/technical/http-protocol.txt
+++ b/Documentation/technical/http-protocol.txt
@@ -214,10 +214,12 @@ smart server reply:
S: Cache-Control: no-cache
S:
S: 001e# service=git-upload-pack\n
+ S: 0000
S: 004895dcfa3633004da0049d3d0fa03f80589cbcaf31 refs/heads/maint\0multi_ack\n
S: 0042d049f6c27a2244e12041955e262a404c7faba355 refs/heads/master\n
S: 003c2cb58b79488a98d2721cea644875a8dd0026b115 refs/tags/v1.0\n
S: 003fa3c2e2402b99163d1d59756e5f207ae21cccba4c refs/tags/v1.0^{}\n
+ S: 0000
The client may send Extra Parameters (see
Documentation/technical/pack-protocol.txt) as a colon-separated string
@@ -277,6 +279,7 @@ The returned response contains "version 1" if "version=1" was sent as an
Extra Parameter.
smart_reply = PKT-LINE("# service=$servicename" LF)
+ "0000"
*1("version 1")
ref_list
"0000"