--- parser3/src/classes/curl.C 2013/04/20 01:07:23 1.25 +++ parser3/src/classes/curl.C 2013/04/28 21:29:59 1.27 @@ -16,7 +16,7 @@ #include "pa_http.h" #include "ltdl.h" -volatile const char * IDENT_CURL_C="$Id: curl.C,v 1.25 2013/04/20 01:07:23 misha Exp $"; +volatile const char * IDENT_CURL_C="$Id: curl.C,v 1.27 2013/04/28 21:29:59 moko Exp $"; class MCurl: public Methoded { public: @@ -112,6 +112,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); @@ -226,12 +227,11 @@ public: CURL_OPT(CURL_INT, AUTOREFERER); CURL_OPT(CURL_STRING, ENCODING); // gzip or deflate -#ifdef CURLOPT_ACCEPT_ENCODING CURL_OPT(CURL_STRING, ACCEPT_ENCODING); // gzip or deflate -#endif 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);