1
0
mirror of https://github.com/arduino-libraries/ArduinoHttpClient.git synced 2025-04-19 21:22:15 +03:00

Added sending "Connection: close" header to fix hang when talking to some servers (first spotted with Xively's servers)

This commit is contained in:
Adrian McEwen 2013-11-24 21:39:54 +00:00
parent 53cc49f1c8
commit 522108f64e

View File

@ -195,6 +195,9 @@ int HttpClient::sendInitialHeaders(const char* aServerName, IPAddress aServerIP,
{ {
sendHeader(HTTP_HEADER_USER_AGENT, kUserAgent); sendHeader(HTTP_HEADER_USER_AGENT, kUserAgent);
} }
// We don't support persistent connections, so tell the server to
// close this connection after we're done
sendHeader(HTTP_HEADER_CONNECTION, "close");
// Everything has gone well // Everything has gone well
iState = eRequestStarted; iState = eRequestStarted;