--- parser3/src/classes/file.C 2015/10/09 00:17:44 1.239 +++ parser3/src/classes/file.C 2016/07/21 18:30:10 1.243 @@ -1,7 +1,7 @@ /** @file Parser: @b file parser class. - Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ @@ -25,7 +25,7 @@ #include "pa_vregex.h" #include "pa_version.h" -volatile const char * IDENT_FILE_C="$Id: file.C,v 1.239 2015/10/09 00:17:44 moko Exp $"; +volatile const char * IDENT_FILE_C="$Id: file.C,v 1.243 2016/07/21 18:30:10 moko Exp $"; // defines @@ -68,7 +68,7 @@ public: // global variable -DECLARE_CLASS_VAR(file, new MFile, 0); +DECLARE_CLASS_VAR(file, new MFile); // consts @@ -191,11 +191,7 @@ static void _move(Request& r, MethodPara keep_empty_dirs); } -static void copy_process_source( - struct stat& , - int from_file, - const String& , const char* /*fname*/, bool, - void *context) { +static void copy_process_source(struct stat& , int from_file, const String&, void *context) { int& to_file=*static_cast(context); int nCount=0; @@ -486,8 +482,7 @@ static void _exec_cgi(Request& r, Method ECSTR(CONTENT_TYPE, r.request_info.content_type); ECSTR(CONTENT_LENGTH, format(r.request_info.content_length, "%u")); // SCRIPT_* - env.put(String::Body("SCRIPT_NAME"), script_name); - //env.put(String::Body("SCRIPT_FILENAME"), ??&script_name); + env.put("SCRIPT_NAME", script_name); // environment & stdin from param String *in=new String(); @@ -659,9 +654,7 @@ static void _exec_cgi(Request& r, Method // $stderr if(!real_err->is_empty()) - self.fields().put( - String::Body("stderr"), - new VString(*real_err)); + self.fields().put("stderr", new VString(*real_err)); } static void _exec(Request& r, MethodParams& params) { _exec_cgi(r, params, false); @@ -1115,11 +1108,7 @@ static void _crc32(Request& r, MethodPar } -static void file_md5_file_action( - struct stat& finfo, - int f, - const String& , const char* /*fname*/, bool, - void *context) +static void file_md5_file_action(struct stat& finfo, int f, const String&, void *context) { PA_MD5_CTX& md5context=*static_cast(context); if(finfo.st_size) {