diff options
author | Denton Liu <liu.denton@gmail.com> | 2020-05-19 13:53:58 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-25 02:26:00 +0300 |
commit | 74b082ad34fe2c727c676dac5c33d5e1e5f5ca56 (patch) | |
tree | 22b53bf2d7dae28186452dfba44f5866d81f3b4e /t/lib-httpd.sh | |
parent | 101736a14c9ad734fe24efed7513189849cd22eb (diff) |
remote-curl: error on incomplete packet
Currently, remote-curl acts as a proxy and blindly forwards packets
between an HTTP server and fetch-pack. In the case of a stateless RPC
connection where the connection is terminated with a partially written
packet, remote-curl will blindly send the partially written packet
before waiting on more input from fetch-pack. Meanwhile, fetch-pack will
read the partial packet and continue reading, expecting more input. This
results in a deadlock between the two processes.
For a stateless connection, inspect packets before sending them and
error out if a packet line packet is incomplete.
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-httpd.sh')
-rw-r--r-- | t/lib-httpd.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh index 1449ee95e9..d2edfa4c50 100644 --- a/t/lib-httpd.sh +++ b/t/lib-httpd.sh @@ -129,6 +129,8 @@ install_script () { prepare_httpd() { mkdir -p "$HTTPD_DOCUMENT_ROOT_PATH" cp "$TEST_PATH"/passwd "$HTTPD_ROOT_PATH" + install_script incomplete-length-upload-pack-v2-http.sh + install_script incomplete-body-upload-pack-v2-http.sh install_script broken-smart-http.sh install_script error-smart-http.sh install_script error.sh |