Re: [PATCH 3/8] daemon: recognize hidden request arguments
- From
- Brandon Williams <bmwill@google.com>
- Date
- Sep 21, 2017, 21:55 UTC
- Message-ID
- <20170921215555.GA77641@google.com>
- In-Reply-To
- <20170920173120.2731e761@twelve2.svl.corp.google.com>
On 09/20, Jonathan Tan wrote:
Show 27 quoted lines
> On Wed, 20 Sep 2017 17:24:43 -0700 > Jonathan Tan <jonathantanmy@google.com> wrote: > > > On Wed, 13 Sep 2017 14:54:43 -0700 > > Brandon Williams <bmwill@google.com> wrote: > > > > > A normal request to git-daemon is structured as > > > "command path/to/repo\0host=..\0" and due to a bug in an old version of > > > git-daemon 73bb33a94 (daemon: Strictly parse the "extra arg" part of the > > > command, 2009-06-04) we aren't able to place any extra args (separated > > > by NULs) besides the host. > > > > > > In order to get around this limitation teach git-daemon to recognize > > > additional request arguments hidden behind a second NUL byte. Requests > > > can then be structured like: > > > "command path/to/repo\0host=..\0\0version=1\0key=value\0". git-daemon > > > can then parse out the extra arguments and set 'GIT_PROTOCOL' > > > accordingly. > > > > A test in this patch (if possible) would be nice, but it is probably > > clearer to test this when one of the commands (e.g. upload-pack) is > > done. Could a test be added to the next patch to verify (using > > GIT_TRACE_PACKET, maybe) that the expected strings are sent? Then > > mention in this commit message that this will be tested in the next > > patch too. > > Ah, I see that it is tested in 6/8. You can ignore this comment.
Yeah I felt it would have been difficult to test any earlier without both the client and server sides done.
-- Brandon Williams