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

Fix: Expect return true immediately if If-None-Match matches the ETag header (#35) #38

Merged
merged 5 commits into from
Sep 4, 2024

Conversation

bigbigDreamer
Copy link
Contributor

@bigbigDreamer bigbigDreamer commented Apr 29, 2024

Main Changes

Expect return true immediately if If-None-Match matches the ETag header.

Context

Closes #35

@bigbigDreamer bigbigDreamer changed the title fix: fix ISSUE 35 Fix: Expect return true immediately if If-None-Match matches the ETag header (#35) Apr 29, 2024
Copy link
Member

@UlisesGascon UlisesGascon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this work @bigbigDreamer!

AFAIK, seems like this is a major change in terms of semver. I will love to have some additional reviews before we merge it (I am not an expert on fresh) 👍

@ctcpip

This comment was marked as resolved.

@ctcpip
Copy link
Member

ctcpip commented Apr 29, 2024

AFAIK, seems like this is a major change in terms of semver.

there is no perfect answer, but you could argue that a breaking change caused by spec-compliance where you don't do a major version bump does not violate semver. unrelated but similar issue I ran into last week: github.com/bcgit/bc-java/issues/1641

Copy link

@rxmarbles rxmarbles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also don't have perms to approve but a ➕1 from me 😄

ctcpip

This comment was marked as resolved.

index.js Outdated Show resolved Hide resolved
@wesleytodd
Copy link
Member

I am adding this to the list of required releases before we land express@5. I have not had a chance to read all the relevant context, but it does seem that we could land this as a major along with dropping support for some old node versions to release along side v5.

@jonchurch jonchurch self-assigned this Aug 19, 2024
@jonchurch
Copy link
Member

Updated the PR to early return from the for loop. The change to the flow of the code allows us to do that, while previously we fell through to give the other header a chance to invalidate.

When we have an if-none-match, we must decide fresh based on that

@jonchurch jonchurch merged commit cff1222 into jshttp:master Sep 4, 2024
28 checks passed
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.

If-Modified-Since is not ignored if request contains If-None-Match
8 participants