--- parser3/src/classes/curl.C 2016/08/03 20:35:36 1.41 +++ parser3/src/classes/curl.C 2016/10/04 13:23:45 1.44 @@ -17,7 +17,7 @@ #include "pa_http.h" #include "ltdl.h" -volatile const char * IDENT_CURL_C="$Id: curl.C,v 1.41 2016/08/03 20:35:36 moko Exp $"; +volatile const char * IDENT_CURL_C="$Id: curl.C,v 1.44 2016/10/04 13:23:45 moko Exp $"; class MCurl: public Methoded { public: @@ -276,6 +276,7 @@ public: CURL_OPT(CURL_INT, SSL_VERIFYHOST); CURL_OPT(CURL_STRING, SSL_CIPHER_LIST); CURL_OPT(CURL_INT, SSL_SESSIONID_CACHE); + CURL_OPT(CURL_INT, SSLVERSION); PARSER_OPT(PARSER_LIBRARY, "library"); PARSER_OPT(PARSER_NAME, "name"); @@ -409,7 +410,7 @@ static void curl_setopt(HashStringValue: throw Exception("curl", 0, "called with invalid option '%s'", key.cstr()); CURLcode res = CURLE_OK; - Value &v=r.process_to_value(*value); + Value &v=r.process(*value); switch (opt->type){ case CurlOption::CURL_STRING:{ @@ -516,7 +517,7 @@ static void curl_setopt(HashStringValue: } case CurlOption::PARSER_RESPONSE_CHARSET:{ // 'response-charset' parser option - options().response_charset=&::charsets.get(v.as_string()); + options().response_charset=&pa_charsets.get(v.as_string()); break; } } @@ -532,8 +533,8 @@ static void _curl_options(Request& r, Me if(HashStringValue* options_hash=params.as_hash(0)){ if(Value* value=options_hash->get("charset")){ // charset should be handled first as params may require transcode - Value &v=r.process_to_value(*value); - options().charset=&::charsets.get(v.as_string()); + Value &v=r.process(*value); + options().charset=&pa_charsets.get(v.as_string()); } options_hash->for_each(curl_setopt, r); } @@ -673,7 +674,7 @@ static void _curl_load_action(Request& r asked_charset=detect_charset(response.content_type.cstr()); if(options().is_text) - asked_charset=charsets.checkBOM(body.buf, body.length, asked_charset); + asked_charset=pa_charsets.checkBOM(body.buf, body.length, asked_charset); if (!asked_charset) asked_charset = options().charset;