mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-25 19:02:24 +01:00
Do not save Mappings when SaveMappingForStatusCodePattern does not match (#566)
This commit is contained in:
@@ -261,14 +261,17 @@ namespace WireMock.Server
|
||||
proxyUriWithRequestPathAndQuery.AbsoluteUri
|
||||
);
|
||||
|
||||
if (settings.ProxyAndRecordSettings.SaveMapping)
|
||||
if (mapping != null)
|
||||
{
|
||||
_options.Mappings.TryAdd(mapping.Guid, mapping);
|
||||
}
|
||||
if (settings.ProxyAndRecordSettings.SaveMapping)
|
||||
{
|
||||
_options.Mappings.TryAdd(mapping.Guid, mapping);
|
||||
}
|
||||
|
||||
if (settings.ProxyAndRecordSettings.SaveMappingToFile)
|
||||
{
|
||||
_mappingToFileSaver.SaveMappingToFile(mapping);
|
||||
if (settings.ProxyAndRecordSettings.SaveMappingToFile)
|
||||
{
|
||||
_mappingToFileSaver.SaveMappingToFile(mapping);
|
||||
}
|
||||
}
|
||||
|
||||
return responseMessage;
|
||||
|
||||
Reference in New Issue
Block a user