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:
parent
e4042e8b4f
commit
f04086c72b
@ -390,6 +390,10 @@ Http::Response Http::SendRequest(const Http::Request& Req, float Timeout)
|
|||||||
{
|
{
|
||||||
ToSend.SetField("Content-Type", "application/x-www-form-urlencoded");
|
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
|
// Prepare the response
|
||||||
Response Received;
|
Response Received;
|
||||||
|
Loading…
Reference in New Issue
Block a user