Skip to content
Snippets Groups Projects

Master

Open Eirik Plahte requested to merge eirikpl/buggy-web-server:master into master
2 files
+ 849
5
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 11
5
@@ -762,11 +762,17 @@ namespace SimpleWeb {
return;
}
}
if(std::stof(response->session->request->http_version) >= 1.1) {
auto new_session = std::make_shared<Session>(this->config.max_request_streambuf_size, response->session->connection);
this->read(new_session);
return;
}
try{
if((response->session->request->http_version).find_first_not_of("0123456789.") == std::string::npos && std::stof(response->session->request->http_version) < std::numeric_limits<float>::max() && std::stof(response->session->request->http_version) > std::numeric_limits<float>::min()){
if(std::stof(response->session->request->http_version) >= 1.1) {
auto new_session = std::make_shared<Session>(this->config.max_request_streambuf_size, response->session->connection);
this->read(new_session);
return;
}
}
}catch(...){
return;
}
}
else if(this->on_error)
this->on_error(response->session->request, ec);
Loading