--- parser3/src/main/pa_request.C 2001/11/05 11:46:28 1.176 +++ parser3/src/main/pa_request.C 2001/11/08 11:04:13 1.178 @@ -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.176 2001/11/05 11:46:28 paf Exp $ + $Id: pa_request.C,v 1.178 2001/11/08 11:04:13 paf Exp $ */ #include "pa_config_includes.h" @@ -26,6 +26,7 @@ extern "C" unsigned char pcre_default_ta #include "pa_vfile.h" #include "pa_dictionary.h" #include "pa_charset_manager.h" +#include "pa_charset_connection.h" /// content type of exception response, when no @MAIN:exception handler defined const char *UNHANDLED_EXCEPTION_CONTENT_TYPE="text/plain"; @@ -41,7 +42,8 @@ static void load_charset(const Hash::Key Value& value=*static_cast(avalue); Hash& CTYPE=*static_cast(info); - Charset_connection& connection=charset_manager->get_connection(akey, value.as_string()); + Charset_connection& connection= + charset_manager->get_connection(akey, value.as_string()); // charset->pcre_tables CTYPE.put(akey, connection.pcre_tables()); @@ -74,6 +76,9 @@ Request::Request(Pool& apool, anti_endless_execute_recoursion(0), trace(apool) { + // maybe expire old caches + cache_managers->maybe_expire(); + /// directly used // operators OP.register_directly_used(*this); @@ -114,7 +119,6 @@ void Request::core( const char *root_config_filespec, bool root_config_fail_on_read_problem, const char *site_config_filespec, bool site_config_fail_on_read_problem, bool header_only) { - //_asm { int 3 } try { char *auto_filespec=(char *)malloc(MAX_STRING); @@ -535,8 +539,8 @@ const String& Request::absolute(const St static void add_header_attribute(const Hash::Key& aattribute, Hash::Val *ameaning, void *info) { - String *attribute_to_exclude=static_cast(info); - if(aattribute==*attribute_to_exclude) + Request& r=*static_cast(info); + if(aattribute==*body_name) return; Value& lmeaning=*static_cast(ameaning); @@ -571,7 +575,7 @@ void Request::output_result(const VFile& } // prepare header: $response:fields without :body - response.fields().for_each(add_header_attribute, /*excluding*/ body_name); + response.fields().for_each(add_header_attribute, this); // prepare... const void *body=body_file.value_ptr();