Skip to content
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

Merged
merged 2 commits into from
Nov 26, 2020
Merged

Conversation

dustinmoris
Copy link
Member

Fix for issue #424

@dustinmoris dustinmoris requested a review from TheAngryByrd June 12, 2020 09:34
cmeeren
cmeeren previously approved these changes Jun 12, 2020
Copy link

@cmeeren cmeeren left a 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())
Copy link

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()
Copy link
Member

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

@dustinmoris dustinmoris changed the base branch from master to develop November 26, 2020 20:53
@dustinmoris dustinmoris dismissed cmeeren’s stale review November 26, 2020 20:53

The base branch was changed.

@dustinmoris dustinmoris merged commit 598e9d2 into develop Nov 26, 2020
@dustinmoris dustinmoris deleted the hotfix/preconditions-datetimeoffset branch November 26, 2020 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants