Skip to content

Commit c920d28

Browse files
committed
Restore body size calculation and add comment
1 parent 5a4c634 commit c920d28

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

examples/ocsp_responder/ocsp_responder.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,8 +571,11 @@ static int ParseHttpRequest(const byte* httpReq, int httpReqSz,
571571
return -1;
572572
}
573573

574+
/* Use Content-Length if available, otherwise use remaining data */
574575
if (*bodySz == 0) {
575-
return -1;
576+
/* TODO We should only enter here when "Connection-close"
577+
* is present. There should be some checks to confirm that. */
578+
*bodySz = httpReqSz - offset;
576579
}
577580

578581
/* Ensure that the claimed body length fits in the received data */

0 commit comments

Comments
 (0)