From: <br...@us...> - 2000-10-13 19:30:10
|
Steve Cockwell <st...@ca...> writes: > br...@us... wrote: > > > > Should I provide a similar way to run foo.brl from the brldir? > > Yes! That would clinch it I think. If you did that, then I could have > as many zones as I wanted and run them seperately using that method! > All would be well! Ok, try this patch quick, as I'll be leaving for the weekend in about half an hour. Index: brlsv.java =================================================================== RCS file: /cvsroot/brl/brl/gnu/brl/brlsv.java,v retrieving revision 1.11 diff -u -r1.11 brlsv.java --- brlsv.java 2000/10/13 14:07:51 1.11 +++ brlsv.java 2000/10/13 19:26:14 @@ -153,6 +153,7 @@ boolean response_started=false; String requested_fname; + // Get the real file path associated with this request if (brldir == null) { if (req.getPathInfo() == null) @@ -165,10 +166,15 @@ else { // For sites that want .brl files outside the doc. root + // using URI like /servlet/brlsv/file.html + String str = req.getPathInfo(); + + // using URI like /file.brl + if (str == null) str = req.getRequestURI(); + requested_fname = brldir + ((File.separatorChar == '/') ? - req.getRequestURI() - : req.getRequestURI().replace('/', File.separatorChar)); + str : str.replace('/', File.separatorChar)); } // Create s-expr to handle request -- Bruce R. Lewis http://brl.sourceforge.net/ |