mirror of
https://github.com/SFML/SFML.git
synced 2024-11-24 20:31:05 +08:00
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");
|
||||
}
|
||||
if ((ToSend.myMajorVersion * 10 + ToSend.myMinorVersion >= 11) && !ToSend.HasField("Connection"))
|
||||
{
|
||||
ToSend.SetField("Connection", "close");
|
||||
}
|
||||
|
||||
// Prepare the response
|
||||
Response Received;
|
||||
|
Loading…
Reference in New Issue
Block a user