Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Commit eb83e99

Browse files
committed
Do not run TryParseExact on null dates
1 parent c5e09b0 commit eb83e99

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Microsoft.Net.Http.Headers/HeaderUtilities.cs

+4
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@ public static string FormatInt64(long value)
215215

216216
public static bool TryParseDate(string input, out DateTimeOffset result)
217217
{
218+
if (input == null)
219+
{
220+
return false;
221+
}
218222
return HttpRuleParser.TryStringToDate(input, out result);
219223
}
220224

0 commit comments

Comments
 (0)