ssl & unclean shutdown response

This commit is contained in:
Henrique Magarotto
2013-01-15 17:58:10 -02:00
parent 9619dfbe7b
commit f269e1ca23
5 changed files with 68 additions and 0 deletions

View File

@@ -38,6 +38,7 @@
#include "Poco/Net/SecureStreamSocket.h"
#include "Poco/Net/SecureStreamSocketImpl.h"
#include "Poco/Net/SSLManager.h"
#include "Poco/Net/SSLException.h"
#include "Poco/Net/HTTPRequest.h"
#include "Poco/Net/HTTPResponse.h"
#include "Poco/Net/NetException.h"
@@ -190,6 +191,15 @@ void HTTPSClientSession::connect(const SocketAddress& address)
}
int HTTPSClientSession::read(char* buffer, std::streamsize length) {
try {
return HTTPClientSession::read(buffer, length);
} catch(SSLConnectionUnexpectedlyClosedException&) {
return 0;
}
}
Session::Ptr HTTPSClientSession::sslSession()
{
return _pSession;