string::substr comparisons replaced by string::compare
This commit is contained in:
parent
4a97949953
commit
14d848be3e
2 changed files with 2 additions and 2 deletions
|
|
@ -304,7 +304,7 @@ namespace SimpleWeb {
|
|||
|
||||
size_t protocol_end;
|
||||
if((protocol_end=line.find('/', path_end+1))!=std::string::npos) {
|
||||
if(line.substr(path_end+1, protocol_end-path_end-1)!="HTTP")
|
||||
if(line.compare(path_end+1, protocol_end-path_end-1, "HTTP")!=0)
|
||||
return false;
|
||||
request->http_version=line.substr(protocol_end+1, line.size()-protocol_end-2);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue