|
|
| version 1.245.2.21, 2003/02/17 10:44:55 | version 1.245.2.25, 2003/02/19 16:19:00 |
|---|---|
| Line 109 Request::Request(Pool& apool, SAPI_Info& | Line 109 Request::Request(Pool& apool, SAPI_Info& |
| response(new VResponse(fpool, arequest_info, charsets)), | response(new VResponse(fpool, arequest_info, charsets)), |
| cookie(new VCookie), | cookie(new VCookie), |
| // private | |
| configure_admin_done(false), | |
| // private defaults | // private defaults |
| fdefault_lang(adefault_lang), | fdefault_lang(adefault_lang), |
| // private mime types | // private mime types |
| Line 122 Request::Request(Pool& apool, SAPI_Info& | Line 125 Request::Request(Pool& apool, SAPI_Info& |
| classes().put(main_class->name(), main_class); | classes().put(main_class->name(), main_class); |
| // classes: | // classes: |
| // table, file, random, mail, image, ... | // table, file, random, mail, image, ... |
| methoded_array.register_directly_used(*this); | methoded_array().register_directly_used(*this); |
| /// methodless | /// methodless |
| // env class | // env class |
| Line 196 void Request::configure_admin(VStateless | Line 199 void Request::configure_admin(VStateless |
| // configure method_frame options | // configure method_frame options |
| // until someone with less privileges have overriden them | // until someone with less privileges have overriden them |
| methoded_array.configure_admin(*this); | methoded_array().configure_admin(*this); |
| } | } |
| /** | /** |
| Line 221 struct timeval mt[10]; | Line 224 struct timeval mt[10]; |
| gettimeofday(&mt[0],NULL); | gettimeofday(&mt[0],NULL); |
| #endif | #endif |
| try { | try { |
| char *auto_filespec=(char *)malloc(MAX_STRING); | |
| // loading config | // loading config |
| if(config_filespec) { | if(config_filespec) { |
| StringPtr filespec(new String); | StringPtr filespec(new String); |
| Line 273 gettimeofday(&mt[0],NULL); | Line 274 gettimeofday(&mt[0],NULL); |
| configure_admin(*main_class, StringPtr(0)); | configure_admin(*main_class, StringPtr(0)); |
| // configure not-method_frame=user options | // configure not-method_frame=user options |
| methoded_array.configure_user(*this); | methoded_array().configure_user(*this); |
| // $MAIN:MIME-TYPES | // $MAIN:MIME-TYPES |
| if(ValuePtr element=main_class->get_element(mime_types_name, *main_class, false)) | if(ValuePtr element=main_class->get_element(mime_types_name, *main_class, false)) |
| Line 313 gettimeofday(&mt[2],NULL); | Line 314 gettimeofday(&mt[2],NULL); |
| if(const Method *method=junction->method) { | if(const Method *method=junction->method) { |
| // preparing to pass parameters to | // preparing to pass parameters to |
| // @postprocess[data] | // @postprocess[data] |
| VMethodFrame frame(pool(), method->name, *junction, 0/*no parent*/); | VMethodFrame frame(pool(), method->name, *junction, 0/*no parent*/); frame.ref(); |
| frame.set_self(main_class); | frame.set_self(main_class); |
| frame.store_param(body_vstring_before_post_process); | frame.store_param(body_vstring_before_post_process); |
| Line 411 t[9]-t[3] | Line 412 t[9]-t[3] |
| if(const Method *method=junction->method) { | if(const Method *method=junction->method) { |
| // preparing to pass parameters to | // preparing to pass parameters to |
| // @unhandled_exception[exception;stack] | // @unhandled_exception[exception;stack] |
| VMethodFrame frame(pool(), method->name, *junction, 0/*no caller*/); | VMethodFrame frame(pool(), method->name, *junction, 0/*no caller*/); frame.ref(); |
| frame.set_self(main_class); | frame.set_self(main_class); |
| // $exception | // $exception |
| frame.store_param(exception2vhash(pool(), e)); | frame.store_param(exception2vhash(pool(), e)); |
| // $stack[^table::set{name origin}] | // $stack[^table::set{name origin}] |
| Table::columns_type stack_trace_columns; | Table::columns_type stack_trace_columns(new ArrayString); |
| *stack_trace_columns+=StringPtr(new String("name")); | *stack_trace_columns+=StringPtr(new String("name")); |
| *stack_trace_columns+=StringPtr(new String("file")); | *stack_trace_columns+=StringPtr(new String("file")); |
| *stack_trace_columns+=StringPtr(new String("lineno")); | *stack_trace_columns+=StringPtr(new String("lineno")); |
| Line 432 t[9]-t[3] | Line 433 t[9]-t[3] |
| const String_fragment::Origin& origin=name->origin(); | const String_fragment::Origin& origin=name->origin(); |
| if(origin.file) { | if(origin.file) { |
| *row+=StringPtr(new String(origin.file, 0, true)); // file column | *row+=StringPtr(new String(origin.file, 0, true)); // file column |
| char *buf=(char *)malloc(MAX_NUMBER); | *row+=StringPtr(new String( |
| size_t buf_size=snprintf(buf, MAX_NUMBER, "%d", 1+origin.line); | pool().format_integer(1+origin.line), |
| *row+=StringPtr(new String(buf, buf_size, true)); // line column | 0, true)); // line column |
| } | } |
| #endif | #endif |
| *stack_trace+=row; | *stack_trace+=row; |
| Line 452 t[9]-t[3] | Line 453 t[9]-t[3] |
| // doing that ugly | // doing that ugly |
| // make up result: $origin $source $comment $type $code | // make up result: $origin $source $comment $type $code |
| char *buf=(char *)malloc(MAX_STRING); | char *buf=new(pool()) char[MAX_STRING]; |
| size_t printed=0; | size_t printed=0; |
| if(StringPtr problem_source=e.problem_source()) { | if(StringPtr problem_source=e.problem_source()) { |
| #ifndef NO_STRING_ORIGIN | #ifndef NO_STRING_ORIGIN |