+ return("Server Flimsiness");
+ }
+
+ public static String stripslashes(String p, boolean beg, boolean end) {
+ while(end && (p.length() > 0) && (p.charAt(p.length() - 1) == '/'))
+ p = p.substring(0, p.length() - 1);
+ while(beg && (p.length() > 0) && (p.charAt(0) == '/'))
+ p = p.substring(1);
+ return(p);
+ }
+
+ public static void cpstream(InputStream in, OutputStream out) throws IOException {
+ byte[] buf = new byte[4096];
+ while(true) {
+ int ret = in.read(buf, 0, buf.length);
+ if(ret < 0)
+ return;
+ out.write(buf, 0, ret);
+ }
+ }
+
+ public static Responder stdroot(Responder root) {
+ Responder ret = root;
+ ret = new Rehandler(ret);
+ ret = new ErrorHandler(ret);
+ return(ret);