From: Viktor M. <mih...@us...> - 2005-05-02 14:07:05
|
Update of /cvsroot/sblim/wbemcli In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2468 Modified Files: ChangeLog CimCurl.cpp configure.ac Log Message: Bug 1193798: suppressed the Expect: header. Furter, corrected the libcurl version checks and added debugging support via CURLDEBUG environment variable. Index: CimCurl.cpp =================================================================== RCS file: /cvsroot/sblim/wbemcli/CimCurl.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- CimCurl.cpp 9 Dec 2004 17:48:57 -0000 1.3 +++ CimCurl.cpp 2 May 2005 14:06:53 -0000 1.4 @@ -12,6 +12,8 @@ * * Author: Philip K. Warren <pk...@us...> * + * Contributors: Viktor Mihajlovski <mih...@de...> + * * Description: Line command interface to DMTF conforming WBEM servers */ @@ -24,11 +26,12 @@ "Content-type: application/xml; charset=\"utf-8\"", "Connection: Keep-Alive, TE", "CIMProtocolVersion: 1.0", - "CIMOperation: MethodCall" + "CIMOperation: MethodCall", + "Expect:" }; #define NUM_HEADERS ((sizeof(headers))/(sizeof(headers[0]))) -#if LIBCURL_VERSION_NUM >= 0x071000 +#if LIBCURL_VERSION_NUM >= 0x070a00 static const curl_version_info_data *version = curl_version_info(CURLVERSION_NOW); #endif @@ -59,7 +62,7 @@ bool CimomCurl::supportsSSL() { -#if LIBCURL_VERSION_NUM >= 0x071000 +#if LIBCURL_VERSION_NUM >= 0x070a00 if (version && (version->features & CURL_VERSION_SSL)) return true; @@ -168,15 +171,18 @@ // Fail if we receive an error (HTTP response code >= 300) rv = curl_easy_setopt(mHandle, CURLOPT_FAILONERROR, 1); - // Turn this on to enable debugging - // rv = curl_easy_setopt(mHandle, CURLOPT_VERBOSE, 1); + char * curldebug = getenv("CURLDEBUG"); + if (curldebug && strcasecmp(curldebug,"false")) { + // Turn this on to enable debugging + rv = curl_easy_setopt(mHandle, CURLOPT_VERBOSE, 1); + } } static string getErrorMessage(CURLcode err) { string error; -#if LIBCURL_VERSION_NUM >= 0x071200 - error = curl_easy_strerror(rv); +#if LIBCURL_VERSION_NUM >= 0x070c00 + error = curl_easy_strerror(err); #else error = "CURL error: "; error += err; Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/wbemcli/configure.ac,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- configure.ac 5 Apr 2005 12:11:19 -0000 1.7 +++ configure.ac 2 May 2005 14:06:57 -0000 1.8 @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_INIT(SBLIM WBEMCLI, 1.4.8c, sbl...@ww...) +AC_INIT(SBLIM WBEMCLI, 1.4.9, sbl...@ww...) AC_CONFIG_SRCDIR([CimXml.cpp]) AC_CANONICAL_HOST Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/wbemcli/ChangeLog,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ChangeLog 14 Oct 2004 16:19:29 -0000 1.1 +++ ChangeLog 2 May 2005 14:06:52 -0000 1.2 @@ -1,4 +1,6 @@ -Refer to CVS log for actual changes. - +2005-05-02 <mih...@dy...> + * CimCurl.cpp: Suppress Expected Header as this slows down the + communication with CIM Servers not supporting it. + Fixed the libcurl version checks to use real hex digits. |