On Mon, Sep 10, 2018 at 11:53:59PM +0300, Max Kirillov wrote: > From: Jeff King <peff@xxxxxxxx> > Subject: [PATCH] http-backend: Treat empty CONTENT_LENGTH as zero > > There is no known case where empty body it used by a server as > instruction to read until EOF, so there is no need to violate the RFC. > Make get_content_length() return 0 in this case. > > Currently there is no practical difference, as the GET request > where it can be empty is handled without actual reading the body > (in get_info_refs() function), but it is better to stick to the correct > behavior. There could be a difference if there is a server which actually sets CONTENT_LENGTH to the empty string for a chunked body. But we don't know of any such server at this point. > Signed-off-by: Max Kirillov <max@xxxxxxxxxx> > --- > The incremental. Hopefully I described the reason right. Needs "signed-off-by" Certainly this is: Signed-off-by: Jeff King <peff@xxxxxxxx> -Peff