Skip to content
Snippets Groups Projects

Issue #23: Fixed error with HTTP Version number

1 file
+ 11
4
Compare changes
  • Side-by-side
  • Inline
+ 11
4
@@ -762,10 +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(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(const std::out_of_range& oor) {
std::cout << "HTTP Version number out of range" << oor.what() << std::endl;
} catch(const std::invalid_argument& ia) {
std::cout << "HTTP Version number invalid argument" << ia.what() << std::endl;
}
}
else if(this->on_error)
Loading