Skip to content

Commit

Permalink
check for incomplete HTTP header
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Apr 27, 2023
1 parent 76adac3 commit 0ce15ff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libi2pd_client/I2PTunnel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0ce15ff

Please sign in to comment.