Branch: Tag:

2000-11-24

2000-11-24 15:52:02 by Martin Stjernholm <mast@lysator.liu.se>

Fixed bug which could cause "Attempting to index the empty string with 0"
backtrace when requesting a dir list in the root of a virtual server.

Rev: server/base_server/configuration.pike:1.398

1:   // A vitual server's main configuration   // Copyright © 1996 - 2000, Roxen IS. - constant cvs_version = "$Id: configuration.pike,v 1.397 2000/11/20 13:36:33 per Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.398 2000/11/24 15:52:02 mast Exp $";   #include <module.h>   #include <module_constants.h>   #include <roxen.h>
1381:    array dir;    TRACE_ENTER(sprintf("List directory %O.", file), 0);    -  if(file[0] != '/') +  if(!sizeof (file) || file[0] != '/')    file = "/" + file;      #ifdef URL_MODULES
1681:       file=replace(file, "//", "/");    -  if(file[0] != '/') +  if(!sizeof (file) || file[0] != '/')    file = "/" + file;       // FIXME: Should I append a "/" to file if missing?