Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2015-12-17 20:50:19 -0500
committerGreg Wilkins2015-12-17 20:50:19 -0500
commit133e9e054d1a6a3a16eb602cbdfd3f86f3c87572 (patch)
tree57c58d6dcffac4147ca4b5310866e0013249209a /jetty-servlets
parent316a2e866190c90e4dc4fc37c99ccce04ad57c6f (diff)
parent5cd676581c178dc3611298e611c62fc51ed1b6cf (diff)
downloadorg.eclipse.jetty.project-133e9e054d1a6a3a16eb602cbdfd3f86f3c87572.tar.gz
org.eclipse.jetty.project-133e9e054d1a6a3a16eb602cbdfd3f86f3c87572.tar.xz
org.eclipse.jetty.project-133e9e054d1a6a3a16eb602cbdfd3f86f3c87572.zip
Merge remote-tracking branch 'origin/jetty-9.3.x'
Conflicts: jetty-security/src/main/java/org/eclipse/jetty/security/HashLoginService.java
Diffstat (limited to 'jetty-servlets')
-rw-r--r--jetty-servlets/src/main/java/org/eclipse/jetty/servlets/DoSFilter.java16
1 files changed, 7 insertions, 9 deletions
diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/DoSFilter.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/DoSFilter.java
index 8a13382865..aad404d5db 100644
--- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/DoSFilter.java
+++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/DoSFilter.java
@@ -1107,10 +1107,10 @@ public class DoSFilter implements Filter
{
private static final long serialVersionUID = 3534663738034577872L;
- protected transient final String _id;
- protected transient final int _type;
- protected transient final long[] _timestamps;
- protected transient int _next;
+ protected final String _id;
+ protected final int _type;
+ protected final long[] _timestamps;
+ protected int _next;
public RateTracker(String id, int type, int maxRequestsPerSecond)
{
@@ -1164,16 +1164,14 @@ public class DoSFilter implements Filter
public void sessionWillPassivate(HttpSessionEvent se)
{
//take the tracker of the list of trackers (if its still there)
- //and ensure that we take ourselves out of the session so we are not saved
_rateTrackers.remove(_id);
- se.getSession().removeAttribute(__TRACKER);
- if (LOG.isDebugEnabled())
- LOG.debug("Value removed: {}", getId());
}
public void sessionDidActivate(HttpSessionEvent se)
{
- LOG.warn("Unexpected session activation");
+ RateTracker tracker = (RateTracker)se.getSession().getAttribute(__TRACKER);
+ if (tracker!=null)
+ _rateTrackers.put(tracker.getId(),tracker);
}
@Override

Back to the top