Skip to content

Commit

Permalink
Added sending "Connection: close" header to fix hang when talking to …
Browse files Browse the repository at this point in the history
…some servers (first spotted with Xively's servers)
  • Loading branch information
Adrian McEwen committed Nov 24, 2013
1 parent 53cc49f commit 522108f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions HttpClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ int HttpClient::sendInitialHeaders(const char* aServerName, IPAddress aServerIP,
{
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
iState = eRequestStarted;
Expand Down

0 comments on commit 522108f

Please sign in to comment.