Re: [PATCH v5 1/2] http-backend: respect CONTENT_LENGTH as specified by rfc3875

2017-11-26 Thread Max Kirillov
On Sun, Nov 26, 2017 at 06:38:06PM +0900, Junio C Hamano wrote: > Max Kirillov writes: >> +static ssize_t env_content_length() > > We need s/length()/length(void)/; though. thanks, fixed it

Re: [PATCH v5 1/2] http-backend: respect CONTENT_LENGTH as specified by rfc3875

2017-11-26 Thread Junio C Hamano
Max Kirillov writes: > I'm afraid I did not get the reasonsing and not fully the > desired change. Is this http-backend code change (compared > to the last patch) what you mean? Exactly. The fact that the parsed string happens to come from CONTENT_LENGTH environment variable

Re: [PATCH v5 1/2] http-backend: respect CONTENT_LENGTH as specified by rfc3875

2017-11-26 Thread Max Kirillov
On Sun, Nov 26, 2017 at 12:46:12PM +0900, Junio C Hamano wrote: > Max Kirillov writes: > > +ssize_t git_env_ssize_t(const char *k, ssize_t val) > > +{ > > + const char *v = getenv(k); > > + if (v && !git_parse_ssize_t(v, )) > > + die("failed to parse %s", k); > > +

Re: [PATCH v5 1/2] http-backend: respect CONTENT_LENGTH as specified by rfc3875

2017-11-25 Thread Junio C Hamano
Max Kirillov writes: > Author: Florian Manschwetus This should read "From: ..."; > Date: Wed, 30 Mar 2016 09:08:56 + > > http-backend reads whole input until EOF. However, the RFC 3875 specifies > that a script must read only as many bytes

[PATCH v5 1/2] http-backend: respect CONTENT_LENGTH as specified by rfc3875

2017-11-25 Thread Max Kirillov
Author: Florian Manschwetus Date: Wed, 30 Mar 2016 09:08:56 + http-backend reads whole input until EOF. However, the RFC 3875 specifies that a script must read only as many bytes as specified by CONTENT_LENGTH environment variable. Web server may exercise the