Merge remote-tracking branch 'origin/jetty-8'
Conflicts: jetty-client/src/test/java/org/eclipse/jetty/client/WebSocketUpgradeTest.java jetty-security/src/main/java/org/eclipse/jetty/security/SecurityHandler.java jetty-server/src/main/java/org/eclipse/jetty/server/session/HashSessionManager.java jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketConnectionD00.java jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketFactory.java jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketServlet.java jetty-websocket/src/test/java/org/eclipse/jetty/websocket/SafariWebsocketDraft0Test.java jetty-websocket/src/test/java/org/eclipse/jetty/websocket/WebSocketLoadD08Test.java jetty-websocket/src/test/java/org/eclipse/jetty/websocket/WebSocketLoadRFC6455Test.java jetty-websocket/src/test/java/org/eclipse/jetty/websocket/WebSocketMessageD00Test.java jetty-websocket/src/test/java/org/eclipse/jetty/websocket/WebSocketMessageD06Test.java jetty-websocket/src/test/java/org/eclipse/jetty/websocket/WebSocketMessageD08Test.java jetty-websocket/src/test/java/org/eclipse/jetty/websocket/WebSocketServletRFCTest.java
This commit is contained in:
commit
2acdf9f839
|
@ -70,7 +70,7 @@ public abstract class SecurityHandler extends HandlerWrapper implements Authenti
|
|||
private Authenticator.Factory _authenticatorFactory=new DefaultAuthenticatorFactory();
|
||||
private String _realmName;
|
||||
private String _authMethod;
|
||||
private final Map<String,String> _initParameters=new HashMap<>();
|
||||
private final Map<String,String> _initParameters=new HashMap<String,String>();
|
||||
private LoginService _loginService;
|
||||
private IdentityService _identityService;
|
||||
private boolean _renewSession=true;
|
||||
|
@ -355,6 +355,7 @@ public abstract class SecurityHandler extends HandlerWrapper implements Authenti
|
|||
|
||||
if (_identityService==null && _realmName!=null)
|
||||
setIdentityService(new DefaultIdentityService());
|
||||
|
||||
_discoveredIdentityService = true;
|
||||
}
|
||||
|
||||
|
@ -382,6 +383,7 @@ public abstract class SecurityHandler extends HandlerWrapper implements Authenti
|
|||
}
|
||||
|
||||
@Override
|
||||
/* ------------------------------------------------------------ */
|
||||
protected void doStop() throws Exception
|
||||
{
|
||||
//if we discovered the services (rather than had them explicitly configured), remove them.
|
||||
|
|
|
@ -513,33 +513,40 @@ public class HashSessionManager extends AbstractSessionManager
|
|||
protected synchronized HashedSession restoreSession(String idInCuster)
|
||||
{
|
||||
File file = new File(_storeDir,idInCuster);
|
||||
FileInputStream in = null;
|
||||
Exception error = null;
|
||||
try
|
||||
{
|
||||
if (file.exists())
|
||||
{
|
||||
FileInputStream in = new FileInputStream(file);
|
||||
in = new FileInputStream(file);
|
||||
HashedSession session = restoreSession(in, null);
|
||||
in.close();
|
||||
addSession(session, false);
|
||||
session.didActivate();
|
||||
file.delete();
|
||||
return session;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
if (isDeleteUnrestorableSessions())
|
||||
error = e;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (in != null)
|
||||
try {in.close();} catch (Exception x) {__log.ignore(x);}
|
||||
|
||||
if (error != null)
|
||||
{
|
||||
if (file.exists())
|
||||
if (isDeleteUnrestorableSessions() && file.exists())
|
||||
{
|
||||
file.delete();
|
||||
LOG.warn("Deleting file for unrestorable session "+idInCuster, e);
|
||||
LOG.warn("Deleting file for unrestorable session "+idInCuster, error);
|
||||
}
|
||||
else
|
||||
LOG.warn("Problem restoring session "+idInCuster, error);
|
||||
}
|
||||
else
|
||||
LOG.warn("Problem restoring session "+idInCuster, e);
|
||||
|
||||
file.delete(); //delete successfully restored file
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue