zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #00857
[Merge] lp:~danielturcanu/zorba/https-win into lp:zorba
Daniel Turcanu has proposed merging lp:~danielturcanu/zorba/https-win into lp:zorba.
Requested reviews:
Zorba Coders (zorba-coders)
For more details, see:
https://code.launchpad.net/~danielturcanu/zorba/https-win/+merge/78982
Making https work on Windows.
Possibly that it also needs fixing on Linux.
--
https://code.launchpad.net/~danielturcanu/zorba/https-win/+merge/78982
Your team Zorba Coders is requested to review the proposed merge of lp:~danielturcanu/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-07-29 08:12:36 +0000
+++ modules/com/zorba-xquery/www/modules/http-client.xq.src/http_client.cpp 2011-10-11 14:25:57 +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");
}
Follow ups