[PATCH v2] http-backend: allow empty CONTENT_LENGTH

2018-09-07 Thread Max Kirillov
Before 817f7dc223, CONTENT_LENGTH variable was never considered, http-backend was just reading request body from standard input until EOF when it, or a command started by it, needed it. Then it was discovered that some HTTP do not close standard input, instead expecting CGI scripts to obey

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

2018-09-07 Thread Jonathan Nieder
Hi, Max Kirillov wrote: > According to RFC3875, empty environment variable is equivalent to unset, > and for CONTENT_LENGTH it should mean zero body to read. > > However, unset CONTENT_LENGTH is also used for chunked encoding to indicate > reading until EOF. At least, the test "large fetch-pack

[PATCH v2] http-backend: allow empty CONTENT_LENGTH

2018-09-06 Thread Max Kirillov
According to RFC3875, empty environment variable is equivalent to unset, and for CONTENT_LENGTH it should mean zero body to read. However, unset CONTENT_LENGTH is also used for chunked encoding to indicate reading until EOF. At least, the test "large fetch-pack requests can be split across POSTs"