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