Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2009, Roxen IS.   //   // The Roxen WebServer main program.   //   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.   // ABS and suicide systems contributed freely by Francesco Chemolli    - constant cvs_version="$Id: roxen.pike,v 1.1098 2011/12/22 09:54:46 wellhard Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.1099 2011/12/27 15:37:29 mast Exp $";      //! @appears roxen   //!   //! The Roxen WebServer main program.      // The argument cache. Used by the image cache.   ArgCache argcache;      // Some headerfiles   #define IN_ROXEN
Roxen.git/server/base_server/roxen.pike:6499:   {    (compiled_log_event[ fmt ] ||    compile_log_format( fmt )->log_event) (cb, facility, action,    resource, info);   }      protected LogFormat compile_log_format( string fmt )   {    add_constant( "___LogFormat", LogFormat );    +  // Note similar code in compile_security_pattern. +     string kmd5 = md5( fmt );       object con = dbm_cached_get("local");       {    array tmp =    con->query("SELECT full,enc FROM compiled_formats WHERE md5=%s", kmd5 );       if( sizeof(tmp) && (tmp[0]->full == fmt) )    {    LogFormat lf;    if (mixed err = catch {    lf = decode_value( tmp[0]->enc, master()->Decoder() )();    }) {    if (describe_error (err) !=    "Cannot decode programs encoded with other pike version.\n") -  report_error("Decoding of dumped log format failed: %s", -  describe_backtrace(err)); +  report_warning ("Decoding of dumped log format failed " +  "(will recompile): %s", describe_backtrace(err));    }       if (lf && lf->log_access) {    // Check that it's a new style log program (old ones have log()    // instead of log_access()).    compiled_log_access[fmt] = lf->log_access;    compiled_log_event[fmt] = lf->log_event;    return lf;    }    }
Roxen.git/server/base_server/roxen.pike:6923:   //! return means that reaching this command results in immediate   //! return, only useful for 'allow'.   //!   //! 'deny' always implies a return, no futher testing is done if a   //! 'deny' match.   {    // Now, this cache is not really all that performance critical, I    // mostly coded it as a proof-of-concept, and because it was more    // fun that trying to find the bug in the image-cache at the moment.    +  // Note similar code in compile_log_format. +     string kmd5 = md5( pattern );      #if !defined(HTACCESS_DEBUG) && !defined(SECURITY_PATTERN_DEBUG)    array tmp =    dbm_cached_get( "local" )    ->query("SELECT full,enc FROM compiled_formats WHERE md5=%s", kmd5 );       if( sizeof(tmp) && (tmp[0]->full == pattern) )    {    mixed err = catch {    return decode_value( tmp[0]->enc, master()->Decoder() )()->f;    };   // #ifdef DEBUG -  report_error("Decoding of dumped log format failed:\n%s", -  describe_backtrace(err)); +  if (describe_error (err) != +  "Cannot decode programs encoded with other pike version.\n") +  report_warning ("Decoding of dumped security pattern failed " +  "(will recompile):\n%s", describe_backtrace(err));   // #endif    }   #endif /* !defined(HTACCESS_DEBUG) && !defined(SECURITY_PATTERN_DEBUG) */          string code = "";    array variables = ({ " object userdb_module",    " object authmethod = id->conf",    " string realm = \"User\"",    " mapping(string:int|mapping) state = ([])",