--- parser3/src/classes/curl.C 2021/10/19 16:16:35 1.68 +++ parser3/src/classes/curl.C 2024/09/07 16:30:26 1.71 @@ -1,7 +1,8 @@ /** @file Parser: @b curl parser class. - Copyright (c) 2001-2020 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2023 Art. Lebedev Studio (http://www.artlebedev.com) + Authors: Konstantin Morshnev */ #include "pa_config_includes.h" @@ -17,7 +18,7 @@ #include "pa_http.h" #include "ltdl.h" -volatile const char * IDENT_CURL_C="$Id: curl.C,v 1.68 2021/10/19 16:16:35 moko Exp $"; +volatile const char * IDENT_CURL_C="$Id: curl.C,v 1.71 2024/09/07 16:30:26 moko Exp $"; class MCurl: public Methoded { public: @@ -148,7 +149,8 @@ static void temp_curl(void (*action)(Req Temp_curl temp_curl; action(r,params); } else { - throw Exception("curl", 0, "failed to load curl library %s: %s", curl_library, curl_status); + const char *hint=strcmp(curl_library, "libcurl" LT_MODULE_EXT) ? "" : " (at first call ^curl:options[ $.library[correct.libcurl" LT_MODULE_EXT ".name] ])"; + throw Exception("curl", 0, "failed to load curl library %s%s", curl_status, hint); } } @@ -788,7 +790,7 @@ static void _curl_load_action(Request& r VHash* vtables=new VHash; result.fields().put("tables", vtables); - for(Array_iterator i(response.headers); i.has_next(); ){ + for(Array_iterator i(response.headers); i; ){ HTTP_Headers::Header header=i.next(); if(asked_charset)