Send the Connection: close response header

so that proxy server don't try to reuse the connection. Given that
osrm-routed does *not* support keepalive the Connection: close response
header should be set.
This commit is contained in:
Mathias Gug 2016-01-25 15:03:37 -08:00
parent 502aedb33e
commit 40a3008318

View File

@ -103,7 +103,11 @@ boost::asio::const_buffer reply::status_to_buffer(const reply::status_type statu
return boost::asio::buffer(http_bad_request_string); return boost::asio::buffer(http_bad_request_string);
} }
reply::reply() : status(ok) {} reply::reply() : status(ok)
{
// We do not currently support keep alive. Always set 'Connection: close'.
headers.emplace_back("Connection", "close");
}
} }
} }
} }