Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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