From 6a5198d23412a6d11f78cdef71850e578ca6f8c0 Mon Sep 17 00:00:00 2001 From: "Felix (xq) Queißner" Date: Fri, 19 Jun 2020 10:37:20 +0200 Subject: Allows user to skip over invalid TLS connections and fetch the content anyways. --- src/protocolhandler.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/protocolhandler.hpp') diff --git a/src/protocolhandler.hpp b/src/protocolhandler.hpp index f93ef87..2fc60db 100644 --- a/src/protocolhandler.hpp +++ b/src/protocolhandler.hpp @@ -17,7 +17,7 @@ public: ConnectionRefused, //!< The host refused connection on that port ResourceNotFound, //!< The requested resource was not found on the server BadRequest, //!< Our client misbehaved and did a request the server cannot understand - ProxyRequest, //!< We requested to + ProxyRequest, //!< We requested a proxy operation, but the server does not allow that InternalServerError, InvalidClientCertificate, UntrustedHost, //!< We don't know the host, and we don't trust it @@ -26,12 +26,16 @@ public: TlsFailure, //!< Unspecified TLS failure Timeout, //!< The network connection timed out. }; + enum RequestOptions { + Default = 0, + IgnoreTlsErrors = 1, + }; public: explicit ProtocolHandler(QObject *parent = nullptr); virtual bool supportsScheme(QString const & scheme) const = 0; - virtual bool startRequest(QUrl const & url) = 0; + virtual bool startRequest(QUrl const & url, RequestOptions options) = 0; virtual bool isInProgress() const = 0; -- cgit v1.2.3