--- parser3/src/classes/file.C 2001/10/19 12:43:29 1.59 +++ parser3/src/classes/file.C 2001/10/29 13:04:45 1.61 @@ -4,7 +4,7 @@ Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: file.C,v 1.59 2001/10/19 12:43:29 parser Exp $ + $Id: file.C,v 1.61 2001/10/29 13:04:45 paf Exp $ */ #include "pa_config_includes.h" @@ -120,7 +120,8 @@ static void _load(Request& r, const Stri file_read(pool, r.absolute(lfile_name), data, size, vmode_name.as_string()==TEXT_MODE_NAME); - char *user_file_name=params->size()>2?params->as_string(2, "filename must be string").cstr() + char *user_file_name=params->size()>2? + params->as_string(2, "filename must be string").cstr(String::UL_FILE_SPEC) :lfile_name.cstr(String::UL_FILE_SPEC); static_cast(r.self)->set(true/*tainted*/, data, size, @@ -215,7 +216,7 @@ static void _exec_cgi(Request& r, const if(params->size()>1) { Value& venv=params->as_no_junction(1, "env must not be code"); - if(Hash *user_env=venv.get_hash()) + if(Hash *user_env=venv.get_hash(&method_name)) user_env->for_each(append_env_pair, &env); } @@ -361,6 +362,7 @@ static void _list(Request& r, const Stri if(regexp_code) (*pcre_free)(regexp_code); + // write out result VTable& result=*new(pool) VTable(pool, &table); result.set_name(method_name); r.write_no_lang(result);