--- parser3/src/main/pa_request.C 2001/12/21 12:47:56 1.188 +++ parser3/src/main/pa_request.C 2002/01/21 12:10:08 1.192 @@ -4,7 +4,7 @@ Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://paf.design.ru) - $Id: pa_request.C,v 1.188 2001/12/21 12:47:56 paf Exp $ + $Id: pa_request.C,v 1.192 2002/01/21 12:10:08 paf Exp $ */ #include "pa_sapi.h" @@ -33,11 +33,7 @@ Methoded *MOP_create(Pool&); static void load_charset(const Hash::Key& akey, Hash::Val *avalue, void *) { - Value& value=*static_cast(avalue); - - if(!charsets->get(akey)) // don't we know that charset? - charsets->put(akey, - new(charsets->pool()) Charset(charsets->pool(), akey, &value.as_string())); + charsets->load_charset(akey, static_cast(avalue)->as_string()); } // @@ -62,7 +58,7 @@ Request::Request(Pool& apool, default_content_type(0), mime_types(0), main_class(0), - connection(0), + fconnection(0), classes_conf(apool), anti_endless_execute_recoursion(0), trace(apool) @@ -106,6 +102,17 @@ Request::Request(Pool& apool, classes().put(math.get_class()->base()->name(), &math); } +Request::~Request() { +#ifdef XML + // if for some strange reason xml generic errors failed to be reported, free them up + if(const char *xml_generic_errors=xmlGenericErrors()) { + SAPI::log(pool(), "warning: unreported xmlGenericErrors: %s", xml_generic_errors); + free((void *)xml_generic_errors); + } +#endif +} + + /** load MAIN class, execute @main. MAIN class consists of all the auto.p files we'd manage to find @@ -228,8 +235,7 @@ gettimeofday(&mt[0],NULL); gettimeofday(&mt[1],NULL); #endif // execute @main[] - const String *body_string=execute_virtual_method( - *main_class, *main_method_name); + const String *body_string=execute_virtual_method(*main_class, *main_method_name); if(!body_string) throw Exception(0,0, 0,