summaryrefslogtreecommitdiff
path: root/project2/xslRows.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'project2/xslRows.cpp')
-rw-r--r--project2/xslRows.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/project2/xslRows.cpp b/project2/xslRows.cpp
index 1a7d6f4..7f53e91 100644
--- a/project2/xslRows.cpp
+++ b/project2/xslRows.cpp
@@ -19,7 +19,7 @@ SimpleMessageException(XpathEvalError);
XslRows::XslRows(const xmlpp::Element * p) :
SourceObject(p),
RowSet(p),
- url(p, "url"),
+ CurlHelper(p),
html(p->get_attribute_value("html") == "true"),
warnings(p->get_attribute_value("warnings") != "false")
{
@@ -70,11 +70,7 @@ XslRows::getDocument(const Glib::ustring & url) const
{
Documents::const_iterator i = documents.find(url);
if (i == documents.end()) {
- CurlHandle::Ptr c = new CurlHandle();
- c->setopt(CURLOPT_URL, url.c_str());
- c->setopt(CURLOPT_FOLLOWLOCATION, 1);
- c->setopt(CURLOPT_ENCODING, "deflate, gzip");
- c->setopt(CURLOPT_USERAGENT, "project2/0.3");
+ CurlHandle::Ptr c = newCurl();
std::string buf;
c->setopt(CURLOPT_WRITEDATA, &buf);
c->setopt(CURLOPT_WRITEFUNCTION, &handleDataHelper);