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 */