Roxen.git / server / modules / misc / pathinfo.pike

version» Context lines:

Roxen.git/server/modules/misc/pathinfo.pike:1:   /* -  * $Id: pathinfo.pike,v 1.4 1999/10/04 15:00:28 per Exp $ +  * $Id: pathinfo.pike,v 1.5 1999/10/08 17:21:20 per Exp $    *    * PATH_INFO support for Roxen.    *    * Henrik Grubbström 1998-10-01    */      #include <module.h>      inherit "module";    - constant cvs_version = "$Id: pathinfo.pike,v 1.4 1999/10/04 15:00:28 per Exp $"; + constant cvs_version = "$Id: pathinfo.pike,v 1.5 1999/10/08 17:21:20 per Exp $";   constant thread_safe = 1;      // #define PATHINFO_DEBUG      array register_module()   {    return ({ MODULE_LAST, "PATH_INFO support",    "Support for PATH_INFO style URLs.",    0, 1 });   }
Roxen.git/server/modules/misc/pathinfo.pike:76: Inside #if 0
   id->misc->path_info = query[offsets[probe]+1..];    id->not_query = file+"/";    return 1;    lo = probe + 1;    } else {    hi = probe - 1;    }    }   #else /* Slower, but it works... */    string pi = ""; -  while( (search( query, "/" ) != -1) && strlen( query ) > 0 ) +  while( (search( query, "/" ) > 0) && strlen( query ) > 0 )    {    query = reverse(query);    string add_path_info;    sscanf( query, "%[^/]/%s", add_path_info, query );    query = reverse( query );    if( strlen( pi ) )    pi = "/"+reverse( add_path_info )+pi;    else    pi = "/"+add_path_info;    id->misc->path_info = pi;    array st = id->conf->stat_file( query, id );    if( st )    {    id->not_query = query;    return 1;    }    }   #endif    return 0;   }