Browse Source

check for incomplete HTTP header

pull/1919/head
orignal 2 years ago
parent
commit
0ce15ffc91
  1. 6
      libi2pd_client/I2PTunnel.cpp

6
libi2pd_client/I2PTunnel.cpp

@ -397,7 +397,8 @@ namespace client @@ -397,7 +397,8 @@ namespace client
while (!endOfHeader)
{
std::getline(m_InHeader, line);
if (!m_InHeader.fail ())
if (m_InHeader.fail ()) break;
if (!m_InHeader.eof ())
{
if (line == "\r") endOfHeader = true;
else
@ -485,7 +486,8 @@ namespace client @@ -485,7 +486,8 @@ namespace client
while (!endOfHeader)
{
std::getline(m_InHeader, line);
if (!m_InHeader.fail ())
if (m_InHeader.fail ()) break;
if (!m_InHeader.eof ())
{
if (line == "\r") endOfHeader = true;
else

Loading…
Cancel
Save