libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit b5a7f1835fba33549baf4e9945f47de36b773571
parent 34a6a0254f3a343f4fdb5efa9633dd2b589bf929
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Sat, 15 Jan 2022 15:32:25 +0300

test_upgrade: fail if connection is closed when it shouldn't

Diffstat:
Msrc/microhttpd/test_upgrade.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c @@ -813,7 +813,7 @@ recv_hdr (struct wr_socket *sock) externalErrorExitDesc ("recv() failed"); } if (0 == ret) - continue; /* TODO: replace with error exit! */ + mhdErrorExitDesc ("The server unexpectedly closed connection"); if (c == next) { i++; @@ -860,6 +860,8 @@ recv_all (struct wr_socket *sock, } externalErrorExitDesc ("recv() failed"); } + if (0 == ret) + mhdErrorExitDesc ("The server unexpectedly closed connection"); } if (0 != strncmp (text, buf, len)) {