Replicant icon indicating copy to clipboard operation
Replicant copied to clipboard

Fixes situations where Expires is set in the header but smaller than …

Open pmengal opened this issue 10 months ago • 2 comments

We've encountered cases where the HTTP response header didn't indicate the correct value in Expires, generating a value lower than FileEx.MinFileDate and triggering an exception from File.SetLastWriteTimeUtc method.

System.ArgumentOutOfRangeException : Not a valid Win32 FileTime.

This change takes into account this kind of situation, which unfortunately occurs frequently in our project. And we have no control over these files or the server hosting them.

If need be, I can give an example of these URLs privately.

pmengal avatar Jan 24 '25 10:01 pmengal

can u add a test for this scenario

SimonCropp avatar Jan 24 '25 11:01 SimonCropp

I'm probably mistaken, but for that, I would need to manipulate the header, which is not possible with the current library.

pmengal avatar Jan 24 '25 11:01 pmengal

then change the code to make it testable

SimonCropp avatar May 04 '25 12:05 SimonCropp