--- parser3/src/classes/curl.C 2013/04/21 21:24:53 1.26 +++ parser3/src/classes/curl.C 2013/07/05 21:09:57 1.28 @@ -16,7 +16,7 @@ #include "pa_http.h" #include "ltdl.h" -volatile const char * IDENT_CURL_C="$Id: curl.C,v 1.26 2013/04/21 21:24:53 moko Exp $"; +volatile const char * IDENT_CURL_C="$Id: curl.C,v 1.28 2013/07/05 21:09:57 moko Exp $"; class MCurl: public Methoded { public: @@ -44,8 +44,7 @@ typedef void (*t_curl_formfree)(struct c #define DLINK(name) GLINK(name) if(!f_##name) return "function " #name " was not found"; static const char *dlink(const char *dlopen_file_spec) { - if(lt_dlinit()) - return lt_dlerror(); + pa_dlinit(); lt_dlhandle handle=lt_dlopen(dlopen_file_spec); @@ -112,6 +111,7 @@ public: fcurl = f_curl_easy_init(); foptions = new ParserOptions(); f_curl_easy_setopt(fcurl, CURLOPT_POSTFIELDSIZE, 0); // fix libcurl bug + f_curl_easy_setopt(fcurl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); // avoid ipv6 by default } ~Temp_curl() { f_curl_easy_cleanup(fcurl); @@ -230,6 +230,7 @@ public: CURL_OPT(CURL_INT, FOLLOWLOCATION); CURL_OPT(CURL_INT, UNRESTRICTED_AUTH); + CURL_OPT(CURL_INT, IPRESOLVE); CURL_OPT(CURL_INT, POST); CURL_OPT(CURL_INT, HTTPGET);