void proxy(mp::Package &package);
std::string proxy_host;
std::string default_host;
+ int max_redirects;
+ Rep();
};
}
}
+yf::HTTPClient::Rep::Rep()
+{
+ max_redirects = -0;
+}
+
yf::HTTPClient::HTTPClient() : m_p(new Rep)
{
}
if (*http_proxy)
yaz_url_set_proxy(yaz_url, http_proxy);
+ yaz_url_set_max_redirects(yaz_url, max_redirects);
+
std::string uri;
if (hreq->path[0] == '/')
{
{
m_p->proxy_host = mp::xml::get_text(ptr);
}
+ else if (!strcmp((const char *) ptr->name, "max-redirects"))
+ {
+ m_p->max_redirects = mp::xml::get_int(ptr, 0);
+ }
else if (!strcmp((const char *) ptr->name, "default-host"))
{
m_p->default_host = mp::xml::get_text(ptr);
attribute id { xsd:NCName }?,
attribute name { xsd:NCName }?,
element mp:default-host { xsd:string }?,
+ element mp:max-redirects { xsd:integer }?,
element mp:proxy { xsd:string }?