File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -150,12 +150,12 @@ type PreconditionExtensions() =
150
150
| ConditionFailed -> ConditionFailed
151
151
| ResourceNotModified -> ResourceNotModified
152
152
153
- // Set ETag and Last-Modified in the response
154
- if eTag.IsSome then
155
- responseHeaders.ETag <- eTag.Value
153
+ // Set ETag in the response
154
+ eTag |> Option.iter ( fun eTagValue -> responseHeaders.ETag <- eTagValue)
156
155
157
- if lastModified.IsSome then
158
- responseHeaders.LastModified <- Nullable( lastModified.Value.CutOffMs())
156
+ // Set Last-Modified in the response
157
+ lastModified
158
+ |> Option.iter ( fun lastModifiedValue -> responseHeaders.LastModified <- Nullable( lastModifiedValue.CutOffMs()))
159
159
160
160
// Validate headers in correct precedence
161
161
// RFC: https://tools.ietf.org/html/rfc7232#section-6
You can’t perform that action at this time.
0 commit comments