FS#118 - Add "Connection: close" by default for HTTP 1.1 requests

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1148 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2009-06-18 16:13:42 +00:00
parent e4042e8b4f
commit f04086c72b

View File

@ -390,6 +390,10 @@ Http::Response Http::SendRequest(const Http::Request& Req, float Timeout)
{
ToSend.SetField("Content-Type", "application/x-www-form-urlencoded");
}
if ((ToSend.myMajorVersion * 10 + ToSend.myMinorVersion >= 11) && !ToSend.HasField("Connection"))
{
ToSend.SetField("Connection", "close");
}
// Prepare the response
Response Received;