Re: [PATCH 1/3] remote-curl: refactor smart-http discovery

2019-02-06 Thread Junio C Hamano
Jeff King writes: > Yep. Here it is. > > Rather than a range-diff, which is quite large due to the code movement, > I'll include below the interesting hunk of a diff between the two > endpoints (i.e., what we would have seen applying the packet-err-check > changes on top of my code movement, whic

Re: [PATCH 1/3] remote-curl: refactor smart-http discovery

2019-02-06 Thread Jeff King
On Wed, Feb 06, 2019 at 11:29:03AM -0800, Josh Steadmon wrote: > > + packet_reader_init(&reader, -1, d->buf, d->len, > > + PACKET_READ_CHOMP_NEWLINE | > > + PACKET_READ_DIE_ON_ERR_PACKET); > > + if (packet_reader_read(&reader) != PACKET_READ_NORMAL) >

Re: [PATCH 1/3] remote-curl: refactor smart-http discovery

2019-02-06 Thread Junio C Hamano
Josh Steadmon writes: >> +packet_reader_init(&reader, -1, d->buf, d->len, >> + PACKET_READ_CHOMP_NEWLINE | >> + PACKET_READ_DIE_ON_ERR_PACKET); >> +if (packet_reader_read(&reader) != PACKET_READ_NORMAL) >> +die("invalid server respon

Re: [PATCH 1/3] remote-curl: refactor smart-http discovery

2019-02-06 Thread Josh Steadmon
On 2019.02.06 14:18, Jeff King wrote: > After making initial contact with an http server, we have to decide if > the server supports smart-http, and if so, which version. Our rules are > a bit inconsistent: > > 1. For v0, we require that the content-type indicates a smart-http > response. W

[PATCH 1/3] remote-curl: refactor smart-http discovery

2019-02-06 Thread Jeff King
After making initial contact with an http server, we have to decide if the server supports smart-http, and if so, which version. Our rules are a bit inconsistent: 1. For v0, we require that the content-type indicates a smart-http response. We also require the response to look vaguely like a

Re: [PATCH 1/3] remote-curl: refactor smart-http discovery

2019-02-06 Thread Jeff King
On Tue, Feb 05, 2019 at 03:29:18PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > After making initial contact with an http server, we have to decide if > > the server supports smart-http, and if so, which version. Our rules are > > a bit inconsistent: > > ... > > > > - we now predicate

Re: [PATCH 1/3] remote-curl: refactor smart-http discovery

2019-02-05 Thread Junio C Hamano
Jeff King writes: > After making initial contact with an http server, we have to decide if > the server supports smart-http, and if so, which version. Our rules are > a bit inconsistent: > ... > > - we now predicate the smart/dumb decision entirely on the presence of >the correct content-typ

Re: [PATCH 1/3] remote-curl: refactor smart-http discovery

2018-11-16 Thread Josh Steadmon
On 2018.11.16 03:47, Jeff King wrote: > After making initial contact with an http server, we have to decide if > the server supports smart-http, and if so, which version. Our rules are > a bit inconsistent: > > 1. For v0, we require that the content-type indicates a smart-http > response. W

[PATCH 1/3] remote-curl: refactor smart-http discovery

2018-11-16 Thread Jeff King
After making initial contact with an http server, we have to decide if the server supports smart-http, and if so, which version. Our rules are a bit inconsistent: 1. For v0, we require that the content-type indicates a smart-http response. We also require the response to look vaguely like a