mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-19 11:19:36 +00:00
Fix problem with PayloadMaxLengthZeroMeansNoLimit
This commit is contained in:
1 parent
4639b696ab
commit
9248ce3bfe
1 file changed
+4
@@ -8712,6 +8712,10 @@ TEST(ClientVulnerabilityTest, PayloadMaxLengthZeroMeansNoLimit) {
|
|||||||
total_sent += static_cast<size_t>(sent);
|
total_sent += static_cast<size_t>(sent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::shutdown(cli, SHUT_WR);
|
||||||
|
// Drain until the client closes its end, ensuring all data is delivered
|
||||||
|
char drain[1024];
|
||||||
|
while (::recv(cli, drain, sizeof(drain), 0) > 0) {}
|
||||||
detail::close_socket(cli);
|
detail::close_socket(cli);
|
||||||
}
|
}
|
||||||
detail::close_socket(srv);
|
detail::close_socket(srv);
|
||||||
|
|||||||
Reference in new issue
Block a user