From aaef1d420f140c96e0a16f99b219c60d52a02c57 Mon Sep 17 00:00:00 2001 From: Scott Beddall Date: Wed, 21 Aug 2024 14:51:32 -0700 Subject: [PATCH] ensure we normalize so that the json comparison is the fallback --- .../Azure.Sdk.Tools.TestProxy/Common/RecordSession.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/RecordSession.cs b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/RecordSession.cs index d2f19f5a6cc..ba51b7d355d 100644 --- a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/RecordSession.cs +++ b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/RecordSession.cs @@ -103,6 +103,9 @@ public RecordEntry Lookup(RecordEntry requestEntry, RecordMatcher matcher, IEnum sanitizer.Sanitize(requestEntry); } + // normalize request body with STJ using relaxed escaping to match behavior when Deserializing from session files + RecordEntry.NormalizeJsonBody(requestEntry.Request); + RecordEntry entry = matcher.FindMatch(requestEntry, Entries); if (remove) {