--- parser3/src/main/pa_request.C 2002/10/16 08:22:14 1.236 +++ parser3/src/main/pa_request.C 2002/11/25 14:10:53 1.239 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_REQUEST_C="$Date: 2002/10/16 08:22:14 $"; +static const char* IDENT_REQUEST_C="$Date: 2002/11/25 14:10:53 $"; #include "pa_sapi.h" #include "pa_common.h" @@ -68,7 +68,8 @@ Request::Request(Pool& apool, #ifdef RESOURCES_DEBUG , sql_connect_time(0),sql_request_time(0) #endif - , method_frame(0), rcontext(0), wcontext(0) + , method_frame(0), rcontext(0), wcontext(0), + finterrupted(false) { // default charsets pool().set_source_charset(*utf8_charset); @@ -138,7 +139,7 @@ void Request::configure_admin(VStateless ... ] */ - if(Value *vcharsets=conf_class.get_element(*charsets_name, &conf_class, false)) { + if(Value *vcharsets=conf_class.get_element(*charsets_name, conf_class, false)) { if(Hash *charsets=vcharsets->get_hash(0)) charsets->for_each(load_charset); else if(!vcharsets->get_string()) @@ -229,7 +230,7 @@ gettimeofday(&mt[0],NULL); methoded_array->configure_user(*this); // $MAIN:MIME-TYPES - if(Value *element=main_class.get_element(*mime_types_name, &main_class, false)) + if(Value *element=main_class.get_element(*mime_types_name, main_class, false)) if(Table *table=element->get_table()) mime_types=table; @@ -263,7 +264,7 @@ gettimeofday(&mt[2],NULL); // @postprocess if(Value *value=main_class.get_element( *NEW String(pool(), POST_PROCESS_METHOD_NAME), - &main_class, + main_class, false)) if(Junction *junction=value->get_junction()) if(const Method *method=junction->method) { @@ -358,7 +359,7 @@ t[9]-t[3] // in a gracefull way... if(Value *value=main_class.get_element( *NEW String(pool(), UNHANDLED_EXCEPTION_METHOD_NAME), - &main_class, + main_class, false)) { if(Junction *junction=value->get_junction()) { if(const Method *method=junction->method) { @@ -457,7 +458,7 @@ VStateless_class *Request::use_file(VSta file_spec=&absolute(file_name); else { file_spec=0; - if(Value *element=main_class.get_element(*class_path_name, &main_class, false)) { + if(Value *element=main_class.get_element(*class_path_name, main_class, false)) { if(element->is_string()) { file_spec=file_readable(absolute(element->as_string()), file_name); // found at class_path? } else if(Table *table=element->get_table()) { @@ -538,7 +539,8 @@ const String& Request::absolute(const St result << relative_name; return result; } else - return relative(info.path_translated, relative_name); + return relative_name.pos("://")<0? relative(info.path_translated, relative_name) + :relative_name; // something like "http://xxx" } static void add_header_attribute(const Hash::Key& aattribute, Hash::Val *ameaning, @@ -628,5 +630,5 @@ const String& Request::mime_type_of(cons } bool Request::origins_mode() { - return main_class.get_element(*origins_mode_name, &main_class, false)!=0; // $ORIGINS mode + return main_class.get_element(*origins_mode_name, main_class, false)!=0; // $ORIGINS mode }