14 #ifndef ZYPP_MEDIA_CURLHELPER_H_INCLUDED 15 #define ZYPP_MEDIA_CURLHELPER_H_INCLUDED 17 #include <curl/curl.h> 21 #define CONNECT_TIMEOUT 60 22 #define TRANSFER_TIMEOUT_MAX 60 * 60 23 #define DETECT_DIR_INDEX 0 25 #define EXPLICITLY_NO_PROXY "_none_" 27 #undef CURLVERSION_AT_LEAST 28 #define CURLVERSION_AT_LEAST(M,N,O) LIBCURL_VERSION_NUM >= ((((M)<<8)+(N))<<8)+(O) 44 int log_curl(CURL *
curl, curl_infotype info,
char *ptr,
size_t len,
void *max_lvl);
69 void curlEscape( std::string & str_r,
const char char_r,
const std::string & escaped_r );
void globalInitCurlOnce()
size_t log_redirects_curl(char *ptr, size_t size, size_t nmemb, void *userdata)
const char * anonymousIdHeader()
initialized only once, this gets the anonymous id from the target, which we pass in the http header ...
zypp::Url propagateQueryParams(zypp::Url url_r, const zypp::Url &template_r)
int getZYPP_MEDIA_CURL_IPRESOLVE()
Url clearQueryString(const Url &url)
std::string curlEscapedPath(std::string path_r)
const char * distributionFlavorHeader()
initialized only once, this gets the distribution flavor from the target, which we pass in the http h...
void curlEscape(std::string &str_r, const char char_r, const std::string &escaped_r)
void fillSettingsFromUrl(const Url &url, media::TransferSettings &s)
Fills the settings structure using options passed on the url for example ?timeout=x&proxy=foo.
std::string curlUnEscape(std::string text_r)
const char * agentString()
initialized only once, this gets the agent string which also includes the curl version ...
void fillSettingsSystemProxy(const Url &url, media::TransferSettings &s)
Reads the system proxy configuration and fills the settings structure proxy information.
int log_curl(CURL *curl, curl_infotype info, char *ptr, size_t len, void *max_lvl)
int ZYPP_MEDIA_CURL_IPRESOLVE()