From: Jeff King <peff@peff.net>
To: Dorian Taylor <dorian.taylor.lists@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
Jonathan Nieder <jrnieder@gmail.com>,
git@vger.kernel.org, Brandon Williams <bmwill@google.com>
Subject: [PATCH] smart-http: document flush after "# service" line
Date: Sat, 3 Mar 2018 00:27:08 -0500 [thread overview]
Message-ID: <20180303052708.GF27689@sigill.intra.peff.net> (raw)
In-Reply-To: <01B07AA7-B2A4-4A81-B1F0-E2EC3D6BFBF9@gmail.com>
On Thu, Feb 22, 2018 at 12:12:54PM -0800, Dorian Taylor wrote:
> This patch exists because I was asked to write it. I don’t know squat
> about this protocol other than the fact that I followed the spec and
> it didn’t work. I traced a known-good protocol endpoint and found it
> contained content that didn’t agree with the spec. I then obliged the
> request to submit a patch with *what I knew to be true* about the
> sample that actually worked. I then followed the recommendations
> *advertised on GitHub* for submitting the patch.
I take it that a revised patch is not forthcoming, then. :-/
Let's wrap up this topic with this, then, which adds a commit message
and fixes the flush/version-1 ordering issue.
-- >8 --
Subject: 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 any
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>
---
Documentation/technical/http-protocol.txt | 3 +++
1 file changed, 3 insertions(+)
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"
--
2.16.2.708.g0b2ed7f536
next prev parent reply other threads:[~2018-03-03 5:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 18:29 bug in HTTP protocol spec Dorian Taylor
2018-02-21 22:15 ` Jeff King
2018-02-21 23:50 ` Dorian Taylor
2018-02-22 5:37 ` Jonathan Nieder
2018-02-22 7:23 ` Dorian Taylor
2018-02-22 10:08 ` Jeff King
2018-02-22 16:16 ` Dorian Taylor
2018-02-22 20:02 ` Junio C Hamano
2018-02-22 20:12 ` Dorian Taylor
2018-03-03 5:27 ` Jeff King [this message]
2018-03-03 8:28 ` [PATCH] smart-http: document flush after "# service" line Eric Sunshine
2018-03-03 10:02 ` Jeff King
2018-02-22 17:52 ` bug in HTTP protocol spec Brandon Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180303052708.GF27689@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=bmwill@google.com \
--cc=dorian.taylor.lists@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).