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 ETag quoting regression in If-None-Match header of compact index request #7352

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

martinemde
Copy link
Member

@martinemde martinemde commented Jan 3, 2024

What was the end-user or developer problem that led to this PR?

HTTP spec requires that ETags in the If-None-Match header must be quoted. Requests to the rubygems.org index without quoted ETag are never matched for a 304 response, always falling back to a partial content request at best.

What is your fix for the problem, implemented in this PR?

Fix unintentional removal of quotes around the ETag in the compact index If-None-Match header. Make sure that tests cover this requirement.

I also changed a method name that was being shadowed by local variables to make the code a bit more clear.

Make sure the following tasks are checked

Copy link
Member

@deivid-rodriguez deivid-rodriguez left a comment

Choose a reason for hiding this comment

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

Looks good to me, sounds like this just need some test updates?

bundler/lib/bundler/compact_index_client/updater.rb Outdated Show resolved Hide resolved
@martinemde
Copy link
Member Author

Looks good to me, sounds like this just need some test updates?

New laptop and my tests weren't working yet so I had to rely on CI 😬 I'll get these this morning.

@martinemde martinemde force-pushed the martinemde/quote-etag-compact-index branch from 559e89a to e4f2531 Compare January 4, 2024 17:34
@martinemde martinemde force-pushed the martinemde/quote-etag-compact-index branch from e4f2531 to d26bcd7 Compare January 4, 2024 19:46
@martinemde martinemde changed the title Quote Etag in If-None-Match compact index request Fix ETag quoting regression in If-None-Match header of compact index request Jan 4, 2024
@martinemde martinemde merged commit e25fb48 into master Jan 5, 2024
82 checks passed
@martinemde martinemde deleted the martinemde/quote-etag-compact-index branch January 5, 2024 02:06
deivid-rodriguez pushed a commit that referenced this pull request Jan 17, 2024
…index

Fix ETag quoting regression in If-None-Match header of compact index request

(cherry picked from commit e25fb48)
deivid-rodriguez pushed a commit that referenced this pull request Jan 17, 2024
…index

Fix ETag quoting regression in If-None-Match header of compact index request

(cherry picked from commit e25fb48)
deivid-rodriguez pushed a commit that referenced this pull request Jan 17, 2024
…index

Fix ETag quoting regression in If-None-Match header of compact index request

(cherry picked from commit e25fb48)
deivid-rodriguez pushed a commit that referenced this pull request Jan 17, 2024
…index

Fix ETag quoting regression in If-None-Match header of compact index request

(cherry picked from commit e25fb48)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants