-
Notifications
You must be signed in to change notification settings - Fork 39
Conversation
1382273
to
2c1b708
Compare
if (ConditionalRequestSatisfied(cachedResponseHeaders)) | ||
{ | ||
_httpContext.Response.StatusCode = StatusCodes.Status304NotModified; | ||
return true; |
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.
inconsistent use of responseServed
vs return true
.
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 had the responseServed
variable previously because we couldn't short-circuit after failing to serve a response due to the OnlyIfCached
header. The conditional requests are different, if we served that, we can return right away. But I guess for consistency, I can just keep using responseServed
and return it at the end. This means one extra check on the boolean even after satisfying the conditional request but I guess that's fine.
eb8426a
to
916d12e
Compare
🆙📅 |
{ | ||
foreach (var tag in ifNoneMatchHeader) | ||
{ | ||
// TODO: use strong comparison |
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.
This TODO is complete
|
916d12e
to
52f219b
Compare
Only |
Add support to send 304 responses for requests conditional on
IfModifiedSince
andIfNoneMatch
.cc @Tratcher @davidfowl