It's been time. Thank you for parience. Changes: * did most of the changes proposed * rebase to newer master (latest conflicting change is addition of combined test helper) * make tests which cover, hopefully, all cases. * handle incorectly truncated input also in receive-pack. Considering the complications pointed out by Jeff, it just filters the input in the frontend process. I hope it is acceptable thing to do. Max Kirillov (2): http-backend: respect CONTENT_LENGTH as specified by rfc3875 http-backend: respect CONTENT_LENGTH for receive-pack Makefile | 1 + config.c | 2 +- config.h | 1 + http-backend.c | 86 +++++++++++-- t/helper/test-print-larger-than-ssize.c | 11 ++ t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/t5560-http-backend-noserver.sh | 13 ++ t/t5562-http-backend-content-length.sh | 155 ++++++++++++++++++++++++ t/t5562/invoke-with-content-length.pl | 30 +++++ 10 files changed, 291 insertions(+), 10 deletions(-) create mode 100644 t/helper/test-print-larger-than-ssize.c create mode 100755 t/t5562-http-backend-content-length.sh create mode 100755 t/t5562/invoke-with-content-length.pl -- 2.17.0.1185.g782057d875