X-Git-Url: http://dolda2000.com/gitweb/?p=jsvc.git;a=blobdiff_plain;f=src%2Fdolda%2Fjsvc%2Futil%2FMisc.java;h=cc01f1f47074602fdad8627a589e209063019553;hp=c3131834600c98a81e2ab7a34b26587e2eb883ca;hb=c25c3aadf42cf04fe8dbbfb60624589ba60112bd;hpb=a7d2eb2686c6e87d97d66051ba577178e5432511 diff --git a/src/dolda/jsvc/util/Misc.java b/src/dolda/jsvc/util/Misc.java index c313183..cc01f1f 100644 --- a/src/dolda/jsvc/util/Misc.java +++ b/src/dolda/jsvc/util/Misc.java @@ -7,12 +7,29 @@ public class Misc { static { stext.put(200, "OK"); + stext.put(300, "Multiple Choices"); + stext.put(301, "Permanently Moved"); + stext.put(302, "Temporarily Moved"); + stext.put(303, "See Other"); + stext.put(400, "Bad Request"); + stext.put(401, "Authentication Required"); + stext.put(403, "Access Forbidden"); + stext.put(404, "Resource Not Found"); + stext.put(500, "Server Error"); } public static String statustext(int status) { String text; if((text = stext.get(status)) != null) return(text); - return("Unknown Response"); + 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); } }