Skip to content
Snippets Groups Projects
Commit 048c8d40 authored by Kenneth Langdahl Krogstad's avatar Kenneth Langdahl Krogstad :information_source:
Browse files

Update server_http.hpp

fixed issue #46
parent c0bfd99e
No related branches found
No related tags found
No related merge requests found
Pipeline #57313 failed
...@@ -740,6 +740,14 @@ namespace SimpleWeb { ...@@ -740,6 +740,14 @@ namespace SimpleWeb {
} }
} }
if(std::stof(response->session->request->http_version) >= 1.1) { if(std::stof(response->session->request->http_version) >= 1.1) {
float version;
try{
version = std::stof(response->session->request->http_version);
}catch(...){
std::cout<<"Cant parse version number, responding anyway";
version = 1.1;
}
if(version >= 1.1) {
auto new_session = std::make_shared<Session>(this->config.max_request_streambuf_size, response->session->connection); auto new_session = std::make_shared<Session>(this->config.max_request_streambuf_size, response->session->connection);
this->read(new_session); this->read(new_session);
return; return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment