1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-12 06:07:54 +00:00

handle messages with \r\n

This commit is contained in:
orignal 2019-08-02 13:48:39 -04:00
parent a6558a61a7
commit db107602bd

View File

@ -239,6 +239,7 @@ namespace client
char * eol = (char *)memchr (m_Buffer, '\n', bytes_transferred); char * eol = (char *)memchr (m_Buffer, '\n', bytes_transferred);
if (eol) if (eol)
{ {
if (eol > m_Buffer && eol[-1] == '\r') eol--;
*eol = 0; *eol = 0;
char * separator = strchr (m_Buffer, ' '); char * separator = strchr (m_Buffer, ' ');
if (separator) if (separator)