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.1049 2009/11/24 13:01:03 grubba Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.1050 2009/11/24 15:11:21 grubba 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:3145:    {    if( !what )    error( "Got invalid argcache-entry\n" );    if( !zero_type(what[""]) ) return what[""];    return what;    }       protected void|mapping draw( string name, RequestID id )    {   #ifdef ARG_CACHE_DEBUG -  werror("draw %O\n", name ); +  werror("draw: %O id: %O\n", name, id );   #endif    mixed args = Array.map( Array.map( name/"$", argcache->lookup,    id->client ), frommapp);       id->cache_status["icachedraw"] = 1;       mapping meta;    string data;    array guides; -  + #ifdef ARG_CACHE_DEBUG +  werror("draw args: %O\n", args ); + #endif    mixed reply = draw_function( @copy_value(args), id );       if( !reply ) {   #ifdef ARG_CACHE_DEBUG    werror("%O(%{%O, %}%O) ==> 0\n",    draw_function, args, id);   #endif    return;    }   
Roxen.git/server/base_server/roxen.pike:3909:    //!    //! A non-zero @[nodraw] parameter means an image not already in the    //! cache will not be rendered on the fly, but instead return zero.    {    mapping res = http_file_answer( args, id, nodraw );    return res && res->data;    }       mapping http_file_answer( array|string|mapping data,    RequestID id, -  int|void nodraw ) +  int|void nodraw, int|void timeout )    //! Returns a @[result mapping] like one generated by    //! @[Roxen.http_file_answer()] but for the image file    //! rendered from the `data' instructions.    //!    //! Like @[metadata], a non-zero @[nodraw]parameter means an    //! image not already in the cache will not be rendered on the fly,    //! but instead zero will be returned (this will be seen as a 'File    //! not found' error)    {    current_configuration->set(id->conf); -  string na = store( data,id ); +  string na = store( data, id, timeout );    mixed res;   #ifdef ARG_CACHE_DEBUG -  werror("data %O\n", na ); +  werror("data: %O id: %O\n", na, id );   #endif    if(! (res=restore( na,id )) )    {    mixed err;    if (nodraw || (err = catch {    if (mapping res = draw( na, id ))    return res;    })) {    // File not found.