X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=xmltooling%2Futil%2FCurlURLInputStream.cpp;h=e5036da7cbbd3de1ad5cc4ba40d23736f73c0f4b;hb=59831dcbb9b9f7fe5edf11a11340a83b65050444;hp=4d1e4b3caf2f8ec87f8dfc7f836d29fb2d4dd2c7;hpb=81b488b2790e7bdeb2f43560b1d4a7d22c3dfdf5;p=shibboleth%2Fcpp-xmltooling.git diff --git a/xmltooling/util/CurlURLInputStream.cpp b/xmltooling/util/CurlURLInputStream.cpp index 4d1e4b3..e5036da 100644 --- a/xmltooling/util/CurlURLInputStream.cpp +++ b/xmltooling/util/CurlURLInputStream.cpp @@ -75,7 +75,7 @@ namespace { size_t curl_header_hook(void* ptr, size_t size, size_t nmemb, void* stream) { // only handle single-byte data - if (size!=1 || nmemb<5 || !stream) + if (size != 1 || nmemb < 5 || !stream) return nmemb; string* cacheTag = reinterpret_cast(stream); const char* hdr = reinterpret_cast(ptr); @@ -117,9 +117,9 @@ namespace { } break; } - // append until whitespace + // append until data's gone or we see a CR/LF while (remaining > 0) { - if (!isspace(*hdr)) { + if (*hdr != '\r' && *hdr != '\n') { (*cacheTag) += *hdr++; --remaining; continue; @@ -523,6 +523,9 @@ bool CurlURLInputStream::readMore(int* runningHandles) default: fLog.error("error while fetching %s: (%d) %s", fURL.c_str(), msg->data.result, fError); + if (msg->data.result == CURLE_SSL_CIPHER) { + fLog.error("on Red Hat 6+, make sure libcurl used is built with OpenSSL"); + } ThrowXML1(NetAccessorException, XMLExcepts::NetAcc_InternalError, fURL.c_str()); break; }