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

Ensure Rack::ContentLength is loaded as middleware #4541

Merged

Commits on Apr 22, 2020

  1. Ensure Rack::ContentLength is loaded as middleware

    6.0.5 removed Sidekiq::WebApplication's own Content-Length header calculation, expecting Rack to do it instead via some middleware. This was to fix an issue where New Relic would inject content into Sidekiq's Web UI after the hand crafted content length was calculated. While such middleware exists, it's not enabled by default (at least in a Rails app) and so the HTTP response doesn't have the header at all.
    
    The absence of the header has caused unexpected behaviour in an nginx and HAProxy setup, causing each page load to take exactly 20 seconds. The suspicion is that, without the Content-Length response header, HAProxy waits a preset amount of time before deciding the body must have surely been finished and then reponds.
    f3ndot committed Apr 22, 2020
    Copy the full SHA
    b07e99d View commit details
    Browse the repository at this point in the history