aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-01-15 15:32:25 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-01-15 17:04:50 +0300
commitb5a7f1835fba33549baf4e9945f47de36b773571 (patch)
tree98a5a23b117e00d81d8a781323dafe641f4527f1
parent34a6a0254f3a343f4fdb5efa9633dd2b589bf929 (diff)
downloadlibmicrohttpd-b5a7f1835fba33549baf4e9945f47de36b773571.tar.gz
libmicrohttpd-b5a7f1835fba33549baf4e9945f47de36b773571.zip
test_upgrade: fail if connection is closed when it shouldn't
-rw-r--r--src/microhttpd/test_upgrade.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c
index 1e5430bc..81a36004 100644
--- a/src/microhttpd/test_upgrade.c
+++ b/src/microhttpd/test_upgrade.c
@@ -813,7 +813,7 @@ recv_hdr (struct wr_socket *sock)
813 externalErrorExitDesc ("recv() failed"); 813 externalErrorExitDesc ("recv() failed");
814 } 814 }
815 if (0 == ret) 815 if (0 == ret)
816 continue; /* TODO: replace with error exit! */ 816 mhdErrorExitDesc ("The server unexpectedly closed connection");
817 if (c == next) 817 if (c == next)
818 { 818 {
819 i++; 819 i++;
@@ -860,6 +860,8 @@ recv_all (struct wr_socket *sock,
860 } 860 }
861 externalErrorExitDesc ("recv() failed"); 861 externalErrorExitDesc ("recv() failed");
862 } 862 }
863 if (0 == ret)
864 mhdErrorExitDesc ("The server unexpectedly closed connection");
863 } 865 }
864 if (0 != strncmp (text, buf, len)) 866 if (0 != strncmp (text, buf, len))
865 { 867 {