From 81f12cb23028d82d9253390b43c3d02c639c1cd4 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 16 Oct 2020 13:54:29 +0200 Subject: [PATCH] [libcalamares] Do GeoIP lookups with a fake User-Agent --- src/libcalamares/geoip/Handler.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libcalamares/geoip/Handler.cpp b/src/libcalamares/geoip/Handler.cpp index d954b8fc0..648ea69f4 100644 --- a/src/libcalamares/geoip/Handler.cpp +++ b/src/libcalamares/geoip/Handler.cpp @@ -113,7 +113,9 @@ do_query( Handler::Type type, const QString& url, const QString& selector ) return RegionZonePair(); } - return interface->processReply( CalamaresUtils::Network::Manager::instance().synchronousGet( url ) ); + using namespace CalamaresUtils::Network; + return interface->processReply( + CalamaresUtils::Network::Manager::instance().synchronousGet( url, { RequestOptions::FakeUserAgent } ) ); } static QString @@ -125,7 +127,9 @@ do_raw_query( Handler::Type type, const QString& url, const QString& selector ) return QString(); } - return interface->rawReply( CalamaresUtils::Network::Manager::instance().synchronousGet( url ) ); + using namespace CalamaresUtils::Network; + return interface->rawReply( + CalamaresUtils::Network::Manager::instance().synchronousGet( url, { RequestOptions::FakeUserAgent } ) ); } RegionZonePair