This PR fixes two issues that occur if you add different settings:
When trying to replace values in the Form Collection of an Error, a NullReferenceException occures if the request has no FormContentType. Since it makes no sense to override values that do not exist and especially since we shouldn´t use Form at all if the Request has no FormContentType we only should replace this values for requests with FormContentType
While I was testing the new JSON settings implementation I found an issue that occurred when adding IgnoreSettings (Regex or Types). When creating the Settings object and in further consequence the IgnoreSettings object, the two Lists that are properties of this class are not instantiated. This lead to a NullReferenceException when trying to fill this Lists on Deserialization.
Both errors are occuring in StackExchange.Exceptional and in StackExchange.Exceptional.AspNetCore because they are located in StackExchange.Exceptional.Shared.
This PR fixes two issues that occur if you add different settings:
When trying to replace values in the Form Collection of an Error, a NullReferenceException occures if the request has no FormContentType. Since it makes no sense to override values that do not exist and especially since we shouldn´t use Form at all if the Request has no FormContentType we only should replace this values for requests with FormContentType
While I was testing the new JSON settings implementation I found an issue that occurred when adding IgnoreSettings (Regex or Types). When creating the Settings object and in further consequence the IgnoreSettings object, the two Lists that are properties of this class are not instantiated. This lead to a NullReferenceException when trying to fill this Lists on Deserialization.
Both errors are occuring in StackExchange.Exceptional and in StackExchange.Exceptional.AspNetCore because they are located in StackExchange.Exceptional.Shared.