← Back to team overview

zorba-coders team mailing list archive

[Merge] lp:~zorba-coders/zorba/https-win into lp:zorba

 

You have been requested to review the proposed merge of lp:~zorba-coders/zorba/https-win into lp:zorba.

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/https-win/+merge/95060

Making https work on Windows.

This branch was created by Daniel Turcanu: lp:~danielturcanu/zorba/https-win.

-- 
https://code.launchpad.net/~zorba-coders/zorba/https-win/+merge/95060
Your team Zorba Coders is requested to review the proposed merge of lp:~zorba-coders/zorba/https-win into lp:zorba.
=== modified file 'modules/com/zorba-xquery/www/modules/http-client.xq.src/http_client.cpp'
--- modules/com/zorba-xquery/www/modules/http-client.xq.src/http_client.cpp	2011-12-21 14:40:33 +0000
+++ modules/com/zorba-xquery/www/modules/http-client.xq.src/http_client.cpp	2012-02-28 21:48:22 +0000
@@ -53,7 +53,10 @@
 #	endif
 			aPath = lPath.substr(0, lPath.rfind('\\'));
 			aPath += "\\cacert.pem";
-			curl_easy_setopt(lCurl, CURLOPT_CAINFO, aPath.c_str());
+      if(GetFileAttributesA(aPath.c_str()) != INVALID_FILE_ATTRIBUTES)
+			  curl_easy_setopt(lCurl, CURLOPT_CAINFO, aPath.c_str());
+      else
+        curl_easy_setopt(lCurl, CURLOPT_SSL_VERIFYPEER, 0L);
 		}
 #endif //WIN32
 
@@ -207,7 +210,7 @@
         lOverrideContentType.c_str(), lStatusOnly));
       int lRetCode = lRespParser->parse();
 
-      if (lRetCode) {
+       if (lRetCode) {
         thrower.raiseException("http://expath.org/ns/error";, "HC001", "An HTTP error occurred");
       }
 


References