16#include <zypp-core/fs/PathInfo.h>
17#include <zypp/base/Logger.h>
18#include <zypp-core/base/Regex.h>
28 if ( !
conf.geoipEnabled() ) {
29 MIL <<
"GeoIp rewrites disabled via ZConfig." << std::endl;
34 MIL <<
"GeoIp rewrites disabled since the baseurl " <<
url <<
" uses an explicit country setting." << std::endl;
42 MIL <<
"Found GeoIP file for host: " << hostname << std::endl;
46 MIL <<
"Failed to open GeoIP for host: " << hostname << std::endl;
57 MIL <<
"Found GeoIP rewrite: " << hostname <<
" -> " <<
newHost << std::endl;
63 MIL <<
"No valid GeoIP rewrite target found for " <<
url << std::endl;
68 MIL <<
"Failed to query GeoIP data, url rewriting disabled." << std::endl;
83 MIL <<
"Redirecting " <<
filename_r <<
" request to geoip location." << std::endl;
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Base class for Exception.
std::string getQueryParam(const std::string ¶m, EEncoding eflag=zypp::url::E_DECODED) const
Return the value for the specified query parameter.
std::string getHost(EEncoding eflag=zypp::url::E_DECODED) const
Returns the hostname or IP from the URL authority.
void setHost(const std::string &host)
Set the hostname or IP in the URL authority.
bool isValid() const
Verifies the Url.
static ZConfig & instance()
Singleton ctor.
Wrapper class for stat/lstat.
#define ZYPP_CAUGHT(EXCPT)
Drops a logline telling the Exception was caught (in order to handle it).