From 5c2b6c3a8d2e98991291ca772cf64b1194b5d45a Mon Sep 17 00:00:00 2001 From: Fred Nicolson Date: Wed, 23 Aug 2017 11:50:57 +0100 Subject: [PATCH] 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. --- src/Http.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http.cpp b/src/Http.cpp index e53a342..14e14fb 100644 --- a/src/Http.cpp +++ b/src/Http.cpp @@ -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')