Debug code bug fix; removal of CurlEasyHandle::getErrorString()

CurlEasyHandle::mErrorBuffer (CURLOPT_ERRORBUFFER) can NOT be
used to retrieve information about an error returned by
curl_multi_info_read in CURLMsg::data::result. This buffer is
only initialized when a curl_easy_* call returns an error,
and those errors are already printed automagically.

Initialize the buffer with an empty string upon invokation
of an curl_easy_* call, so we are sure the error belongs to
the last call.
This commit is contained in:
Aleric Inglewood
2012-09-21 01:28:26 +02:00
parent f3780998ed
commit 81bc6b49f8
4 changed files with 11 additions and 21 deletions

View File

@@ -480,7 +480,6 @@ static LLSD blocking_request(
llwarns << "CURL REQ HEADERS: " << headers.asString() << llendl;
llwarns << "CURL REQ BODY: " << ostr.str() << llendl;
llwarns << "CURL HTTP_STATUS: " << http_status << llendl;
llwarns << "CURL ERROR: " << curlEasyRequest_w->getErrorString() << llendl;
llwarns << "CURL ERROR BODY: " << http_buffer.asString() << llendl;
response["body"] = http_buffer.asString();
}