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<string*>(stream);
const char* hdr = reinterpret_cast<char*>(ptr);
}
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;
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;
}