1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 15:53:55 +00:00

1. Updated to use #define for maximum header size

2. Modified AsyncSocket_Disconnect, to shutdown SD_SEND/SHUT_RD, instead of RDWR/BOTH, because sent data could be lost if a reset was sent
3. Added hardening for http.server packet parsing
This commit is contained in:
Bryan Roe
2019-03-26 22:10:29 -07:00
parent 65ebe45873
commit ed18cb7944
4 changed files with 112 additions and 22 deletions

View File

@@ -795,11 +795,11 @@ void ILibAsyncSocket_Disconnect(ILibAsyncSocket_SocketModule socketModule)
{
#if defined(_WIN32_WCE) || defined(WIN32)
#if defined(WINSOCK2)
shutdown(s, SD_BOTH);
shutdown(s, SD_SEND);
#endif
closesocket(s);
#elif defined(_POSIX)
shutdown(s, SHUT_RDWR);
shutdown(s, SHUT_RD);
close(s);
#endif
}