--- parser3/src/classes/file.C 2003/01/29 13:31:30 1.107.2.2 +++ parser3/src/classes/file.C 2003/03/21 07:19:42 1.108 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_FILE_C="$Date: 2003/01/29 13:31:30 $"; +static const char* IDENT_FILE_C="$Date: 2003/03/21 07:19:42 $"; #include "pa_config_includes.h" @@ -78,7 +78,7 @@ static const char *suexec_safe_env_lst[] class MFile : public Methoded { public: // VStateless_class - ValuePtr create_new_value() { return ValuePtr(new VFile()); } + Value *create_new_value(Pool& pool) { return new(pool) VFile(pool); } public: // Methoded bool used_directly() { return true; } @@ -139,7 +139,7 @@ static void _load(Request& r, const Stri ); char *user_file_name=params->size()>alt_filename_param_index? - params->as_string(alt_filename_param_index, "filename must be string") + params->as_string(alt_filename_param_index, "filename must be string").cstr(String::UL_FILE_SPEC) :lfile_name.cstr(String::UL_FILE_SPEC); Value *vcontent_type=0; @@ -269,7 +269,6 @@ static void _exec_cgi(Request& r, const env.put(*new(pool) String(pool, "SCRIPT_NAME"), &script_name); //env.put(*new(pool) String(pool, "SCRIPT_FILENAME"), ??&script_name); - bool stdin_specified=false; // environment & stdin from param String in(pool); if(params->size()>1) { @@ -278,7 +277,6 @@ static void _exec_cgi(Request& r, const Append_env_pair_info info={&env}; user_env->for_each(append_env_pair, &info); if(info.vstdin) { - stdin_specified=true; if(const String *sstdin=info.vstdin->get_string()) { in.append(*sstdin, String::UL_CLEAN, true); } else @@ -301,10 +299,6 @@ static void _exec_cgi(Request& r, const *argv+=¶ms->as_string(i, "parameter must be string"); } - // passing POST data - if(!stdin_specified) // if $.stdin[...] not specified - in.APPEND(r.post_data, r.post_size, String::UL_CLEAN, "POST data (passed)", 0); - // exec! String out(pool); String& err=*new(pool) String(pool);