changeset 437:c5911cf740de

minor
author Devel 2
date Thu, 27 Jul 2017 15:50:59 +0200
parents 80f236c7b75e
children f9315df8d81f
files stress-tester/src/main/java/com/passus/st/ParametersBag.java stress-tester/src/main/java/com/passus/st/client/http/filter/HttpCsrfFilter.java
diffstat 2 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/ParametersBag.java	Thu Jul 27 15:50:43 2017 +0200
+++ b/stress-tester/src/main/java/com/passus/st/ParametersBag.java	Thu Jul 27 15:50:59 2017 +0200
@@ -92,4 +92,10 @@
 
         return params.keySet();
     }
+
+    @Override
+    public String toString() {
+        return "ParametersBag{" + "params=" + params + '}';
+    }
+
 }
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpCsrfFilter.java	Thu Jul 27 15:50:43 2017 +0200
+++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpCsrfFilter.java	Thu Jul 27 15:50:59 2017 +0200
@@ -17,6 +17,7 @@
 import com.passus.net.http.HttpRequest;
 import com.passus.net.http.HttpResponse;
 import com.passus.st.ParametersBag;
+import static com.passus.st.client.http.HttpConsts.TAG_SESSION_ID;
 import com.passus.st.client.http.HttpFlowContext;
 import com.passus.st.plugin.PluginConstants;
 import com.passus.st.validation.HeaderNameValidator;
@@ -25,6 +26,8 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Queue;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 /**
  *
@@ -34,6 +37,8 @@
 @Plugin(name = HttpCsrfFilter.TYPE, category = PluginConstants.CATEGORY_HTTP_FILTER)
 public final class HttpCsrfFilter extends HttpFilter {
 
+    private static final Logger LOGGER = LogManager.getLogger(HttpCsrfFilter.class);
+
     public static abstract class Extractor {
 
         public final String type;
@@ -227,6 +232,7 @@
                 ParametersBag params = context.scopes().getSession(resp);
                 if (params != null) {
                     Queue<ByteString> tokens = (Queue<ByteString>) params.get(SESSION_KEY);
+
                     if (tokens == null) {
                         tokens = new LinkedList<>();
                         params.set(SESSION_KEY, tokens);