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

Remove Accept-Encoding header on redirect #9265

Merged

Conversation

mhashizume
Copy link
Contributor

Prior to this commit, Puppet would copy all request headers in an HTTP redirect, including Accept-Encoding. In some cases when HTTP compression was enabled, the response would fail to get decompressed, then would fail to get parsed and trigger a vague error.

This commit strips the Accept-Encoding headers on redirect, allowing Ruby's built-in Net::HTTP to both compress and decompress the traffic.

Resolves #9143

@mhashizume mhashizume added the bug Something isn't working label Feb 26, 2024
@mhashizume mhashizume requested a review from a team as a code owner February 26, 2024 21:14
@mhashizume
Copy link
Contributor Author

This will need to be backported to 7.x after merge.

@mhashizume
Copy link
Contributor Author

Blocked on #9266

@joshcooper
Copy link
Contributor

Needs rebase on main

Prior to this commit, Puppet would copy all request headers in an HTTP
redirect, including Accept-Encoding. In some cases when HTTP compression
was enabled, the response would fail to get decompressed, then would
fail to get parsed and trigger a vague error.

This commit strips the Accept-Encoding headers on redirect, allowing
Ruby's built-in Net::HTTP to both compress and decompress the traffic.
@joshcooper joshcooper merged commit 57a00cc into puppetlabs:main Feb 27, 2024
9 checks passed
@joshcooper joshcooper added the backport 7.x Generate a backport PR to 7.x label Feb 27, 2024
Copy link

Successfully created backport PR for 7.x:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 7.x Generate a backport PR to 7.x bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

puppet module install breaks on HTTP redirects.
3 participants