Added support for request header Connection: keep-alive (see #123)
This commit is contained in:
parent
a859c42b41
commit
cfafbcbc7d
1 changed files with 5 additions and 1 deletions
|
|
@ -395,8 +395,12 @@ namespace SimpleWeb {
|
|||
|
||||
auto range=request->header.equal_range("Connection");
|
||||
for(auto it=range.first;it!=range.second;it++) {
|
||||
if(boost::iequals(it->second, "close"))
|
||||
if(boost::iequals(it->second, "close")) {
|
||||
return;
|
||||
} else if (boost::iequals(it->second, "keep-alive")) {
|
||||
this->read_request_and_content(response->socket);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(request->http_version >= "1.1")
|
||||
this->read_request_and_content(response->socket);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue