Fixed request parse issues on Windows

Tests on Windows now passing.

For some reason, std::string::find was not returning std::string::npos despite not finding anything on MinGW.
This commit is contained in:
Fred Nicolson 2017-08-23 11:50:57 +01:00
parent 5e5117ff3f
commit 5c2b6c3a8d

View File

@ -186,7 +186,7 @@ namespace fr
{
unsigned long and_pos;
and_pos = str.find('&', read_index);
if(and_pos == std::string::npos)
if(and_pos >= str.size())
{
size_t str_size = str.size();
while(str[str_size - 1] == '\n' || str[str_size - 1] == '\r')