--- parser3/src/classes/curl.C 2017/01/28 15:26:50 1.52 +++ parser3/src/classes/curl.C 2017/11/15 22:48:57 1.55 @@ -1,7 +1,7 @@ /** @file Parser: @b curl parser class. - Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2017 Art. Lebedev Studio (http://www.artlebedev.com) */ #include "pa_config_includes.h" @@ -17,7 +17,7 @@ #include "pa_http.h" #include "ltdl.h" -volatile const char * IDENT_CURL_C="$Id: curl.C,v 1.52 2017/01/28 15:26:50 moko Exp $"; +volatile const char * IDENT_CURL_C="$Id: curl.C,v 1.55 2017/11/15 22:48:57 moko Exp $"; class MCurl: public Methoded { public: @@ -69,8 +69,7 @@ static const char *dlink(const char *dlo } -class ParserOptions { -public: +struct ParserOptions : public PA_Allocated { // real options const String *filename; const String *content_type; @@ -88,7 +87,7 @@ public: if(f_stderr) fclose(f_stderr); } - + }; // using TLS instead of keeping variables in request @@ -160,8 +159,7 @@ static void _curl_version(Request& r, Me fcurl ? _curl_version_action(r, params) : temp_curl(_curl_version_action, r, params); } -class CurlOption { -public: +struct CurlOption : public PA_Allocated{ enum OptionType { CURL_STRING, @@ -288,8 +286,7 @@ public: } *curl_options=0; -class CurlInfo { -public: +struct CurlInfo : public PA_Allocated{ enum OptionType { CURL_STRING, @@ -478,7 +475,7 @@ static void curl_setopt(HashStringValue: case CurlOption::CURL_STDERR:{ // verbose output redirection from stderr to file curl option const char *file_spec_cstr=curl_check_file(r.absolute(v.as_string())); - FILE *f_stderr=options().f_stderr=fopen(file_spec_cstr, "wt"); + FILE *f_stderr=options().f_stderr=pa_fopen(file_spec_cstr, "wt"); if (f_stderr){ res=f_curl_easy_setopt(curl(), opt->id, f_stderr); } else {