StringUtil.append(buf,(byte)(0xff&c),16);
void authenticate(UserRealm realm,Request request) { _userPrincipal = realm.authenticate(_jUserName, _jPassword, request); if (_userPrincipal!=null) _realm=realm; else { Log.warn("AUTH FAILURE: user {}",StringUtil.printable(_jUserName)); request.setUserPrincipal(null); } }
public void decodeQueryTo(MultiMap parameters, String encoding) throws UnsupportedEncodingException { if (_query==_fragment) return; if (encoding==null) encoding=URIUtil.__CHARSET; if (StringUtil.isUTF8(encoding)) UrlEncoded.decodeUtf8To(_raw,_query+1,_fragment-_query-1,parameters); else UrlEncoded.decodeTo(StringUtil.toString(_raw,_query+1,_fragment-_query-1,encoding),parameters,encoding); }
/** Set a mime mapping * @param extension * @param type */ public void addMimeMapping(String extension,String type) { if (_mimeMap==null) _mimeMap=new HashMap(); _mimeMap.put(StringUtil.asciiToLowerCase(extension),normalizeMimeType(type)); }
buf.append(','); buf.append(' '); StringUtil.append2digits(buf, day_of_month); buf.append(MONTHS[month]); buf.append('-'); StringUtil.append2digits(buf, year); buf.append(MONTHS[month]); buf.append(' '); StringUtil.append2digits(buf, century); StringUtil.append2digits(buf, year); StringUtil.append2digits(buf, hours); buf.append(':'); StringUtil.append2digits(buf, minutes); buf.append(':'); StringUtil.append2digits(buf, seconds); buf.append(" GMT");
void authenticate(UserRealm realm,Request request) { _userPrincipal = realm.authenticate(_jUserName, _jPassword, request); if (_userPrincipal!=null) _realm=realm; else { Log.warn("AUTH FAILURE: user {}",StringUtil.printable(_jUserName)); request.setUserPrincipal(null); } }
break; String ext=StringUtil.asciiToLowerCase(filename.substring(i+1)); if (_mimeMap!=null) type = (Buffer)_mimeMap.get(ext);
@Override protected Object filterString(String string) { Matcher m = __script.matcher(string); if (m.matches()) string = StringUtil.replace(string,"script","span"); return string; } }
void authenticate(UserRealm realm,String user,String password,Request request) { _jUserName=user; _jPassword=password; _userPrincipal = realm.authenticate(user, password, request); if (_userPrincipal!=null) _realm=realm; else { Log.warn("AUTH FAILURE: user {}",StringUtil.printable(user)); request.setUserPrincipal(null); } }
public String getCompletePath() { if (_path==_end) return null; return StringUtil.toString(_raw,_path,_end-_path,URIUtil.__CHARSET); }
@Override protected Object filterString(String string) { Matcher m=__script.matcher(string); if (m.matches()) string=StringUtil.replace(string,"script","span"); return string; } }
void authenticate(UserRealm realm,String user,String password,Request request) { _jUserName=user; _jPassword=password; _userPrincipal = realm.authenticate(user, password, request); if (_userPrincipal!=null) _realm=realm; else { Log.warn("AUTH FAILURE: user {}",StringUtil.printable(user)); request.setUserPrincipal(null); } }
public String getQuery(String encoding) { if (_query==_fragment) return null; return StringUtil.toString(_raw,_query+1,_fragment-_query-1,encoding==null?URIUtil.__CHARSET:encoding); }
protected void writeErrorPageBody(HttpServletRequest request, Writer writer, int code, String message, boolean showStacks) throws IOException { String uri= request.getRequestURI(); if (uri!=null) { uri= StringUtil.replace(uri, "&", "&"); uri= StringUtil.replace(uri, "<", "<"); uri= StringUtil.replace(uri, ">", ">"); } writeErrorPageMessage(request,writer,code,message,uri); if (showStacks) writeErrorPageStacks(request,writer); writer.write("<p><i><small><a href=\"http://jetty.mortbay.org/\">Powered by Jetty://</a></small></i></p>"); for (int i= 0; i < 20; i++) writer.write("<br/> \n"); }
Log.warn("AUTH FAILURE: user {}",StringUtil.printable(username));
public String getPath() { if (_path==_param) return null; return StringUtil.toString(_raw,_path,_param-_path,URIUtil.__CHARSET); }
protected void writeErrorPage(HttpServletRequest request, Writer writer, int code, String message, boolean showStacks) throws IOException { if (message == null) message=HttpGenerator.getReason(code); else { message= StringUtil.replace(message, "&", "&"); message= StringUtil.replace(message, "<", "<"); message= StringUtil.replace(message, ">", ">"); } writer.write("<html>\n<head>\n"); writeErrorPageHead(request,writer,code,message); writer.write("</head>\n<body>"); writeErrorPageBody(request,writer,code,message,showStacks); writer.write("\n</body>\n</html>\n"); }
Log.warn("AUTH FAILURE: user {}",StringUtil.printable(username));