-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible fix for #424 #430
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm lacking context for the changed code, but it looks correct to me.
if eTag.IsSome then responseHeaders.ETag <- eTag.Value | ||
if lastModified.IsSome then responseHeaders.LastModified <- Nullable(lastModified.Value) | ||
if eTag.IsSome then responseHeaders.ETag <- eTag.Value | ||
if lastModified.IsSome then responseHeaders.LastModified <- Nullable(lastModified.Value.CutOffMs()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this has any effect, but I don't think there's any harm here either
@@ -88,7 +89,8 @@ type HttpContext with | |||
match lastModified with | |||
| None -> AllConditionsMet | |||
| Some lastModified -> | |||
match requestHeaders.IfModifiedSince.Value <= DateTimeOffset.UtcNow | |||
let lastModified = lastModified.CutOffMs() | |||
match requestHeaders.IfModifiedSince.Value <= DateTimeOffset.UtcNow.CutOffMs() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might need an integration test to check the value of requestHeaders.IfModifiedSince.Value
Fix for issue #424