From 239d29dc8e37ce633ff0fd44345b406733a52891 Mon Sep 17 00:00:00 2001 From: ruri Date: Sat, 7 Sep 2019 01:12:09 +0200 Subject: [PATCH] Now request block only shows cookies that are actually received, not all of them. --- RuriLib/Blocks/BlockRequest.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RuriLib/Blocks/BlockRequest.cs b/RuriLib/Blocks/BlockRequest.cs index 248cd7a..5f7f94b 100644 --- a/RuriLib/Blocks/BlockRequest.cs +++ b/RuriLib/Blocks/BlockRequest.cs @@ -350,6 +350,7 @@ namespace RuriLib // Set base URL var localUrl = ReplaceValues(url, data); var cType = ReplaceValues(contentType, data); + var oldJar = data.Cookies; // Create request HttpRequest request = new HttpRequest(); @@ -552,6 +553,9 @@ namespace RuriLib data.Cookies = response.Cookies; foreach (var cookie in response.Cookies) { + // If the cookie was already present before, don't log it + if (oldJar.ContainsKey(cookie.Key) && oldJar[cookie.Key] == cookie.Value) continue; + data.Log(new LogEntry(cookie.Key + ": " + cookie.Value, Colors.LightGoldenrodYellow)); }