diff options
-rw-r--r-- | sca-cpp/trunk/modules/http/curl-get.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sca-cpp/trunk/modules/http/curl-get.cpp b/sca-cpp/trunk/modules/http/curl-get.cpp index 983dd20fc5..96efcc7897 100644 --- a/sca-cpp/trunk/modules/http/curl-get.cpp +++ b/sca-cpp/trunk/modules/http/curl-get.cpp @@ -35,8 +35,10 @@ namespace http { const bool testGet(const string& url, const string& ca = "", const string& cert = "", const string& key = "") { const CURLSession ch(ca, cert, key, "", 0); const failable<value> val = get(url, ch); - assert(hasContent(val)); - cout << content(val) << endl; + if(!hasContent(val)) + cerr << reason(val) << endl; + else + cout << content(val) << endl; return true; } |