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

Don't pass along the Content-Length header #77

Merged
merged 3 commits into from
Feb 23, 2016

Conversation

smellsblue
Copy link
Contributor

With the latest version of Puma, this line is giving us problems from this commit. Specifically, we are setting a Content-Length with a downcased header name. Before that commit in Puma, the normal cased version of the Content-Length header would be the only thing that triggered the line, but now the downcased version will as well. This in turn causes Puma to blow up. This is easily fixed by not passing along the Content-Length header we stashed from RubyGems.org. I suspect the content length is somehow differing from what should be sent... maybe a different bug in our code, or a bug somewhere in Puma when the content length is being sent. Regardless, this fixes the bug appearing in the specs.

Additionally, this was causing a bug for @chriseckhardt where gems would download and appear to be corrupted. This fix in turn fixes that bug as well as the spec failures with the latest Puma.

Normalize the header names to the standard capitalization
The Content-Length header causes issues in specs with a newer version of Puma
@smellsblue
Copy link
Contributor Author

I think I tracked down why this is problematic.

We are using Rack::Deflater in both the test rack config and the gem provided rack config. This in turn will alter the length of the served content, so the content length header we set from the cached headers will absolutely be wrong. I'm actually a bit surprised this hasn't caused any issues before now.

@pcarranza
Copy link
Contributor

👍

pcarranza added a commit that referenced this pull request Feb 23, 2016
Don't pass along the Content-Length header
@pcarranza pcarranza merged commit e1e7096 into 1-0-stable Feb 23, 2016
@smellsblue smellsblue deleted the fix-travis-failures branch February 23, 2016 23:13
@smellsblue smellsblue added the bug label Feb 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants