From 8dd403a098e8c4fec7effd46adb4b89688fa13a6 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Thu, 7 Nov 2019 13:40:35 +0100 Subject: [PATCH] Added ability to check if the downloader is being proxied or not --- lib/downloader.cpp | 2 ++ lib/downloader.h | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/downloader.cpp b/lib/downloader.cpp index d6836c3e..32b2a4b3 100644 --- a/lib/downloader.cpp +++ b/lib/downloader.cpp @@ -20,6 +20,8 @@ namespace HTTP{ } } + bool Downloader::isProxied() const{return proxied;} + /// Returns a reference to the internal HTTP::Parser body element std::string &Downloader::data(){return H.body;} diff --git a/lib/downloader.h b/lib/downloader.h index c9a5e683..562497ad 100644 --- a/lib/downloader.h +++ b/lib/downloader.h @@ -29,6 +29,7 @@ namespace HTTP{ Parser &getHTTP(); Socket::Connection &getSocket(); uint32_t retryCount, dataTimeout; + bool isProxied() const; private: std::map extraHeaders; ///< Holds extra headers to sent with request