Client: added support for non-standard line endings in response status and header

This commit is contained in:
eidheim 2019-06-24 19:47:33 +02:00
commit d9d554b1b5
3 changed files with 77 additions and 2 deletions

View file

@ -283,7 +283,7 @@ namespace SimpleWeb {
else
return false;
if((version_end + 1) < line.size())
status_code = line.substr(version_end + 1, line.size() - (version_end + 1) - 1);
status_code = line.substr(version_end + 1, line.size() - (version_end + 1) - (line.back() == '\r' ? 1 : 0));
else
return false;