Skip to content

Commit adcdd6c

Browse files
committed
Prevent parsing the output code text as response header
1 parent 2e0bafd commit adcdd6c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/common/HTTPRequest.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include <sstream>
22
#include <string>
33
#include <memory>
4+
#include <limits>
45

56
#include "HTTPRequest.h"
67
#include "PlaintextConnection.h"
@@ -83,7 +84,7 @@ HTTPSClient::Reply HTTPRequest::request(const HTTPSClient::Request &req)
8384
return reply;
8485

8586
response >> reply.responseCode;
86-
response.ignore(1, '\n');
87+
response.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
8788

8889
for (std::string line; getline(response, line, '\n') && line != "\r"; )
8990
{

0 commit comments

Comments
 (0)