mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-25 12:14:41 +00:00
Fix build error on Windows
This commit is contained in:
1 parent
9248ce3bfe
commit
94b5038eb3
1 file changed
+4
@@ -8712,7 +8712,11 @@ TEST(ClientVulnerabilityTest, PayloadMaxLengthZeroMeansNoLimit) {
|
|||||||
total_sent += static_cast<size_t>(sent);
|
total_sent += static_cast<size_t>(sent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
::shutdown(cli, SD_SEND);
|
||||||
|
#else
|
||||||
::shutdown(cli, SHUT_WR);
|
::shutdown(cli, SHUT_WR);
|
||||||
|
#endif
|
||||||
// Drain until the client closes its end, ensuring all data is delivered
|
// Drain until the client closes its end, ensuring all data is delivered
|
||||||
char drain[1024];
|
char drain[1024];
|
||||||
while (::recv(cli, drain, sizeof(drain), 0) > 0) {}
|
while (::recv(cli, drain, sizeof(drain), 0) > 0) {}
|
||||||
|
|||||||
Reference in new issue
Block a user