mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-29 21:30:04 +01:00
added HTTPServerRequest::secure() method
This commit is contained in:
parent
3baf590485
commit
5b80826437
@ -71,6 +71,12 @@ public:
|
||||
|
||||
virtual HTTPServerResponse& response() const = 0;
|
||||
/// Returns a reference to the associated response.
|
||||
|
||||
virtual bool secure() const = 0;
|
||||
/// Returns true if the request is using a secure
|
||||
/// connection. Returns false if no secure connection
|
||||
/// is used, or if it is not known whether a secure
|
||||
/// connection is used.
|
||||
};
|
||||
|
||||
|
||||
|
@ -75,6 +75,12 @@ public:
|
||||
HTTPServerResponse& response() const;
|
||||
/// Returns a reference to the associated response.
|
||||
|
||||
bool secure() const;
|
||||
/// Returns true if the request is using a secure
|
||||
/// connection. Returns false if no secure connection
|
||||
/// is used, or if it is not known whether a secure
|
||||
/// connection is used.
|
||||
|
||||
StreamSocket& socket();
|
||||
/// Returns a reference to the underlying socket.
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "Poco/Net/HTTPFixedLengthStream.h"
|
||||
#include "Poco/Net/HTTPChunkedStream.h"
|
||||
#include "Poco/Net/HTTPServerParams.h"
|
||||
#include "Poco/Net/StreamSocket.h"
|
||||
#include "Poco/String.h"
|
||||
|
||||
|
||||
@ -71,6 +72,12 @@ HTTPServerRequestImpl::~HTTPServerRequestImpl()
|
||||
}
|
||||
|
||||
|
||||
bool HTTPServerRequestImpl::secure() const
|
||||
{
|
||||
return _session.socket().secure();
|
||||
}
|
||||
|
||||
|
||||
StreamSocket& HTTPServerRequestImpl::socket()
|
||||
{
|
||||
return _session.socket();
|
||||
|
Loading…
x
Reference in New Issue
Block a user