mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-09-30 20:52:31 +07:00
Fix problem with PayloadMaxLengthZeroMeansNoLimit
This commit is contained in:
@@ -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