I have a c++ application that connects to a http server on localhost. The application is running on windows 10. I used to use poco 1.7.8p3 to manage the connection. The library was built with the Visual Studio 15 using the buildwin script shipped with the source and everything has been working fine.
I decided to upgrade poco to version 1.10.1. This time I built the library using CMake.
The code that used to work with version 1.7.8p3 does no longer work with poco 1.10.1. When sending a HTTPRequest from a HTTPClientSession, I get a Poco::TimeoutException. The server never receives the request. Any help solving this problem would be appreciated. Sample code follows below.
HTTPClientSession session
session.setKeepAlive(false);
session.setTimeout(Poco::Timespan(0, 0, 0, 5, 0));
int port = 62300;
session.setPort(port);
session.setHost("localhost");
const std::string uri = "/get_server_config";
HTTPRequest request(HTTPRequest::HTTP_GET, uri, HTTPMessage::HTTP_1_1);
//Generates Poco::TimeoutException
session.sendRequest(request);
auto &sock = session.socket();
const Poco::Timespan ts(10L, 1L);
sock.setReceiveTimeout(ts);