fix for form (cookie) login

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3284 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
allo 18 years ago
parent 16aa66bf3d
commit 25c7d4e25e

@ -59,7 +59,7 @@ import de.anomic.server.servletProperties;
public class User{ public class User{
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) { public static servletProperties respond(httpHeader header, serverObjects post, serverSwitch env) {
servletProperties prop = new servletProperties(); servletProperties prop = new servletProperties();
plasmaSwitchboard sb = plasmaSwitchboard.getSwitchboard(); plasmaSwitchboard sb = plasmaSwitchboard.getSwitchboard();
userDB.Entry entry=null; userDB.Entry entry=null;
@ -74,7 +74,7 @@ public class User{
prop.put("logged-in_identified-by", 1); prop.put("logged-in_identified-by", 1);
//try via cookie //try via cookie
}else{ }else{
entry=sb.userDB.cookieAuth(userDB.getLoginToken(header.getHeaderCookies())); entry=sb.userDB.cookieAuth(header.getHeaderCookies());
prop.put("logged-in_identified-by", 2); prop.put("logged-in_identified-by", 2);
//try via ip //try via ip
if(entry == null){ if(entry == null){

@ -617,10 +617,10 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http
requestHeader.put("PATH", path); requestHeader.put("PATH", path);
// in case that there are no args given, args = null or empty hashmap // in case that there are no args given, args = null or empty hashmap
Object tmp = invokeServlet(targetClass, requestHeader, args); Object tmp = invokeServlet(targetClass, requestHeader, args);
if(tmp instanceof serverObjects){ if(tmp instanceof servletProperties){
tp=new servletProperties((serverObjects)tmp);
}else{
tp=(servletProperties)tmp; tp=(servletProperties)tmp;
}else{
tp=new servletProperties((serverObjects)tmp);
} }
// if no args given , then tp will be an empty Hashtable object (not null) // if no args given , then tp will be an empty Hashtable object (not null)
if (tp == null) tp = new servletProperties(); if (tp == null) tp = new servletProperties();

Loading…
Cancel
Save