Skip to content

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

Merged
jonchurch merged 5 commits into
jshttp:masterfrom
iambinlin:fix/ISSUE-35
Sep 4, 2024
Merged

Fix: Expect return true immediately if If-None-Match matches the ETag header (#35)#38
jonchurch merged 5 commits into
jshttp:masterfrom
iambinlin:fix/ISSUE-35

Conversation

@iambinlin

@iambinlin iambinlin commented Apr 29, 2024

Copy link
Copy Markdown
Contributor

Main Changes

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

Context

Closes #35

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

@UlisesGascon UlisesGascon left a comment

Copy link
Copy Markdown
Member

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

ctcpip commented Apr 29, 2024

Copy link
Copy Markdown
Member

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

@rxmarbles rxmarbles left a comment

Copy link
Copy Markdown

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.

Comment thread index.js Outdated
@wesleytodd

Copy link
Copy Markdown
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
Copy Markdown
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
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