summaryrefslogtreecommitdiff
path: root/path.c
diff options
context:
space:
mode:
authorFlorian Manschwetus <manschwetus@cs-software-gmbh.de>2016-03-30 10:54:21 +0200
committerJunio C Hamano <gitster@pobox.com>2017-11-27 13:05:50 +0900
commit21302effbfeeb440e594e4f64371f3b6ec2d2b91 (patch)
treeb0c92a48a3e53b9b54484dc0f70057242482d455 /path.c
parent7bc77766e127d94afe67a3fd900105514b6659dd (diff)
downloadgit-21302effbfeeb440e594e4f64371f3b6ec2d2b91.tar.gz
http-backend: respect CONTENT_LENGTH as specified by rfc3875
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 specification by not closing the script's standard input after writing content. In that case http-backend would hang waiting for the input. The issue is known to happen with IIS/Windows, for example. Make http-backend read only CONTENT_LENGTH bytes, if it's defined, rather than the whole input until EOF. If the variable is not defined, keep older behavior of reading until EOF because it is used to support chunked transfer-encoding. Signed-off-by: Florian Manschwetus <manschwetus@cs-software-gmbh.de> [mk: fixed trivial build failures and polished style issues] Signed-off-by: Max Kirillov <max@max630.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'path.c')
0 files changed, 0 insertions, 0 deletions