Diff for /parser3/src/classes/file.C between versions 1.71 and 1.78

version 1.71, 2002/02/08 07:27:40 version 1.78, 2002/04/15 13:17:03
Line 2 Line 2
         Parser: @b file parser class.          Parser: @b file parser class.
   
         Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com)          Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com)
         Author: Alexander Petrosyan <paf@design.ru> (http://paf.design.ru)          Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
   
         $Id$          $Id$
 */  */
Line 85  static void _find(Request& r, const Stri Line 85  static void _find(Request& r, const Stri
   
         // passed file name simply exists in current dir          // passed file name simply exists in current dir
         if(file_readable(r.absolute(lfile_name))) {          if(file_readable(r.absolute(lfile_name))) {
                 r.write_no_lang(*new(pool) VString(lfile_name));                  r.write_no_lang(lfile_name);
                 return;                  return;
         }          }
   
         // scan .. dirs for result          // scan .. dirs for result
         for(int i=0; i<FIND_MONKEY_MAX_HOPS; i++) {          for(int i=0; i<FIND_MONKEY_MAX_HOPS; i++) {
                 String test_name(pool);                  String local_test_name(pool);
                 for(int j=0; j<i; j++)                  for(int j=0; j<i; j++)
                         test_name.APPEND_CONST("../");                          local_test_name.APPEND_CONST("../");
                 test_name.append(lfile_name, String::UL_CLEAN);                  local_test_name.append(lfile_name, String::UL_CLEAN);
                 if(file_readable(r.absolute(test_name))) {                  if(file_readable(r.absolute(local_test_name))) {
                         r.write_no_lang(*new(pool) VString(*new(pool) String(test_name)));                          r.write_no_lang(*new(pool) String(local_test_name));
                         return;                          return;
                 }                  }
         }          }
Line 236  static void _exec_cgi(Request& r, const Line 236  static void _exec_cgi(Request& r, const
         //out.APPEND_CONST("content-type:text/plain\nheader:test-header\n\ntest-body");          //out.APPEND_CONST("content-type:text/plain\nheader:test-header\n\ntest-body");
         //out<<in;          //out<<in;
         String& err=*new(pool) String(pool);          String& err=*new(pool) String(pool);
         int status=pa_exec(script_name, &env, argv, in, out, err);          int status=pa_exec(false/*forced_allow*/, script_name, &env, argv, in, out, err);
   
         VFile& self=*static_cast<VFile *>(r.self);          VFile& self=*static_cast<VFile *>(r.self);
   
Line 252  static void _exec_cgi(Request& r, const Line 252  static void _exec_cgi(Request& r, const
                 }                  }
                 if(pos<0) {                  if(pos<0) {
                         delim_size=0; // calm down, compiler                          delim_size=0; // calm down, compiler
                         throw Exception(0, 0,                          throw Exception(0,
                                 &method_name,                                  &method_name,
                                 "output does not contain CGI header; exit code=%d; outsize=%u; out: \"%s\"; errsize=%u; err: \"%s\"",                                   "output does not contain CGI header; exit code=%d; outsize=%u; out: \"%s\"; errsize=%u; err: \"%s\"", 
                                         status,                                           status, 
Line 314  static void _list(Request& r, const Stri Line 314  static void _list(Request& r, const Stri
                         pool.get_client_charset().pcre_tables);                          pool.get_client_charset().pcre_tables);
   
                 if(!regexp_code)                  if(!regexp_code)
                         throw Exception(0, 0,                           throw Exception(0, 
                                 &regexp->mid(erroffset, regexp->size()),                                   &regexp->mid(erroffset, regexp->size()), 
                                 "regular expression syntax error - %s", errptr);                                  "regular expression syntax error - %s", errptr);
   
Line 342  static void _list(Request& r, const Stri Line 342  static void _list(Request& r, const Stri
                                 suits=false;                                  suits=false;
                         else if(exec_result<0) {                          else if(exec_result<0) {
                                 (*pcre_free)(regexp_code);                                  (*pcre_free)(regexp_code);
                                 throw Exception(0, 0,                                   throw Exception(0, 
                                         regexp,                                           regexp, 
                                         "regular expression execute (%d)",                                           "regular expression execute (%d)", 
                                                 exec_result);                                                  exec_result);

Removed from v.1.71  
changed lines
  Added in v.1.78


E-mail: