12#ifndef ZYPP_CURL_PROXYINFO_PROXYINFOIMPL_H_INCLUDED
13#define ZYPP_CURL_PROXYINFO_PROXYINFOIMPL_H_INCLUDED
18#include <zypp-core/Url.h>
19#include <zypp-core/base/String.h>
20#include <zypp-curl/ProxyInfo>
39 virtual std::string
proxy(
const Url & url_r)
const = 0;
54 if ( noproxy.size() == 1 && noproxy.front() ==
"*" )
62 for_( it, noproxy.begin(), noproxy.end() )
64 std::string pattern(
str::toLower( (*it)[0] ==
'.' ? it->c_str() + 1 : it->c_str() ) );
66 && ( host.size() == pattern.size()
67 || host[host.size()-pattern.size()-1] ==
'.' ) )
std::string getHost(EEncoding eflag=zypp::url::E_DECODED) const
Returns the hostname or IP from the URL authority.
bool hasSuffix(const C_Str &str_r, const C_Str &suffix_r)
Return whether str_r has suffix suffix_r.
std::string toLower(const std::string &s)
Return lowercase version of s.
Easy-to use interface to the ZYPP dependency resolver.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.