Hello,
I am trying to implement an HTTPS server using the POCO libraries. I have written an example based on the HTTPTimeServer example that comes with the POCO source code.
I am using POCO 1.4.3p1 (complete edition), including compiled on a Windows 7 machine using Visual Studio 2008. I also set up OpenSSL.
Basically, in my example, SSL is initialized, a SecureServerSocket is instantiated on port 10444 and an HTTPServer is started using the SecureServerSocket.
I use keep alive with a keep alive timeout set to 5 seconds.
The example is attached as a zip file containing c++ code.
The problem I have is the following:
- I use Firefox 14.0.1 to connect to https://localhost:10444;
- the server responds correctly to the first request;
- as soon as the keep alive timeout elapses the server stops responding (the error message given by Firefox is: "The connection to the server was reset while the page was loading") and it is impossible to connect to the server again.
Browsing the source code of the HTTPServerConnection::run method in debug mode, I could see that after the keep alive timeout elapses the application is no longer able to initialize a HTTPServerRequestImpl object (see call to HTTPServerRequestImpl request(response, session, _pParams);) and an exception is thrown with an error code of HTTPResponse::HTTP_BAD_REQUEST.
What am I doing wrong?
Thanks in advance for the support.
Francesco.





