From c920d2882c4dc15fc83dce67251ea0e161b14a70 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Wed, 11 Mar 2026 12:46:22 +0100 Subject: [PATCH] Restore body size calculation and add comment --- examples/ocsp_responder/ocsp_responder.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/ocsp_responder/ocsp_responder.c b/examples/ocsp_responder/ocsp_responder.c index 9df12be763..ee9cb3c62d 100644 --- a/examples/ocsp_responder/ocsp_responder.c +++ b/examples/ocsp_responder/ocsp_responder.c @@ -571,8 +571,11 @@ static int ParseHttpRequest(const byte* httpReq, int httpReqSz, return -1; } + /* Use Content-Length if available, otherwise use remaining data */ if (*bodySz == 0) { - return -1; + /* TODO We should only enter here when "Connection-close" + * is present. There should be some checks to confirm that. */ + *bodySz = httpReqSz - offset; } /* Ensure that the claimed body length fits in the received data */