--- parser3/src/classes/file.C 2001/10/29 17:49:57 1.63 +++ parser3/src/classes/file.C 2001/12/15 21:28:17 1.67 @@ -2,9 +2,9 @@ Parser: @b file parser class. Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://design.ru/paf) + Author: Alexander Petrosyan (http://paf.design.ru) - $Id: file.C,v 1.63 2001/10/29 17:49:57 paf Exp $ + $Id: file.C,v 1.67 2001/12/15 21:28:17 paf Exp $ */ #include "pa_config_includes.h" @@ -20,6 +20,7 @@ #include "pa_vdate.h" #include "pa_dir.h" #include "pa_vtable.h" +#include "pa_charset.h" // consts @@ -193,7 +194,7 @@ static void _exec_cgi(Request& r, const // from Request.info ECSTR(DOCUMENT_ROOT, r.info.document_root); ECSTR(PATH_TRANSLATED, r.info.path_translated); - ECSTR(SERVER_PROTOCOL, r.info.method); + ECSTR(REQUEST_METHOD, r.info.method); ECSTR(QUERY_STRING, r.info.query_string); ECSTR(REQUEST_URI, r.info.uri); ECSTR(CONTENT_TYPE, r.info.content_type); @@ -204,6 +205,7 @@ static void _exec_cgi(Request& r, const ECSTR(HTTP_COOKIE, r.info.cookie); ECSTR(HTTP_USER_AGENT, r.info.user_agent); // passing some SAPI:get_env-s + EPASS(SERVER_PROTOCOL); EPASS(SERVER_NAME); EPASS(SERVER_PORT); EPASS(HTTP_REFERER); @@ -271,7 +273,7 @@ static void _exec_cgi(Request& r, const } } // body - self.set(false/*not tainted*/, body->cstr(String::UL_AS_IS), body->size()); + self.set(false/*not tainted*/, body->cstr(), body->size()); // $status self.fields().put( @@ -306,12 +308,12 @@ static void _list(Request& r, const Stri if(params->size()>1) { regexp=¶ms->as_no_junction(1, "regexp must not be code").as_string(); - const char *pattern=regexp->cstr(String::UL_AS_IS); + const char *pattern=regexp->cstr(); const char *errptr; int erroffset; regexp_code=pcre_compile(pattern, PCRE_EXTRA | PCRE_DOTALL, &errptr, &erroffset, - r.pcre_tables()); + pool.get_client_charset().pcre_tables); if(!regexp_code) throw Exception(0, 0,