Re: [PATCH v4] http-backend: allow empty CONTENT_LENGTH

2018-09-10 Thread Jeff King
On Mon, Sep 10, 2018 at 09:37:20AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > But that couldn't have been what older versions were doing, since they > > never looked at CONTENT_LENGTH at all, and instead always read to EOF. > > So presumably the original problem wasn't that we tried

Re: [PATCH v4] http-backend: allow empty CONTENT_LENGTH

2018-09-10 Thread Junio C Hamano
Jeff King writes: > But that couldn't have been what older versions were doing, since they > never looked at CONTENT_LENGTH at all, and instead always read to EOF. > So presumably the original problem wasn't that we tried to read a body, > but that the empty string caused git_parse_ssize_t to rep

Re: [PATCH v4] http-backend: allow empty CONTENT_LENGTH

2018-09-10 Thread Jeff King
On Sun, Sep 09, 2018 at 10:25:58PM -0700, Jonathan Nieder wrote: > > --- a/http-backend.c > > +++ b/http-backend.c > > @@ -353,8 +353,28 @@ static ssize_t get_content_length(void) > > ssize_t val = -1; > > const char *str = getenv("CONTENT_LENGTH"); > > > > - if (str && !git_parse_ssiz

Re: [PATCH v4] http-backend: allow empty CONTENT_LENGTH

2018-09-09 Thread Jonathan Nieder
Max Kirillov wrote: > Reported-By: Jelmer Vernooij > Authored-by: Jeff King > Signed-off-by: Max Kirillov Nit: for this kind of case of forwarding someone else's patch, we put a From field at the beginning of the body of the message. "git format-patch" can produce a message with that format if