Skip to content

Instantly share code, notes, and snippets.

@cainlevy
Created November 28, 2011 23:00
Show Gist options
  • Save cainlevy/1402499 to your computer and use it in GitHub Desktop.
Save cainlevy/1402499 to your computer and use it in GitHub Desktop.
Delete HTTP_X_QUEUE_START for requests with large content lengths.
class QueueTimeMiddleware
def initialize(app)
@app = app
end
def call(env)
if env['CONTENT_LENGTH'].to_i > 10000
env['HTTP_X_QUEUE_START'] = nil
end
@app.call(env)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment