Skip to content

Commit

Permalink
Fix possible NRE when assigning http scheme using Extensions Logging (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz authored Mar 27, 2023
1 parent af53e3c commit ceae3da
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ private static bool AssignKnownHttpKeys(LogEvent logEvent, string key, object va
logEvent.Http.RequestBytes = long.TryParse(contentLength, out var l) ? l : (long?)null;
return true;
case "Scheme" when value is string scheme:
logEvent.Http ??= new Http();
logEvent.Url ??= new Url();
logEvent.Url.Scheme = scheme;
return true;
case "Host" when value is string host:
Expand Down

0 comments on commit ceae3da

Please sign in to comment.