You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ie...@apache.org on 2020/03/20 11:31:29 UTC

[sling-org-apache-sling-testing-clients] 01/01: dumping set Cookie headers

This is an automated email from the ASF dual-hosted git repository.

ieb pushed a commit to branch ieb-patch-1
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-clients.git

commit 2a88518b2c51670279c2dd66ef32e7c91087433e
Author: Ian <ie...@tfd.co.uk>
AuthorDate: Fri Mar 20 11:31:21 2020 +0000

    dumping set Cookie headers
---
 .../java/org/apache/sling/testing/clients/SlingHttpResponse.java    | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/main/java/org/apache/sling/testing/clients/SlingHttpResponse.java b/src/main/java/org/apache/sling/testing/clients/SlingHttpResponse.java
index a8baca3..79b288e 100644
--- a/src/main/java/org/apache/sling/testing/clients/SlingHttpResponse.java
+++ b/src/main/java/org/apache/sling/testing/clients/SlingHttpResponse.java
@@ -40,6 +40,12 @@ public class SlingHttpResponse implements CloseableHttpResponse {
 
     public SlingHttpResponse(CloseableHttpResponse response) {
         this.httpResponse = response;
+        if (this.httpResponse.containerHeader("Set-Cookie")) {
+            Header[] headers =  this.httpResponse.getHeaders("Set-Cookie");
+            for (Header h :headers) {
+                System.err.println(h);
+            }
+        }
     }
 
     /**