--- parser3/src/classes/file.C 2024/12/11 02:30:24 1.293 +++ parser3/src/classes/file.C 2025/05/26 00:52:15 1.296 @@ -27,7 +27,7 @@ #include "pa_vregex.h" #include "pa_version.h" -volatile const char * IDENT_FILE_C="$Id: file.C,v 1.293 2024/12/11 02:30:24 moko Exp $"; +volatile const char * IDENT_FILE_C="$Id: file.C,v 1.296 2025/05/26 00:52:15 moko Exp $"; // defines @@ -208,9 +208,7 @@ static void copy_process_source(struct s nCount = file_block_read(from_file, buffer, sizeof(buffer)); int written=write(to_file, buffer, nCount); if( written < 0 ) - throw Exception("file.access", - 0, - "write failed: %s (%d)", strerror(errno), errno); + throw Exception("file.write", 0, "write failed: %s (%d)", strerror(errno), errno); } while(nCount > 0); } @@ -478,7 +476,7 @@ static void append_to_argv(Request& r, A static void _exec_cgi(Request& r, MethodParams& params, bool cgi) { bool is_text=true; size_t param_index=0; - const String& mode=params.as_string(0, FIRST_ARG_MUST_NOT_BE_CODE); + const String& mode=params.as_string(0, "mode must be string"); if(VFile::is_valid_mode(mode)) { is_text=VFile::is_text_mode(mode); param_index++; @@ -490,10 +488,10 @@ static void _exec_cgi(Request& r, Method const String& script_name=r.full_disk_path(params.as_file_name(param_index++)); HashStringString env; - #define ECSTR(name, value_cstr) if(value_cstr) env.put(#name, value_cstr); + #define ECSTR(name, value_cstr) if(value_cstr) env.put(#name, String::Body(value_cstr)); // passing environment for(SAPI::Env::Iterator i(r.sapi_info); i; i.next() ) - env.put(i.key(), i.value() ); + env.put(i.key(), String::Body(i.value()) ); // const ECSTR(GATEWAY_INTERFACE, "CGI/1.1");