diff --git a/libtransport/HTTPRequest.cpp b/libtransport/HTTPRequest.cpp index 90c0bfb9cf26605d64c741450da0583ec3f283cc..68211eb75350e495e29bc3dfa34653946dbd09a0 100644 --- a/libtransport/HTTPRequest.cpp +++ b/libtransport/HTTPRequest.cpp @@ -40,7 +40,7 @@ bool HTTPRequest::init() { return true; } - LOG4CXX_ERROR(logger, "Couldn't Initialize curl!") + LOG4CXX_ERROR(logger, "Couldn't Initialize curl!"); return false; } @@ -53,7 +53,7 @@ void HTTPRequest::setProxy(std::string IP, std::string port, std::string usernam curl_easy_setopt(curlhandle, CURLOPT_PROXYUSERPWD, proxyUserPass.c_str()); } } else { - LOG4CXX_ERROR(logger, "Trying to set proxy while CURL isn't initialized") + LOG4CXX_ERROR(logger, "Trying to set proxy while CURL isn't initialized"); } } @@ -71,27 +71,27 @@ bool HTTPRequest::GET(std::string url, std::string &data) { if (curlhandle) { curl_easy_setopt(curlhandle, CURLOPT_CUSTOMREQUEST, NULL); curl_easy_setopt(curlhandle, CURLOPT_ENCODING, ""); - + data = ""; callbackdata = ""; memset(curl_errorbuffer, 0, 1024); - + curl_easy_setopt(curlhandle, CURLOPT_ERRORBUFFER, curl_errorbuffer); curl_easy_setopt(curlhandle, CURLOPT_WRITEFUNCTION, curlCallBack); curl_easy_setopt(curlhandle, CURLOPT_WRITEDATA, this); - + /* Set http request and url */ curl_easy_setopt(curlhandle, CURLOPT_HTTPGET, 1); curl_easy_setopt(curlhandle, CURLOPT_VERBOSE, 0); curl_easy_setopt(curlhandle, CURLOPT_URL, url.c_str()); - + /* Send http request and return status*/ if(CURLE_OK == curl_easy_perform(curlhandle)) { data = callbackdata; return true; } } else { - LOG4CXX_ERROR(logger, "CURL not initialized!") + LOG4CXX_ERROR(logger, "CURL not initialized!"); strcpy(curl_errorbuffer, "CURL not initialized!"); } LOG4CXX_ERROR(logger, "Error fetching " << url);